Skip to main content

Neural Nine Men's Morris

If you use this software as part of any work, please cite it as:

F. Chesani, A. Galassi, M. Lippi and P. Mello, "Can Deep Networks Learn to Play by the Rules? A Case Study on Nine Men's Morris," to be published in IEEE Transactions on Games, doi: 10.1109/TG.2018.2804039

The accepted version of this work (post-print) can be found here (bottom of the page).

 

NNMM logo

Introduction

Neural Nine Men's Morris (NNMM) is a software capable to build, train, test and use Deep Neural Networks which can be used for playing the game of Nine Men's Morris.
It has been demonstrated that the system is capable to learn to play by the rules of the game, even if the knowledge of those rules has not been provided to it.

It has been designed by Andrea Galassi, as part of his master thesis in Computer Science Engineering ("Ingegneria Informatica", in italian), and it has been improved as part of a successive work, that will be published in the journal IEEE Transactions on Games.

Please feel free to contact the authors of this work for further questions: Andrea Galassi (a.galassi *at* unibo.it), Paola Mello (paola.mello *at* unibo.it), Federico Chesani (federico.chesani *at* unibo.it).

For further information, a link to Andrea's master thesis is available at the bottom of the page among the useful resources.

 

Software and implementation

The software is under the MIT License and is available here: NNMM.

The system has been written in Python language, relying on the Lasagne, Theano and Numpy libraries.

 

NNMM architecture

System Architecture

NNMM relies on 3 neural networks to decide the move to make. Each network is dedicated to the choice of one of the three parts of the final move.

These parts are:

  • TO (T): where the checker will be placed
  • FROM (F): what checker will be moved
  • REMOVE (R): what adversary's checker will be removed.

The system is designed to allow whichever configuration of the three decisions. In the image is depicted the system workflow with a TFR configuration.

 

Training and Testing results

NNMM has demonstrated to be able to learn to play by the game rules without having knowledge about them.

The configurations of the system has been trained (TFR, FTR and RFT) on the Matches Dataset and successively tested on the same dataset and on the State Dataset. Both dataset are available here: Nine Men's Morris Good Moves Dataset.

The accuracy scores on the Matches Dataset have been about 37%.

All the configurations, tested on both dataset, have been able to suggest a legal move (a move that follows the rules of the games) in more than the 99% of cases.

 

Useful  free resurces