refine DiscreteEnvironment.py