This is a web application to play the game Hexapawn which is a variation of chess, where each player only has their backrow full of pawns, which can either move one square forward to a free square or capture an opponent's pawn that is one square away on its diagonal. The first player to get one of their pawns into the enemy backline wins. If a player has no more legal moves left, they lose.
This project was developed by Marvin Gutgesell as a bachelor thesis for computer science, supervised by Oswin Aichholzer, at Graz University of Technology. The java server and the webapp are based on a project by Christoph Reinisch.
The server is written in Python, using Flask. The client is written in HTML and JavaScript, using jQuery. Compatibility was tested in Chromium and Mozilla Firefox running on Linux, Android and Windows. Nevertheless the application should be compatible with any browser like Microsoft Internet Explorer.
The AI of this game is based on an exhaustive evaluation of all possible game positions stored in a large data base. For each possible board its status (current player win, opponent player win) is known, as well as as the maximum number of half moves needed to force a win from this board. A green even number shows in how many further half-moves the game can be won by taking this move (assuming optimal play of the opponent, otherwise you can win faster). A red odd number shows the maximum number of half-moves you can delay the victory of the opponent (again assuming optimal play of the opponent). So an even number shows a winning move, which guarantees a win for the current player (when continuing to play optimally) in at most this number of half-moves. An optimal winning move is a move which guarantees the shortest available sequence of half-moves till the player wins.
Click on a selected piece a second time to deselect it.
Click on a cell of the matrix to change the dimensions of the board. Dimensions cannot be changed after the game has started.