Giter Club home page Giter Club logo

poker-mcts's Introduction

NLTH Poker Agent using Monte Carlo Simulation

Monte Carlo Tree Search or short MCTS is a simulation based search algorithm that can be used to solve extensive-form games with imperfect information. Complex games like NLTH have a large number of states due to the element of chance and the number of opponents. Instead of searching the complete state space (which is intractable) MCTS only samples one possible outcome per iteration. As the number of iterations increases, the true value of a state can be approximated. MCTS is a anytime algorithm which means that the computation can be interrupted at any time to retrieve a valid result (or a approximation of it if not enough iterations have been performed.) The search is performed on a tree containing the following types of nodes:

Root node is the start of the tree. The node represents the state we want to evaluate.

Action nodes are nodes in which the same player has to make a decision as in the root node.

Opponent nodes represent the opposing players decisions.

Terminal nodes represent either nodes in which the game ended by folding by all but one player or by going to a showdown.

Chance nodes are used in places where chance makes a move (draw a card).

Each iteration begins at the root node and recursively selects children according to a selection strategy that chooses which action to take. If the state for the selected action does not exist, the last state is expanded and it’s children are added to the tree before continuing the selection until a terminal history is reached. This history is then evaluated according to a simulation strategy that calculates the expected value. In the final step of the iteration the calculated value is propagated back up the tree by an backpropagation strategy. After a certain amount of time or number of predefined iterations a final move strategy selects the actual actions to play from the root node.

Requirements

  • Clang (For C++11 support)
  • UnitTest++ for tests (expects headers and lib to be in /usr/{lib,include})

Installation

  • Clone repository:
$ git clone --recursive https://github.com/pandaant/poker-mcts
  • Download HandRanks.dat and save it as poker-mcts/handranks.dat
  • Build agent library:
$ cd poker-mcts
$ make all
  • build the documentation:
$ make doc

A compiled version of the doxygen documentation can be found here

  • run the tests:
$ cd test
$ make all run

Usage

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.