Delete identity_env.py (#588)

This commit is contained in:
Xingdong Zuo
2018-09-17 18:53:34 +02:00
committed by pzhokhov
parent 4dc697e670
commit 0c6f357936

View File

@@ -1,30 +0,0 @@
from gym import Env
from gym.spaces import Discrete
class IdentityEnv(Env):
def __init__(
self,
dim,
ep_length=100,
):
self.action_space = Discrete(dim)
self.reset()
def reset(self):
self._choose_next_state()
self.observation_space = self.action_space
return self.state
def step(self, actions):
rew = self._get_reward(actions)
self._choose_next_state()
return self.state, rew, False, {}
def _choose_next_state(self):
self.state = self.action_space.sample()
def _get_reward(self, actions):
return 1 if self.state == actions else 0