eugenevinitsky / sequential_social_dilemma_games

Repo for reproduction of sequential social dilemmas
MIT License
384 stars 134 forks source link

Visuallizer throws error in visible_actions branch #154

Open gregSchwartz18 opened 5 years ago

gregSchwartz18 commented 5 years ago

Running the visuallizer throws the error

  File "visuallizer_rllib.py", line 263, in <module>
    visualizer_rllib(args)
  File "visuallizer_rllib.py", line 170, in visualizer_rllib
    info={'all_agents_actions': last_actions})
  File "/home/gds38/multi8/lib/python3.6/site-packages/ray/rllib/agents/agent.py", line 410, in compute_action
    episode=episode)
  File "/home/gds38/multi8/lib/python3.6/site-packages/ray/rllib/evaluation/policy_graph.py", line 121, in compute_single_action
    episodes=episodes)
  File "/home/gds38/multi8/lib/python3.6/site-packages/ray/rllib/evaluation/tf_policy_graph.py", line 182, in compute_actions
    prev_reward_batch, episodes=episodes[0])
  File "/home/gds38/multi8/lib/python3.6/site-packages/ray/rllib/agents/a3c/a3c_policy_graph_causal.py", line 281, in _build_compute_actions
    [e.prev_action for e in episodes[self.agent_id]]))
KeyError: 'agent-0'

I have attached a sample log file to help with replication.

log_file.zip

eugenevinitsky commented 5 years ago

Hi @gregSchwartz18, giving it a try now. I'll get back to you shortly.

eugenevinitsky commented 5 years ago

Hi @gregSchwartz18, any chance you can submit a PR with your branch? That way I can resolve code incompatibilities faster.