ShawK91 / Evolutionary-Reinforcement-Learning

Codebase for Evolutionary Reinforcement Learning (ERL) from the paper "Evolution-Guided Policy Gradients in Reinforcement Learning" published at NeurIPS 2018
217 stars 60 forks source link

Can not step #2

Open xiaoyuanzh opened 2 years ago

xiaoyuanzh commented 2 years ago

If I use your env env = utils.NormalizedActions(gym.make(env_tag)) I can not step an action, it says not implement error,

sxzhuang commented 2 years ago

If I use your env env = utils.NormalizedActions(gym.make(env_tag)) I can not step an action, it says not implement error,

I met the same problems. Have you solved this question?

zhengluohu commented 1 year ago

if your error is 'raise NotImplementedError', you can solved it by install an older verision of gym(gym==0.15.6) or use the step (core. mod_utils.py) instead of _step.

[(https://github.com/openai/gym/issues/1334#issuecomment-466525895)]

class NormalizedActions(gym.ActionWrapper):

def _action(self, action):
    action = (action + 1) / 2  # [-1, 1] => [0, 1]
    action *= (self.action_space.high - self.action_space.low)
    action += self.action_space.low
    return action

def _reverse_action(self, action):
    action -= self.action_space.low
    action /= (self.action_space.high - self.action_space.low)
    action = action * 2 - 1
    return action
huanyuyunhuang commented 1 year ago

When I run in Pendulum-v0, I get "RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling 'cublasSgemm' unless I set batch_size to 16. Why is that? My python environment is set to the same environment as yours.