Coder Social home page Coder Social logo

Comments (3)

finbarrtimbers avatar finbarrtimbers commented on June 10, 2024 1

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.

from jelly-bean-world.

asaparov avatar asaparov commented on June 10, 2024

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.

from jelly-bean-world.

asaparov avatar asaparov commented on June 10, 2024

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.

from jelly-bean-world.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.