Skip to content

ravasconcelos/Hexapawn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hexapawn – Intelligent Agent

Rodolfo Vasconcelos

SCS 3547 – Intelligent Agents & Reinforcement Learning

UNIVERSITY OF TORONTO - SCHOOL OF CONTINUING STUDIES

Instructor: Larry Simon

About the game

Hexapawn is a deterministic two-player game played on a rectangular 3×3 board. Each player begins with 3 pawns, one for each square in the row closest to them. The goal of each player is to advance one of their pawns to the opposite end of the board or to prevent the other player from moving.

This project stored in GitHub: https://github.com/ravasconcelos/Hexapawn

About the Project

This code uses the minmax agent implemented in the book "Deep Learning and the Game of Go" and it is based in the Tic-Tac-Toe implementation.

It is possible to execute the project from Jupyter Notebook or from Python classes:

How to Play:

  1. The board will be printed as below:

2. The 'O's are the Bot pawns 3. The 'X's are your pawns 4. In order to move your pawn, you have to enter a command stating the square which the pawn currently is and the which square it will move to. For example:

The command B3B3 moved the X from center botton to center middle

  1. Remember that the pawn may be moved one square forward, or it may capture a pawn one square diagonally ahead of it. A pawn may not be moved forward if there is a pawn in the next square.
  2. A player loses if he/she has no legal moves or the other player reaches the end of the board with a pawn.

Full game example:

Good luck and enjoy!

About

Python implementation of Hexapawn game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published