Git Product home page Git Product logo

Comments (6)

zwfcrazy avatar zwfcrazy commented on May 12, 2024 1

I just found this problem as well.
Here is another approach, we can use np.where or np.argwhere instead of writing our own codes.

max_actions = np.argwhere(values==np.amax(values))
action = np.random.choice(max_actions.flatten())

from reinforcement-learning-an-introduction.

ShangtongZhang avatar ShangtongZhang commented on May 12, 2024

@zwfcrazy It looks cool! Did you find any bug in the repo, or I have fixed them all?

from reinforcement-learning-an-introduction.

zwfcrazy avatar zwfcrazy commented on May 12, 2024

@ShangtongZhang Not yet. I am still reading the book...slowly...I am glad to see that Prof. Sutton has finished the draft! BTW, perhaps we could try to improve the efficiency of the simulations...Exercise 2.9 of chapter 2 requires running the parameter study for 200k steps, which takes days to complete...

from reinforcement-learning-an-introduction.

zwfcrazy avatar zwfcrazy commented on May 12, 2024

@ShangtongZhang Hi I just found you didn't fix the argmax problem in chapter 2.

from reinforcement-learning-an-introduction.

ShangtongZhang avatar ShangtongZhang commented on May 12, 2024

@zwfcrazy Did it lead to some bugs? I didn't mean to replace all the np.argmax

from reinforcement-learning-an-introduction.

zwfcrazy avatar zwfcrazy commented on May 12, 2024

@ShangtongZhang the simulation results seem no difference, but the simple bandit algorithm requires breaking ties randomly (see p24 of the complete draft). I think it may slow down exploration at the beginning since we assume initial estimates of Q(a) are the same for all actions. This won't be critical later on as ties happen rarely.

from reinforcement-learning-an-introduction.

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.