Skáktos: a Hexapawn-inspired game.

I was thinking about the game Hexapawn this week, and during one of my classes, I designed my own version amidst my boredom.


The game runs very similarly to Hexapawn.

You play in a 4x3 grid, as opposed to Hexapawns' 3x3 grid.


You receive a knight and two pawns. You place the knight in the center of your back row, and the two pawns to the side. The knight can only move diagonally one space at a time, and can also capture pieces. The pawns can move forward one space at a time, UNLESS there is a piece on the opposite team diagonally, in which case it can move diagonally to capture it. Pawns cannot capture forward. No pieces can move backward.


To win, there must be one of three conditions met:


  • 1: all of the opponent’s pieces are captured

  • 2: There is no more space for pieces to move, in which the person who put the game into that position wins.

  • Or 3: any pawn reaches the other side of the board

  • Included with the embed, I have coded a simple AI that learns from its mistakes. It plays against you, and gradually gets better until it is all that wins, similar to the matchbox AIs of the 1960s. To make a move with the matchbox AI, a human randomly picks a bead from the matchbox corresponding to the current board state, which dictates the computer's move. After the game, the system learns: if the machine wins, beads are added to reward winning moves; if it loses, beads are removed to punish losing moves. This trial-and-error process adjusts the bead distribution, gradually teaching the AI to favor better strategies and become a strong player over the course of many games. My AI is the same thing, except it automatically does what the human would do.


    The name Skáktos comes from the greek word Skakos (Chess) and Taktos(Arrangement). Blending them together we get Skáktos!

    Below is an HTML and JavaScript version: the AI learning is toggleable, but either way, it still plays.


    Play it!