I am trying to create an A3C but it is giving same action for all the states during the training.

The same action is also not an obvious way to maximise the reward.

However I donot know if normal a3c with multinomail sampling of actions can be used for continuous state space.

Any suggestions for best RL algo to be used for continuous state space and discrete action action space.

        while count<max_timesteps-1:
            value, action_values, (hx, cx) = model((Variable(state.unsqueeze(0)), (hx, cx)))
            prob = F.softmax(action_values,dim = -1)
            log_prob = F.log_softmax(action_values, dim=-1)
            entropy = -(log_prob * prob).sum(1, keepdim=True)
            cdist = categorical.Categorical(prob)
            action = cdist.sample()
            log_prob = log_prob[0, Variable(action)].data
            state, reward, done = env.step(action)
            done = (done or count == max_timesteps-2)
            reward = max(min(reward, 1), -1)
  • $\begingroup$ Maybe you should describe the problem you are trying to solve and provide more details about your solution, and what you mean by "it is not working correctly". $\endgroup$ – nbro Aug 30 '20 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.