
Automated Learning Machine
2003-2006
Once upon a time in Technical College of Practical Engineering of Tel Aviv University.
The grass was greener and I was reading "Further Mathematical Diversions" by Martin Gardner. In this nice book I've found very simple game called Hexapawn.
https://en.wikipedia.org/wiki/Hexapawn
I remember I was deeply impressed by the fact that using matchbox and beads we can build automated learning machine. Step by step this machine can be learned to play the game. At the first stages the move is randomly selected from set of available moves according to the game rules. But each game leads either to win or lose. Machine learns how to win!
When time came to final project I decided to implement hexapawn game. Let's welcome to my little Terminator. Who knows what he has learned since then... :)
This is how main window looks like

Brief project description
​
Implemented both hexapawn (3x3 board) and octopawn (4x4) boards.
C++ programming language
Windows Operating system
Main design patterns in use
MVC when communication between components was done via Windows Messaging
Singleton to implement one instance of logger for all components.
Brief game description
​
There are two options
Human can play with ALM (there is an option to choose side)
ALM can play for both sides (blacks and whites) to speed up the learning process.
​
Learning process
As can be seen from running auto playing mode the 3x3 board requires about 21 games to be played in order to finish learning process. Once the optimal strategy is learned the first player to move always loses (whites).
​

The situation is different on 4x4 board. It requires about 2400 games to accomplish learning process. Once it's done the first user to move (whites) always wins.
