All Projects → masouduut94 → MCTS-agent-python

masouduut94 / MCTS-agent-python

Licence: MIT License
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 …

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to MCTS-agent-python

Alpha Zero General
A clean implementation based on AlphaZero for any game in any framework + tutorial + Othello/Gobang/TicTacToe/Connect4 and more
Stars: ✭ 2,617 (+11795.45%)
Mutual labels:  mcts, monte-carlo-tree-search
quoridor-ai
Quoridor AI based on Monte Carlo tree search
Stars: ✭ 23 (+4.55%)
Mutual labels:  mcts, monte-carlo-tree-search
Alphazero gomoku
An implementation of the AlphaZero algorithm for Gomoku (also called Gobang or Five in a Row)
Stars: ✭ 2,570 (+11581.82%)
Mutual labels:  mcts, monte-carlo-tree-search
UCThello
UCThello - a board game demonstrator (Othello variant) with computer AI using Monte Carlo Tree Search (MCTS) with UCB (Upper Confidence Bounds) applied to trees (UCT in short)
Stars: ✭ 26 (+18.18%)
Mutual labels:  mcts, monte-carlo-tree-search
Hypernets
A General Automated Machine Learning framework to simplify the development of End-to-end AutoML toolkits in specific domains.
Stars: ✭ 221 (+904.55%)
Mutual labels:  mcts, monte-carlo-tree-search
jupiter
A Monte-Carlo based AI to beat 2048
Stars: ✭ 47 (+113.64%)
Mutual labels:  mcts
godpaper
🐵 An AI chess-board-game framework(by many programming languages) implementations.
Stars: ✭ 40 (+81.82%)
Mutual labels:  mcts
awesome-probabilistic-planning
A curated list of online resources for probabilistic planning: papers, software and research groups around the world!
Stars: ✭ 45 (+104.55%)
Mutual labels:  markov-decision-processes
MyAlphaGoZeroOnConnect4
My Simple Implementation of AlphaGo Zero on Connect4
Stars: ✭ 16 (-27.27%)
Mutual labels:  monte-carlo-tree-search
deep-active-inference-mc
Deep active inference agents using Monte-Carlo methods
Stars: ✭ 41 (+86.36%)
Mutual labels:  monte-carlo-tree-search
Hierarchical-Decision-Making-for-Autonomous-Driving
Rich literature review and discussion on the implementation of "Hierarchical Decision-Making for Autonomous Driving"
Stars: ✭ 38 (+72.73%)
Mutual labels:  markov-decision-processes
lifescripts
Automating various decisions stochastically, starting with my current coin-based intermittent fasting and dice-based kettlebell.
Stars: ✭ 20 (-9.09%)
Mutual labels:  markov-decision-processes
test-data-generation
Test Data Generation
Stars: ✭ 35 (+59.09%)
Mutual labels:  markov-decision-processes
connect4
Solving board games like Connect4 using Deep Reinforcement Learning
Stars: ✭ 33 (+50%)
Mutual labels:  monte-carlo-tree-search
alphastone
Using self-play, MCTS, and a deep neural network to create a hearthstone ai player
Stars: ✭ 24 (+9.09%)
Mutual labels:  monte-carlo-tree-search
MDPN
Unified notation for Markov Decision Processes PO(MDP)s
Stars: ✭ 22 (+0%)
Mutual labels:  markov-decision-processes
LearnSnake
🐍 AI that learns to play Snake using Q-Learning (Reinforcement Learning)
Stars: ✭ 69 (+213.64%)
Mutual labels:  markov-decision-processes
ludorum.js
A board game framework, focused not on graphics or user interfaces, but on artificial players design, implementation and testing.
Stars: ✭ 13 (-40.91%)
Mutual labels:  monte-carlo-tree-search
alpha sigma
A pytorch based Gomoku game model. Alpha Zero algorithm based reinforcement Learning and Monte Carlo Tree Search model.
Stars: ✭ 134 (+509.09%)
Mutual labels:  monte-carlo-tree-search
ecole
Extensible Combinatorial Optimization Learning Environments
Stars: ✭ 249 (+1031.82%)
Mutual labels:  markov-decision-processes

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

Demo:

Demo of MCTS General Game Player

Description

This code belongs to this paper 🔗 IMPROVING MONTE CARLO TREE SEARCH BY COMBINING RAVE AND QUALITY-BASED REWARDS ALGORITHMS.

what is Monte Carlo Tree Search(MCTS)?

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.

from 🔗 A Survey of Monte Carlo Tree Search Methods

About contribution

Before you go through the details, I recommend you to get familiar with the framework reading these medium articles:

So if you are familiar with the whole concept of MCTS and UCT algorithm, you must know that in practice it suffers from sparse rewards. it takes so much time to warm up the tree with simple UCT algorithm. So in this case we first implemented the RAVE algorithm that helps warm up tree faster. then implemented several simulation strategy like Last Good Reply, PoolRAVE, Decisive Move and also UCB1-Tuned.

Then we applied quality based rewards in Quality-based Rewards for Monte-Carlo Tree Search Simulations which basically it asserts that we can apply discounted rewards by knowing the length of simulation and the maximum number of actions allowed to take in environment for each player (In some games, the game ends after limited number of moves. because there is no more movements).

After that we used HRAVE and GRAVE in the paper Comparison of rapid action value estimation variants for general game playing 2018 - Chiara F. Sironi; Mark H. M. Winands which basically states that we can use the global information of the game to guide the simulations. We also tested the leaf threading on UCT.

all of above algorithms are addressed below.

Original repo

  • MopyHex: Authored by Kenny Young here

Contributions to the original repo:

This project has a further optimized version in here which optimized by cython.

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?

Requirements

  • OS: Windows and Ubuntu
  • tkinter
  • Numpy

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:

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

References

  • [1] A Survey of Monte Carlo Tree Search Methods, Cameron B. Browne et al, 2012 Link to paper
  • [2] Generalized Rapid Action Value Estimation, Tristan Cazenave, 2017 Link to paper
  • [3] Comparison of rapid action value estimation variants for general game playing, C. Sironi, 2018 Link to paper
  • [4] Quality-based Rewards for Monte-Carlo Tree Search Simulations, 2014 Link to paper
  • [5] The Last-Good-Reply Policy for Monte-Carlo Go 2009 Link to paper
  • [6] On the Huge Benefit of Decisive Moves in Monte-Carlo Tree Search Algorithms, Fabien Teytaud, Olivier Teytaud, 2010
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].