GithubHelp home page GithubHelp logo

live4dao / big2_ppoalgorithm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from henrycharlesworth/big2_ppoalgorithm

0.0 1.0 0.0 7.43 MB

Application of proximal policy optimization algorithm to the card game Big 2

Python 100.00%

big2_ppoalgorithm's Introduction

Big 2 Self-Play Reinforcement Learning AI

Big 2 is a 4 player game of imperfect information with quite a complicated action space (being able to choose to play singles, pairs, three of a kinds, two pairs, straights, flushes, full houses etc from an initial starting hand of 13 cards). The aim of the game is to is to be the first player to play all of your cards but to play the game well requires formulating a long term plan, thinking about what your opponents plans are and knowing when to play a hand and when to save a hand for later. This is my implementation of training an AI to learn the game purely via self-play deep reinforcement learning using the "Proximal Policy Optimization" algorithm. The results have been surprisingly good - my friends and I play this game A LOT every time we go on holiday and it has got to the point where it convincingly beats all of us over a decent amount of games.

If you run generateGUI.py you can play with the AI and also see the values it assigns to each state as well as the probability of choosing each option. I've also made a web app using Django so that you can play against the trained networks in a more proper setting here (it may take a while to load). Here are the rules of the game.

I wrote up the details of how I trained the network and added it to arXiv here!

big2_ppoalgorithm's People

Contributors

arturs-berzins 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.