GithubHelp home page GithubHelp logo

ericonaldo / pysc2-rl-agent Goto Github PK

View Code? Open in Web Editor NEW

This project forked from inoryy/reaver

4.0 1.0 2.0 387 KB

(D)RL Agent For PySC2 Environment. Close replication of DeepMind's SC2LE paper architecture.

License: MIT License

Python 99.59% Shell 0.41%

pysc2-rl-agent's Introduction

(D)RL Agent For PySC2 Environment

A fork from https://github.com/inoryy/pysc2-rl-agent

Add some notes in Chinese

在看的过程中加入了一些中文注释

修改了一些BUG,在runner中若使用多个进程,其中一个进程done=1后若其他进程还未结束,则该进程会重新开始游戏及计分,reward将会累加,修改了reward的累计方式

增加了模仿学习,使用脚本生成录像,然后使用录像初始化模型,再使用强化学习,加速收敛。

模仿学习示例,详细参数见文件:

使用脚本生成录像replay

python replay_script_agent.py --map=CollectMineralShards --sz=16 --DATA_SIZE=50000

监督训练

python imitation_learning.py --map=CollectMineralShards --sz=16

强化学习,从预训练好的Model中读取

python main.py --map=CollectMineralShards --sz=16 --env=1 --updates=50000 --restore=True --steps=12

强化学习A2C训练

python main.py --map=CollectMineralShards --sz=16 --env=1 --updates=50000 --steps=12 --restrict=True

restrict限制输出动作为:

_NOOP = actions.FUNCTIONS.no_op.id

_SELECT_POINT = actions.FUNCTIONS.select_point.id

_MOVE_SCREEN = actions.FUNCTIONS.Move_screen.id

此举是为了限制动作空间,在第二个minimap上学出agent分开,后续加入multi-step

pysc2-rl-agent's People

Contributors

ericonaldo avatar inoryy avatar

Stargazers

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