AIVD kerstpuzzel 2021 18 solver
The Dutch secret service (AIVD) has a yearly puzzle challenge around Christmas, called the 'AIVD kerstpuzzel'.
This repository holds a solver for challenge 18 of 2021.
Challenge
Challenge description (in Dutch): ./challenge.pdf
Here's a rough translation of the challenge:
The following board position is given:
This consists of two boards connected together. Both boards have the same challenge: mate in two with black to move.
The given board position is incomplete however, you must add additional pieces on it to satisfy the following table with file/rank sums:
The complete board has the following pieces: k, k, q, q, b, b, n, r, r, p, p, p, p, p, p, p, p, p, p, p, en K, K, Q, Q, B, N, R, R, R, R, p, p, p, p, p, p, p, p, p, p, p.
With the complete board position, find the moves for mate in two with black to move. The moves must fit the following algebraic notation:
1... ???+ 2. ?x?? ???#
.To solve the puzzle, find the board position (FEN notation) and the moves to play on both boards for mate in two using the notation format above.
Find all challenges for 2021 here.
Solution
The solver finds 8 possible board positions in about a minute, all with the same set of moves for mate in two:
Note that the printed solution is in a slightly different format than given by the puzzle. I simply changed this by hand, as the actual solution is the same.
Find all 8 solutions in: ./output.txt
Requirements
To run this project, make sure you have:
- Rust: https://rustup.rs/
- Stockfish: https://stockfishchess.org/
On Ubuntu, use:
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install stockfish
apt install stockfish
Usage
Once you meet the requirements, simply run the project through Rust's cargo
and watch the output:
# Clone the project
git clone https://github.com/timvisee/aivd-kerstpuzzel-2021-18-solver
cd aivd-kerstpuzzel-2021-18-solver
# Compile and run
cargo run --release
License
This project is released under the MIT license. Check out the LICENSE file for more information.