Skip to content

seems like dqn use_dueling = True is broken #4

Description

@jt70

I changed the parameter in examples/dqn.py to this and I get an error:

def main():
    env_name = 'CartPole-v1'
    # env_name = 'PongNoFrameskip-v4'
    use_prioritization = True
    use_double = False
    use_dueling = True
    # use_dueling = False
    # use_atari = True
    use_atari = False
Traceback (most recent call last):
  File "/home/jason/github_projects/ProtoRL/protorl/examples/dqn.py", line 41, in <module>
    main()

File "/home/jason/github_projects/ProtoRL/protorl/examples/dqn.py", line 37, in main
    scores, steps_array = ep_loop.run(n_games)

File "/home/jason/github_projects/ProtoRL/protorl/loops/single.py", line 34, in run
    self.agent.update()

File "/home/jason/github_projects/ProtoRL/protorl/agents/dqn.py", line 46, in update
    q_pred = self.q_eval.forward(states)[indices, actions]
TypeError: tuple indices must be integers or slices, not tuple

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions