Code Monkey home page Code Monkey logo

alpha-gobang-zero's Introduction

logo

Alpha Gobang Zero

A gobang robot based on reinforcement learning

Version v1.0 Python 3.8.6 PyTorch 1.8.1 PyQt 5.15.2 OS Win10 | Win 11

游戏界面

Policy-Value Net

  • Network structure
    • ConvBlock × 1
    • ResidueBlock × 4
    • PolicyHead × 1
    • ValueHead × 1
  • Network visualization
模型架构

Quick start

  1. Create virtual environment:

    conda create -n Alpha_Gobang_Zero python=3.8
    conda activate Alpha_Gobang_Zero
    pip install -r requirements.txt
  2. Install PyTorch,refer to the blog for details;

  3. Start game:

    conda activate Alpha_Gobang_Zero
    python game.py

Train model

conda activate Alpha_Gobang_Zero
python train.py

Blog

《如何使用自对弈强化学习训练一个五子棋机器人Alpha Gobang Zero》

Reference

FAQs

  • Why does the window get stuck when it is dragged?

    Because the interface background uses acrylic effect, this problem will occur for some versions of win10. There are three solutions:

    • Upgrade win10 to the latest version.
    • Uncheck the check box of Advanced system settings --> Performance --> Show window contents when dragging.
    • Turn off the option to enable acrylic background in the setting interface.
  • Why does the configuration I modified in the settings interface not take effect immediately?

    The modified configuration will take effect at the beginning of the next game.

License

Alpha-Gobang-Zero is licensed under GPLv3.

Copyright © 2021 by zhiyiYo.

alpha-gobang-zero's People

Contributors

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