Code Monkey home page Code Monkey logo

Comments (6)

Svalorzen avatar Svalorzen commented on July 22, 2024

That hasn't really been on my radar yet.

I guess using just log probabilities in the transition functions won't really be useful unless all algorithms are also modified to take advantage of that, and that would require modifying the entire library.

What changes are you thinking of in particular?

from ai-toolbox.

yassiezar avatar yassiezar commented on July 22, 2024

I agree. Looking at the original VI algorithm, for example, and looking at other MDP implementations, it doesn't seem like using log probabilities is really a thing. Makes me think there's maybe a reason for that...

I'm working with the MDP library with a biggish state-space and small probabilities, so I'm curious to see if using logs will clear the small summing errors I'm getting. I'll try and modify the algorithms and see if it makes any difference and make a pull request if you want to take a look

from ai-toolbox.

Svalorzen avatar Svalorzen commented on July 22, 2024

I'm not 100% sure; not using logs definitely helps in that I can use matrix operations from Eigen untouched in order to make computations rather than rolling my own - I'm not sure whether a direct log equivalent exists.

Feel free to try it out and let me know if anything comes out of it. The idea for this library is that it should be not too hard to customize, so in case you have any problems understanding/touching some pieces feel free to open issues so that I can document stuff better!

from ai-toolbox.

EHadoux avatar EHadoux commented on July 22, 2024

I think the problem comes with the fact that ln(0) = -inf. How do you use that in practice?

from ai-toolbox.

yassiezar avatar yassiezar commented on July 22, 2024

Fair point. Would there be significant algorithmic/mathematical implications if you ignore cases where the transition probability is zero? My logic being that if an event can't occur (e.g. transition from s -> s1 with action a), do we need to represent that or even worry about it at all? I agree that small probabilities (<10e-6 or whatever) can add unwanted noise though

from ai-toolbox.

EHadoux avatar EHadoux commented on July 22, 2024

Would there be significant algorithmic/mathematical implications if you ignore cases where the transition probability is zero?

I don't think so.

do we need to represent that or even worry about it at all?

Not really. The problem is that what you propose is some kind of forbidden states/actions system. AFAIK it's not very well supported by traditional solving methods that need to have a stable set of actions or states (all of them really), hence the probability at 0 to emulate that.
Everything can be modified though but it might be a bit of work.

from ai-toolbox.

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.