Skip to content
Snippets Groups Projects
Commit 82088216 authored by hagrid67's avatar hagrid67
Browse files

adding in max_episode_steps to saved env; fixed typo saving agents

parent 9591021b
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,9 @@ class RailEnvPersister(object):
print("Agent 0:", type(lAgents[0]), lAgents[0])
dict_env["episode"] = env.cur_episode
dict_env["actions"] = env.list_actions
dict_env["shape"] = (env.width, env.height)
dict_env["max_episode_steps"] = env._max_episode_steps
with open(filename, "wb") as file_out:
if filename.endswith(".mpk"):
......@@ -177,7 +179,9 @@ class RailEnvPersister(object):
msg_data_dict = {
"grid": grid_data,
"agents": agent_data,
"malfunction": malfunction_data}
"malfunction": malfunction_data,
"max_episode_steps": env._max_episode_steps,
}
return msg_data_dict
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment