Giter VIP home page Giter VIP logo

Comments (2)

jmacglashan avatar jmacglashan commented on July 22, 2024

Yes, isApplicableInState is a means for defining action preconditions and one of the main reasons to do that is so you can provide background knowledge that prunes away impossible actions. Another reason (in the single agent case more so) might be that you have a subsystem that the action calls (like a robotic controller) and you don't want the controller to be initiated in certain conditions.

Adding a definable InvalidActionHandler is an interesting idea, but I'm hesitant to add it. Generally speaking if you have a system that forces execution of an inapplicable action, the system is doing something wrong and it should be alerted. Noop replacements might work in some cases, but other problems could crop up later. For example, if a reward function is defined in such a way that it does not handle the value for inapplicable actions of the domain you could get weird results; in one case the reward function might just break entirely (causing an uninformative runtime exception) or, worse, it might return a nonsensical reward value that that motivates strange unexpected behavior in the agent.

That said, your point about things like visual/terminal explorers not behaving gracefully upon user error is a good point. However, this seems more like a problem that can be addressed in the code of the explorers. That is, the code should simply check whether the user input action is applicable and do nothing, along with a message printed somewhere, if it's not.

Are there other reasons beyond the explorers that you think an InvalidActionHandler would be useful?

from burlap.

jmacglashan avatar jmacglashan commented on July 22, 2024

FYI, in the latest pull to master, I also made it so that the explorers now do more gracefully handled attempted execution of inapplicable actions.

from burlap.

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.