Friday 24 April 2020

Challenge accepted ! Build a Machine Learning Model to play Board Game

This board game is one of the games that I used to play and I'm still playing with my friends when I have time. Being a very popular board game in Eastern Europe, I have decided to do something different more exactly to build a robot or machine learning model to play this game.
Being influenced and have study case AlphaGo a computer program developed by DeepMind Technologies.  In 2017 AlphaGo shock the world by beaten the best Go chinese players . Go is a very popular game in China is about strategy and was invented 2,500 years ago. For China the defeat of their best players was a huge humiliation that was given by US. Since than The Chinese Communist Party has settled that by 2030 to be the leading power in artificial intelligence.

Ken Jie a chinese guy who has never beaten by a computer in Go game said he had "an horrible experience .  The next question we should ask our self is how AlphaGo did this ?
The reality is very simple the computer programs have always beat humans , that happen with Garry Kasparov. The secret of AlphaGo were deep neural networks , containing million of connections similar to the neurons of the brain.

Back to our example the rules of the Board Game are simple for this game you need a pair of dice and game chicks. In the above picture you have an image of how the game looks. Let's say you are with white chicks , you need to come with all your white and put them in the right side at the bottom and after than you start to clean the place, the winner is the first who finish.

In the process of building the model I will use machine learning which is sub field of artificial intelligence , linear algebra, probabilities and as programming language Python.
Machine learning models can have more methods depending of what type of problems you want to solve. This methods can be:

  • Supervised Learning
  • Unsupervised Learning
  • Semi-supervised learning
  • Reinforcement learning
In our case I will gone use reinforcement learning.

Reinforcement Learning

The reason why we use reinforcement learning is that we have an robot that we want to train over a period of time to interact with an environment in our case the board game and improve is performance over a period of time with actions performed by the environment (board game) . The first step is to teach the robot with rules of the game. Being familiarized by the rules and strategies of the game the robot start to become smarter and familiar with the game.

The main steps of the reinforcement learning:

  • Train the robot with rules and policies
  • Select optimal policy and perform action
  • Get corresponding reward(penalty)
  • Update policies if needed
  • Repeat steps until the robot learn most policies

No comments:

Post a Comment