/MCTS-agent-python

Monte Carlo Tree Search (MCTS) is a method for finding optimal decisions in a given domain by taking random samples in the decision space and building a search tree accordingly. It has already had a profound impact on Artificial Intelligence (AI) approaches for domains that can be represented as trees of sequential decisions, particularly games and planning problems. In this project I used a board game called "HEX" as a platform to test different simulation strategies in MCTS field.

Primary LanguagePython

Monte-Carlo-Tree-Search-Agent-for-the-Game-of-HEX

Demo:

Demo of MCTS General Game Player

Description

This is the code for my paper 🔗 IMPROVING MONTE CARLO TREE SEARCH BY COMBINING RAVE AND QUALITY-BASED REWARDS ALGORITHMS.

the base code is developed by kenny young in here and I further implemented the gui and some simulation algorithms.

This project is further optimized in here

Researches have been done in Urmia University of Technology.

Authors:

  • Masoud Masoumi Moghadam (Me 😎)
  • Prof: Mohammad Pourmahmood Aghababa profile
  • Prof: Jamshid Bagherzadeh profile

What is monte carlo tree search anyway?

MONTE Carlo Tree Search (MCTS) is a method for finding optimal decisions in a given domain by taking random samples in the decision space and building a search tree according to the results. It has already had a profound impact on Artificial Intelligence (AI) approaches for domains that can be represented as trees of sequential decisions, particularly games and planning problems. In this project I used different simulation strategies to enhance the agent policy to explore the environment.

Requirements

  • OS: Windows and Ubuntu
  • tkinter
  • Numpy

Another implementation boosted with Cython and C wrappers can be found in here:

🔗 Monte Carlo Tree Search boosted with cython

How to run it? 🏃

You can 🏃 (run) program using this command:

python main.py

Also you can run tests for comparing two mcts-based algorithms against each other using the playtest.py.

📕 To know more about MCTS:

This one is highly recommended:

🔗 A Survey of Monte Carlo Tree Search Methods

Algorithms used for boosting MCTS in this framework:

  • Upper Confidence Bounds (UCT)
  • UCB1-Tuned
  • Rapid Action Value Estimation (RAVE)
  • Decisive Move
  • Quality Based Rewards
  • Pool RAVE
  • Last Good Reply