Code Monkey home page Code Monkey logo

Comments (1)

dennybritz avatar dennybritz commented on May 13, 2024 1

I think you want to say that: it is ok to use SARSA instead of Q-Learning in this specific example.

I left the code there to demonstrate the SARSA and Q-Learning is almost the same, except for a small change in the code.

However, In case of non linear approximator (neural network as in DQN), we usually use reply memory to break the correlation. Using reply memory will limit us with off-policy algorithms (such as Q-learning), and we can not/should not use on-policy algorithms (such as SARSA) while using reply-memory. (I believe the reason is that: When using reply memory, the sampled transitions taken from the reply-memory are actually generated using old-version of the policy not the current version)

Yes, I believe this is correct. You cannot use replay memory with on-policy algorithms. However, you can use asynchronous mehtods (like A3C) that break correlations with on-policy algorithms.

then the commented code may work, only because in this specific code, you are using a simple linear approximator and not using reply memory, correct?

Yes, SARSA still works because I am not using a replay memory.

from reinforcement-learning.

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.