GithubHelp home page GithubHelp logo

rlprojects's Introduction

强化学习课程项目

项目一

项目一采用Value Iteration的方法,在每个状态价值收敛后根据价值更新策略,直到策略收敛。

在 0.23.1版本的gym中FrozenLake-v0已停用,需使用FrozenLake-v1:

env = gym.make('FrozenLake-v1')

项目二

项目二是用蒙特卡洛和时间差分对价值函数分别进行评估。在动作选取的时候采用epsilon-greedy的方式。在两种方法中epsilon的衰减方式有差别。对训练的eipsode数量即代码中的num_episodes变量对胜率的影响变化图如下:

MC

TD

项目三

在训练过程中reward的变化图如下所示

Q-Learning

Q-Learning

Sarsa

将向上和向右的reward都设为0,可实现走更安全的路。

未修改前Q-Learning路径:[36, 24, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 35]

修改后的Q-Learning路径:[36, 24, 12, 0, 1, 2, 3, 4, 5, 6, 18, 19, 20, 21, 22, 34, 35]

修改后的路径更为安全。

rlprojects's People

Contributors

daomao1102 avatar

Watchers

 avatar

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.