Coder Social home page Coder Social logo

petosa / multiplayer-alphazero Goto Github PK

View Code? Open in Web Editor NEW
33.0 6.0 9.0 19 KB

PyTorch AlphaZero implementation with multiplayer support [NeurIPS 2019 Deep Reinforcement Learning Workshop]

License: MIT License

Python 100.00%
alphazero pytorch neurips-2019 deep-reinforcement-learning

multiplayer-alphazero's Introduction

Journal Article

https://arxiv.org/abs/1910.13012

What is this

An independent implementation of DeepMind's AlphaZero algorithm with support for multiplayer games. AlphaZero is a deep reinforcement learning algorithm which can learn to master a certain class of adversarial games through self-play. Strategies are learned tabula rasa and, with enough time and computation, achieve super-human performance. The canonical AlphaZero algorithm is intended for 2-player games like Chess and Go, though this project supports multiplayer games as well.

Benefits

Clean & Simple

Clear and concise - a no-frills AlphaZero implementation written with Python 3 and PyTorch. Extensively commented and easy to extend. Support for CPU and GPU training, as well as pausing and resuming training.

Modular & Extensible

Easily plug in your own games or neural networks by implementing the Game and Model interface. Only PyTorch models are supported. Example games and networks included with this repo are listed below.

Example Games

  • Tic-Tac-Toe
  • Tic-Tac-Mo
  • Connect 3x3

Example Networks

  • SENet

Novel Multiplayer Support

The first of its kind; support for games with more than 2 players.

Tutorial

Training an agent

You can start training your own AlphaZero agents very easily.

python main.py configs/my_run_configuration.json

You must run main.py with the location of a run configuration json file as the first argument.

multiplayer-alphazero's People

Contributors

petosa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

multiplayer-alphazero's Issues

gym env wrapper

Hello,

would be great to test this. I have implemented a more complex board game:
https://github.com/Counterfeiter/KingdomBuilder

I made a gym env wrapper... but not pushed at the moment. An Issue with your Game wrapper is, that the observation should be get back to game states and find if done is set. In ray rllib alphazero deepcopied the gym env and written back if needed by MCTS.

How could I write a simple gym wrapper for your wrapper?

Thx

Sebastian

License missing

Hello,

I would like to send pull requests and did not see any license file. Could you please add one?

I have added a hidden states variable (e.g. a complete gym env) to the game class. The hash function is also redirected to the game interface, so this could handle games with incomplete information.

I think thats a great improvement to support a lot more games and should gain more interest. This repo is really underestimated compared to other alpha zero implementations.

Thanks

Sebastian

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.