Commit 1af86348 authored by Erik Nygren's avatar Erik Nygren
Browse files

fomatting

parent 91372ef7
Pipeline #1108 passed with stages
in 12 minutes and 59 seconds
......@@ -80,7 +80,7 @@ for trials in range(1, n_trials + 1):
# Environment step which returns the observations for all agents, their corresponding
# reward and whether their are done
next_obs, all_rewards, done, _ = env.step(action_dict)
# TreeObservation.util_print_obs_subtree(next_obs[0], num_features_per_node=8)
# Update replay buffer and train agent
for a in range(env.get_num_agents()):
agent.step((obs[a], action_dict[a], all_rewards[a], next_obs[a], done[a]))
......
......@@ -342,21 +342,18 @@ class TreeObsForRailEnv(ObservationBuilder):
for ca in conflicting_agent:
if direction != self.predicted_dir[tot_dist][ca[0]]:
potential_conflict = 1
# print("Potential Conflict",position,handle,ca[0],tot_dist,depth)
# Look for opposing paths at distance num_step-1
elif int_position in np.delete(self.predicted_pos[pre_step], handle):
conflicting_agent = np.where(self.predicted_pos[pre_step] == int_position)
for ca in conflicting_agent:
if direction != self.predicted_dir[pre_step][ca[0]]:
potential_conflict = 1
# print("Potential Conflict", position,handle,ca[0],pre_step,depth)
# Look for opposing paths at distance num_step+1
elif int_position in np.delete(self.predicted_pos[post_step], handle):
conflicting_agent = np.where(np.delete(self.predicted_pos[post_step], handle) == int_position)
for ca in conflicting_agent:
if direction != self.predicted_dir[post_step][ca[0]]:
potential_conflict = 1
# print("Potential Conflict", position,handle,ca[0],post_step,depth)
if position in self.location_has_target and position != agent.target:
if num_steps < other_target_encountered:
......
......@@ -100,7 +100,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7783247e5f2146e293236d2426248f90",
"model_id": "387832d242b44d69a1712a42d9547c05",
"version_major": 2,
"version_minor": 0
},
......@@ -134,7 +134,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.6.5"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment