Giter Site home page Giter Site logo

phil-hawkins / vortex_agent Goto Github PK

View Code? Open in Web Editor NEW

This project forked from petosa/multiplayer-alphazero

0.0 1.0 0.0 1.55 MB

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

License: MIT License

Python 3.26% Jupyter Notebook 96.71% TeX 0.02%

vortex_agent's Introduction

Vortex for Alpha Zero

Search heuristic network

An agent for playing the game Vortex based on a Graph Network and DeepMind's AlphaZero algorithm.

Vortex is the game Hex, generalised to a graph. In order to play Vortex effectively, the agent must balance several risks. Selecting vertices too closely together gives the opponent freedom to form their connection. However, selecting vertices with gaps that cannot be defended, provides the opponent with an opportunity to block the path. Deep Reinforcement Learning agents such as AlphaZero have demonstrated super-human levels of skill in complex games. However, the techniques employed by AI game agents rarely generalise to real world challenges. In part this is may be due to a dependence on the artificially regular structure and dimensions of grid-based game boards.

Vortex provides a novel challenge in this respect, due to both the irregular structure of the graph that it is played on, and the fact that the Vortex graph is generated differently for each game. Each graph is connected differently and may vary widely in scale, containing a different number of vertices and edges. A Vortex playing agent must learn strategic patterns without the scaffold of a regular spatial framework such as the grid structure of games like Chess and Go. Furthermore it must learn underlying patterns of vertex connectivity that generalise to random boards rather than fitting to a fixed structure.

Installing dependencies

For GPU:

conda env create -f environment.yml

For CPU:

conda env create -f environment_cpu.yml

Training without a GPU is likely to be rather slow, however if this is intended, the config file used in training must be apdated to diable GPU as follows:

"cuda": false

Training the agent

python main.py configs/vortex-5-20-gpu.json

Playing against the trained agent in a GUI

python hex_gui.py

vortex_agent's People

Contributors

phil-hawkins avatar petosa avatar

Watchers

James Cloos 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.