Giter Club home page Giter Club logo

Comments (2)

matthiasplappert avatar matthiasplappert commented on May 18, 2024

Hi, the episode_reward is just used for reporting. The actual algorithms use properly discounted rewards to estimate the Q values, for example (compare https://github.com/matthiasplappert/keras-rl/blob/master/rl/agents/dqn.py#L252).

Getting RL algorithms to work can often be quite tricky. Starting points are:

  • Scale your inputs (i.e. the observations) such that they are all on the same scale and, preferably, have a mean of 0 and a variance of 1.
  • Experiment with different scales for your reward function. This can be especially problematic if your rewards are orders of magnitudes different throughout the game (i.e. very low rewards first and very large rewards in later stages of the env).

I hope that helps.

from keras-rl.

sergiovalmac avatar sergiovalmac commented on May 18, 2024

Hi, thank you very much for your suggestion.
My environment has linar constraints for the state-action space of the form Ax<=b, so that I have included a penalty function that squares the output if the constraints are violated. Hence, the rewards could be high at some point. But as you said, this may be an issue, so I am going to try another thing: I will consider any violated constraint as a terminal state with some fixed negative reward.
Also, the state space is [0, 5]*ones(2,1) and the action space is [0, 0.5]*ones(4,1). I will try to shift and scale them.

from keras-rl.

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.