Closed finbarrtimbers closed 2 years ago
No worries!
In your case, I think the bug is the line new_agent = base._DummyAgent(simulator, '/tmp/agent_file')
. The new agent is being added to the old simulator rather than the new one. Also, I don't think Simulator has a save
method (as in the line simulator.save('/tmp')
). Did you add one?
We designed the Simulator class to handle saving and loading the agents in addition the environment. Simulator has a get_agents
function that will return the loaded agents. So you shouldn't reload the agents separately. This test has a working example of how to save/load simulators and agents.
Ah, that DummyAgent
bug is embarrassing. Thanks for the catch. However, if I change it to be the new simulator, it still fails.
When I switch it to use get_agents
that fixes it- thanks for the help.
Ah right, so if you don't use get_agents
, there will actually be two agents in the simulator, so time will not advance until both have moved.
Hey folks!
Sorry to raise so many issues. Hopefully this is the last one.
After I save the environment + an agent to a file and then load it back up, the environment doesn't change when an action is taken.
I assume I'm calling this wrong- can you advise me how to fix this?
Here's my minimal reproducible example:
vision
is below, so it should change when the agent takes a step forward: