Git Product home page Git Product logo

reinforcementlearning's Introduction

强化学习自学

这个项目使用了价值策略网络和MCTS,其中game.py建立了五子棋的游戏环境,train.py包括了整个五子棋的训练过程。整个训练过程可以通过设置TrainPipeline()中的参数调整迭代次数epoch,棋盘长宽,随机走子playout模拟的局数。

只在colab上训练10$\times $10的棋盘500个epoch,策略情况不是很好,看其他教程至少需要3000才能得到更好的效果。目前提交的最优model是大约迭代350次(7/3)的模型,有时会出现current_policy保存的胜率跟best_policy一样,但是loss更低,这时推荐用更新的policy。

执行代码:

python human_play.py <modelname>

会读取保存好的current_policy或者best_policy模型,后面参数modelname根据情况选择输入best_policy.model或者current_policy.model,然后就可以人机对弈,直到得出胜负。

reinforcementlearning's People

Contributors

hangzhang23 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.