This is a web application to play the game Dozo, a strategic game originally played on a triangular board with a
side length of 7 and involves two players. However, in this application the available configurations are limited to a maximum
side length of 10. Each player can place stones. The number of available colours depends on the game settings.
With the constrained mode, each colour has the same limited number of stones, depending on the board size. With the
unconstrained mode, each colour can be used without restriction, up to the total number of cells on the board.
The first player starts by choosing a colour and placing a stone. The next player can either continue with the same colour or
select another one, depending on the game settings. Players alternate turns throughout the game.
This project was created by Danea Hassler as part of a bachelor thesis in computer science under the supervision of
Oswin Aichholzer at
Graz University of Technology.
The User Interface with the style and the server was build upon a previous
project by Danea Hassler.
The server is written in Python 3, using the Flask
framework. The client is written in HTML and JavaScript, using jQuery.
Compatibility was tested in Safari and Firefox on macOS. The same tests were conducted on iOS, and on Windows using Firefox and
Microsoft Edge. On Linux, tests were carried out with Google Chrome and Firefox. The application is expected to work in most
modern browsers.
Basics
The AI in this game is based on a comprehensive database containing all possible board configurations and every legal move,
along with the number of half-moves required to reach a win or a loss or the information that a move leads to a draw under
perfect play.
A green number shown in a field indicates that making this move will
lead to a guaranteed win in at most that number of half-moves, assuming the winning player plays optimally. A
red number means the move leads to a certain loss in the indicated number
of half-moves, under perfect play from both players. A letter D
signifies that the move results in a draw, assuming both players play optimally.
Winning moves are always shown in green and carry
even numbers, while losing moves are marked in red and
have odd numbers. If the opponent makes a suboptimal move, an earlier win may still be possible.
Features
- Restart game: Restart the game.
- Toggle move infos: Show or hide the number of halfmoves to a win/loss or a draw.
- Recommend move: Get one of the best moves, which can be played at the time.
- Undo last move: Undo the last move to try out another one.
- Redo last move: Redo the last undone move.
- Save game: Save your current game locally in the browser.
- Load game: Load one of your saved games to continue playing.
- Delete game: Delete one of your saved games, if not needed anymore.
- AI for Player A/B: Switch the AI for player A/B on or off.
- AI Level A/B: Set the level with which the AI decides the next move.
- Perfect: The AI will choose one of the best moves to win as quickly as possible.
- Just win: The AI will choose a move that leads to a win, not necessarily the fastest.
- Random: The AI will play a random legal move.
- AI Speed: Set the speed at which the AI takes the next move.
- Game Configuration: Choose the configuration under which you want to play. Changing this settings will restart the
game.
- History: Shows the history of moves that were made.
- History Redo: Shows the history of moves that were undone.
Control info
At the beginning of the game, players enter the placement phase, during which they take turns placing one stone of
any available colour on the board.
All valid fields for placement have to be empty.
Depending on the game configuration, players may be restricted in how many stones of each colour they can place
(constrained mode) or be free to use any colour throughout the game (unconstrained mode).
The objective is to complete an equilateral triangle with three stones of the same colour. The interior of the triangle may be
filled with stones of any colour.
For more details see the rules.
Rules
Close
Rules
Dozo is an abstract strategy board game, invented by Alexander Randolph. This version offers several AI levels
and customizable game configurations to provide a challenging experience. The following section provides a complete
overview of the rules and features of this digital implementation.
Game Setup
- Dozo has an equilateral triangular board with a maximum side length of 10 cells.
- It is a two-player game.
- Each player can place stones. The number of available colours depends on the game settings:
- Constrained: Each colour has the same limited number of stones, depending on the board size.
- Unconstrained: Each colour can be used without restriction, up to the total number of cells on the board.
- The first player starts by choosing a colour and placing a stone. The next player can either continue with the same colour
or select another one, depending on the game settings.
- Player A always begins.
- Players alternate turns throughout the game.
Objective
- The goal of Dozo is to place three stones of the same colour in an equilateral triangle before the
opponent does. Triangles of any size count. The stones must form the corners of the triangle, while the interior may be
filled with stones of arbitrary colours. he winning triangle can be placed at any angle and does not have to align with
the grid orientation of the board.
Game Phase
- The players take turns placing one stone of any available colour on the board, depending on the game settings.
- Valid moves can only be made on empty cells.
End of Game
- The game ends immediately after a player places a stone that completes an equilateral triangle of the same colour.
- If the board is full and neither player has formed a winning triangle, the game ends in a draw.
AI
- The game can be played against an AI-player or one can choose two AI-players, which then can play against each other.
- You can choose between three AI difficulty levels:
- Perfect: The AI will choose one of the best moves to win as quickly as possible.
- Just win: The AI will choose a move that leads to a win, not necessarily the fastest.
- Random: The AI will play a random legal move.
- The speed with which the AI makes moves can be set with the sliding bar.
Move Evaluations
- On each valid move, a number or a letter is displayed as an evaluation.
- Green numbers (even numbers): These indicate that the move leads
to a certain win in at most that number of half-moves, assuming the winning player plays optimally.
- Red numbers (odd numbers): These indicate that the move leads to a
certain loss in that number of half-moves, assuming optimal play from both players.
- D: The move will lead to a draw assuming perfect play from both
players.
- A half-move is defined as the placement of a single stone, either by Player A or B.
Game Configurations
- Changing these settings will restart the game.
- The possible combinations of settings are automatically displayed and only the available ones can be selected.
- Board size: This sets the board size with a side length of 3 to 10 cells.
- Mode: The mode determines if a colour has unlimited or limited number of stones
- Constrained mode: The total number of stones is evenly divided among the chosen colours. Each colour
therefore has a limited supply.
- Unconstrained mode: Any colour can be played without restriction, with as many stones as there are cells
on the board.
- Colours: Up to 5 colours are available. The configuration determines how many of
them can be used in a game.
- The images below show winnings for A and B as stated. There are many more winning possibilities. These are only examples.
Triangle with A winning
|
Triangle with A winning
|
Triangle with B winning
|
Triangle with B winning
|
Other Features
- Restart game: Restart the game.
- Toggle move infos: Show or hide the number of halfmoves to a win/loss or a draw.
- Recommend move: Get one of the best moves, which can be played at the time.
- Undo last move: Undo the last move to try out another one.
- Redo last move: Redo the last undone move.
- Save game: Save your current game locally in the browser.
- Load game: Load one of your saved games to continue playing.
- Delete game: Delete one of your saved games, if not needed anymore.
- History: Shows the history of moves that were made.
- History Redo: Shows the history of moves that were undone.
Close