higgsfield icon indicating copy to clipboard operation
higgsfield copied to clipboard

NotImplementedError in soft_actor_critic

Open alirezadizaji opened this issue 5 years ago • 5 comments

Hi :) I got NotImplementedError at "next_state, reward, done, _ = env.step(action)" and when I set "env = gym.make("Pendulum-v0")", it'd be solved. thanks for your support

alirezadizaji avatar Aug 08 '20 13:08 alirezadizaji

but the algorithm still not have a good performance. so how to solve it ...

baimengwei avatar Sep 14 '20 06:09 baimengwei

Hi, I also have same problem "NotImplementedError at "next_state, reward, done, _ = env.step(action)", can you please help to fix it? thanks a lot!

qlinsey avatar Oct 27 '20 08:10 qlinsey

Hi, I also have same problem "NotImplementedError at "next_state, reward, done, _ = env.step(action)", can you please help to fix it? thanks a lot!

you should change the function name: ''_action'' to ''action'' before:

def _action(self, action):
        low  = self.action_space.low
        high = self.action_space.high
        
        action = low + (action + 1.0) * 0.5 * (high - low)
        action = np.clip(action, low, high)
        
        return action

after:

def action(self, action):
        low  = self.action_space.low
        high = self.action_space.high
        
        action = low + (action + 1.0) * 0.5 * (high - low)
        action = np.clip(action, low, high)
        
        return action

baimengwei avatar Oct 28 '20 08:10 baimengwei

Thank you so much! On Wednesday, 28 October 2020, 01:20:52 am GMT-7, baimengwei [email protected] wrote:

Hi, I also have same problem "NotImplementedError at "next_state, reward, done, _ = env.step(action)", can you please help to fix it? thanks a lot!

you should change the function name: ''_action'' to ''action'' before: def _action(self, action): low = self.action_space.low high = self.action_space.high action = low + (action + 1.0) * 0.5 * (high - low) action = np.clip(action, low, high) return action after: def action(self, action): low = self.action_space.low high = self.action_space.high action = low + (action + 1.0) * 0.5 * (high - low) action = np.clip(action, low, high) return action — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

qlinsey avatar Oct 28 '20 20:10 qlinsey

Hi, I have the same error with NotImplementedError at "next_state, reward, done, _ = env.step(action)", when I delete _ in the action and reverse_action it still doesn't work? Does anyone meet this issue before? btw, I am running ddpg example.

YongxiangLei avatar Jul 26 '22 16:07 YongxiangLei