From 81e6e1034485685bb117fa10731a085a2bd83260 Mon Sep 17 00:00:00 2001 From: Erik Nygren <erik.nygren@sbb.ch> Date: Sun, 1 Sep 2019 20:58:52 -0400 Subject: [PATCH] fixed reward bug --- torch_training/render_agent_behavior.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/torch_training/render_agent_behavior.py b/torch_training/render_agent_behavior.py index aabd457..589d610 100644 --- a/torch_training/render_agent_behavior.py +++ b/torch_training/render_agent_behavior.py @@ -48,8 +48,8 @@ stochastic_data = {'prop_malfunction': 0.0, # Percentage of defective agents TreeObservation = TreeObsForRailEnv(max_depth=2) # Different agent types (trains) with different speeds. -speed_ration_map = {1.: 1., # Fast passenger train - 1. / 2.: 0.0, # Fast freight train +speed_ration_map = {1.: 0., # Fast passenger train + 1. / 2.: 1.0, # Fast freight train 1. / 3.: 0.0, # Slow commuter train 1. / 4.: 0.0} # Slow freight train @@ -102,7 +102,7 @@ action_prob = [0] * action_size agent_obs = [None] * env.get_num_agents() agent_next_obs = [None] * env.get_num_agents() agent = Agent(state_size, action_size, "FC", 0) -with path(torch_training.Nets, "navigator_checkpoint9600.pth") as file_in: +with path(torch_training.Nets, "navigator_checkpoint10700.pth") as file_in: agent.qnetwork_local.load_state_dict(torch.load(file_in)) record_images = False -- GitLab