Git Product home page Git Product logo

Comments (6)

mcmachado avatar mcmachado commented on August 16, 2024

@pierrelux I am planning to refactor the whole code during this summer. I'll let you know when I'm done with it. Thanks for the suggestion!

from b-pro.

pum-purum-pum-pum avatar pum-purum-pum-pum commented on August 16, 2024

Is there Python wrapper for this code you can share with me?

from b-pro.

mcmachado avatar mcmachado commented on August 16, 2024

I wrote a wrapper in the other branch. It is quite fast, there is just a small performance drop when compared to C++. However, I never managed to be able to obtain an equally fast implementation of Sarsa. I guess I was never able to use the representation sparseness properly in Python.

If you are interested, let me know. I can help you with the Python wrapper and maybe you are able to properly use sparsity in Python.

from b-pro.

xkianteb avatar xkianteb commented on August 16, 2024

@mcmachado Does the current sarsa implementation work? I can help implement sparsity properly in python if you need help.

from b-pro.

mcmachado avatar mcmachado commented on August 16, 2024

from b-pro.

pierrelux avatar pierrelux commented on August 16, 2024

When I wrote this issue more than two years ago, it was in the context of this wrapper that I had written: https://bitbucket.org/rllabmcgill/shallowpy/src/master/

It may still be useful for you. I was able to get Sarsa(0) to work by relying on the memory over-commitment feature in Linux which lets you "np.zero" huge arrays without actually using that memory until you write to it. It means that if you write your sarsa(0) with sparse updates through indexing methods only, it should run pretty fast. The problem is when you want to implement sarsa(lambda) with eligibility traces and need to decay your trace. You then end up writing a lot and the memory usage just explodes. That's when @mcmachado and I started discussing about porting their special "merging" logic from the C code into Python. It never quite happened, but it would be great if someone can do it.

from b-pro.

Related Issues (1)

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.