TimZaman / dotaclient

distributed RL spaghetti al arabiata
26 stars 7 forks source link

Crash #47

Open Nostrademous opened 5 years ago

Nostrademous commented 5 years ago

Ran latest code on local machine over 3-4 days and after 5994 games it spat out an error:

Traceback (most recent call last):
  File "agent.py", line 985, in main
    await game.play(config=config, game_id=game_id)
  File "agent.py", line 898, in play
    player.compute_reward(prev_obs=prev_obs[team_id], obs=obs)
  File "agent.py", line 797, in compute_reward
    reward = get_reward(prev_obs=prev_obs, obs=obs, player_id=self.player_id)
  File "agent.py", line 123, in get_reward
    unit = get_unit(obs, player_id=player_id)
  File "agent.py", line 247, in get_unit
    raise ValueError("unit {} not found in state:\n{}".format(player_id, state))
ValueError: unit 5 not found in state:

Followed by the dump of the protobuf

Nostrademous commented 5 years ago

The last entry in the protobuf was an incomplete unit stub:

units {
  handle: 284
}