GithubHelp home page GithubHelp logo

Comments (3)

zkytony avatar zkytony commented on May 18, 2024

But when I run the code, it looks like the history is not being deleted but being expanded upon.

I think you caught a bug. _history is a field in the Cython Agent class, and can't be overridden on the python side. So clear_history in MOS Agent simply won't do its job. The correct way is to add set_history function in the Cython Agent class, similar to set_belief. I guess I was never really bothered by a growing history.

is it possible the tree construction in PO_UCT also needs to be reset every time a real action is taking?

Tree update should happen upon planner.update. If you have called that function, then you shouldn't experience the issue you're describing. Regarding debugging, check out the tree debugger.

from pomdp-py.

RajeshDM avatar RajeshDM commented on May 18, 2024

But when I run the code, it looks like the history is not being deleted but being expanded upon.

I think you caught a bug. _history is a field in the Cython Agent class, and can't be overridden on the python side. So clear_history in MOS Agent simply won't do its job. The correct way is to add set_history function in the Cython Agent class, similar to set_belief. I guess I was never really bothered by a growing history.

is it possible the tree construction in PO_UCT also needs to be reset every time a real action is taking?

Tree update should happen upon planner.update. If you have called that function, then you shouldn't experience the issue you're describing. Regarding debugging, check out the tree debugger.

yep, that history needs to be reset in the Cython code. What do you think about the consequence of making this update to the behavior of get all actions function : [pomdp-py/pomdp_problems/multi_object_search/models/policy_model.py](https://github.com/h2r/pomdp-py/blob/85d9a3182e6a883e44315617c9fdfde484d05c01/pomdp_problems/multi_object_search/models/policy_model.py#L31 - in this case the length of history will never be greater than 1, so I believe that should be changed to len(history) > 0

I will check out the update and the debugger thank you.

from pomdp-py.

zkytony avatar zkytony commented on May 18, 2024

The history does get accumulated during planning. get_all_actions is called by self._agent.valid_actions by default. You can try len(history) > 0. I believe that means the agent can do Look, Find. Currently it has to do Move, Look, Find. I think it's fine either way.

Regarding fixing clear_history (I believe this is what you mean by "this update"), I don't think there is noticeable difference before/after the fix.

from pomdp-py.

Related Issues (20)

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.