Skip to content

implement neural net and GUI for a board game Baghchal

Notifications You must be signed in to change notification settings

sarojadhikari/TigerNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TigerNet

A program to train a simple neural net for the Tiger player of the boad game Baghchal.

The neural net training is implemented using PyTorch. A simple GUI is implemented using PySide6.

Trained models can be saved as onnx models using torch.onnx and loaded using onnx web runtime to run the models on web applications. One such saved model is deployed using onnx web runtime at https://sarojadhikari.github.io/TigerNet/.

Dependencies

  • PySide6, for GUI
  • PyTorch 2.0, for implementing and training the Convolutional Neural Network for AI game play
  • torch.onnx: for saving trained models in the onnx format
  • numpy, for array and mathematical operations

Screenshot

A screenshot of TigerNet GUI is given below. Red circles are Tiger players (which is moved by the neural net that we call TigerNet) and the blue circles Goat players which is played by a user. Initially the TigerNet has random parameters. After few rounds of training on random games (through the Train button), a noticable improvement in the TigerNet's game play can be observed.

Screenshot of TigerNet GUI

The first 20 moves of the goat player are placing pieces on empty locations on the board. A tiger pice (red) can jump over a goat piece (blue) to an empty board location along a board line and kill the goat. The goat player wins if all the valid movements of the tiger player are blocked.

About

implement neural net and GUI for a board game Baghchal

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages