Error Bounds of Imitating Policies and Environments