reconchess is a webapp to play Reconnaissance Blind Chess (RBC) games against the computer or other players.git
RBC is a chess variant designed to spice up the tradional game by adding a certain amount of uncertainty and explicit sensing. These are the fundamental differences:
- Players cannot explicitly see their opponent's piece in the default configuration.
- Before making any move, the player whose turn it is performs a sensing: selecting a 3x3 area on the chess board to discover. The discovered area reveals if any enemy chess piece is in that zone, and by consequence, reveals to the player their position on the board. The opponent remains unaware of where the sensing is performed.
- When a player captures, they are informed of the actual action, but without specifying which piece has been taken.
- If a player tries to move a piece diagonally (bishops, for example) but there is an opponent's piece on the path, the capture is made and that piece stops on the square where it took place.
- If a player attempts to make an illegal move, such as moving a pawn diagonally to an empty square (i.e. without capture), or castling through a piece that is not allowed, they are informed that the move is invalid and their turn ends. Players need to keep attention to that or they'll quickly lose.
- Castling is always possible, even if a player is technically in check, as they do not have complete information of the pieces position on the board.
- Players can pass the turn without making a move. Nevertheless, a player can sense and then pass.
- The 'check' concept is practically nonexistent, as players may not be aware of the positions that would result in a check in a traditional game.
- A players wins by capturing the enemy king or when the opponent runs out of time.
- Each player starts with 15 minutes to make their moves (sensing + moving the piece) and gains 5 seconds after their turn.
- A game is automatically declared a stalemate after 50 turns without a pawn move of capture. Players should consider that this is an actual possible strategy to pursuit.
RBC is a chess variant designed by Johns Hopkins Applied Physics Laboratory (JHU/APL) and most of the resources of the games (e.g., StrangeFishv2) comes from them.
The design, development and deployment followed agile principles.
- Patrick Alfieri | @hyspxt | patrick.alfieri@studio.unibo.it | PO
- Davide Luccioli | @sgrunf | davide.luccioli@studio.unibo.it | Scrum Master S0/S1/S3/S4 | Backend Developer
- Kaori Jiang | @Kmoon7 | kaori.jiang@studio.unibo.it | Frontend Developer
- Sofia Zanelli | @Sofy_zan | sofia.zanelli3@studio.unibo.it | Frontend Developer
- Giulia Torsani | @giulia-t | giulia.torsani@studio.unibo.it | Scrum Master S2 | Backend-db Developer
To install the required Python dependencies, you can use a Python virtual environment (venv) to isolate project dependencies (recommended!), but it is not strictly required. If you prefer, you may install the dependencies directly into your system Python environment.
To use a virtual environment, run:
git clone https://github.com/hyspxt/reconchess.git
cd reconchess
python -m venv venv
source venv/bin/activateThen, install the dependencies with:
pip install -r /code/backend/requirements.txtBuild the containers:
docker-compose buildApply database migrations:
docker-compose run --rm django sh -c "python manage.py migrate" Start all services:
docker-compose upThis will start the server and all of its applications (the dependencies you installed before).
To serve the reconchess webapp, we used Caddy as a web server and reverse proxy. Below is a basic example of a Caddyfile configuration to proxy requests to your Django backend running on port 8080.
localhost:8080 {
root * /reconchess/code/frontend/
encode gzip
file_server {
index home.html
}
tls internal
handle /api/* {
reverse_proxy /* https://127.0.0.1:8000
}
route /static/* {
uri strip_prefix /static
root * /reconchess/code/backend/django/static
file_server
}
}Caddy must be first be installed (with pacman -S caddy or similar, depending on your distro). Then, a basic Caddyfile config will be created and placed in /etc/caddy. You can modify that the given example or however you prefer.
The webapp will then be available at http://localhost:8080 by default.
cheers, hys 🎴