The Dutch secret service (AIVD) has a yearly puzzle challenge around Christmas

Overview

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:

Challenge board

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:

Challenge table

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:

Solution

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:

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.

You might also like...
Rust client for AWS Infinidash service.
Rust client for AWS Infinidash service.

AWS Infinidash - Fully featured Rust client Fully featured AWS Infinidash client for Rust applications. You can use the AWS Infinidash client to make

A service for helping your cat find other cats
A service for helping your cat find other cats

Check back later! Discord Self-hosting This is an open-source service! Feel free to host you own private instances. All we ask is you credit us and li

Provides utility functions to perform a graceful shutdown on an tokio-rs based service

tokio-graceful-shutdown IMPORTANT: This crate is in an early stage and not ready for production. This crate provides utility functions to perform a gr

Ultralight, security-first service mesh for Kubernetes. Main repo for Linkerd 2.x.
Ultralight, security-first service mesh for Kubernetes. Main repo for Linkerd 2.x.

Linkerd 🎈 Welcome to Linkerd! 👋 Linkerd is an ultralight, security-first service mesh for Kubernetes. Linkerd adds critical security, observability,

Dr-dotnet - 🩺 One-click diagnosis of your dotnet applications. Works both locally or remotely as a web service

Dr-dotnet - 🩺 One-click diagnosis of your dotnet applications. Works both locally or remotely as a web service. Based on the lowest level dotnet profiling APIs and using the rust language 🦀 for a minimal runtime penalty.

Build your service-server fast, easy (and without hosting!)
Build your service-server fast, easy (and without hosting!)

service-io is a library to build servers that offering services with really little effort. Choose an input connector. Choose an output connector. Choo

mutex-as-a-service

MAAS (Mutex-As-A-Service) I honestly don't know why I made this, but here it is. Here are some docs: Api docs Api docs were generated with this: https

The ray tracer challenge in rust - Repository to follow my development of
The ray tracer challenge in rust - Repository to follow my development of "The Raytracer Challenge" book by Jamis Buck in the language Rust

The Ray Tracer Challenge This repository contains all the code written, while step by implementing Ray Tracer, based on the book "The Ray Tracer Chall

Remote Secret Editor for AWS Secret Manager

Barberousse - Remote Secrets Editor About Usage Options Printing Editing Copying RoadMap 1.0 1.1 Future About A project aimed to avoid downloading sec

This is a template to build secret contracts in Rust to run in Secret Network

Secret Contracts Starter Pack This is a template to build secret contracts in Rust to run in Secret Network. To understand the framework better, pleas

This is a 100% Rust bootloader for the nRF9160 microcontroller written for Dutch IoT Solutions

nRF9160 Bootloader for Dutch IoT Solutions This is a 100% Rust bootloader for the nRF9160 microcontroller written for Dutch IoT Solutions. Currently,

Recollection Notify you for daily, weekly, monthly and yearly events

Recollection Notify you for daily, weekly, monthly and yearly events. Usage Use recollectctl to manage the events, and run recollectd daemon to monito

The goal of this challenge is to create an isometric, decorated scene in which the character can move around the objects in the room.

The goal of this challenge is to create an isometric, decorated scene in which the character can move around the objects in the room.

A fun rust terminal program so you can make Christmas trees!
A fun rust terminal program so you can make Christmas trees!

Xmastree 2021 A fun christmas tree where you can add ornaments! Then, you can export the file into either: a rust file a txt file About Taking a break

A LED Christmas Tree controlled by Rust. Contribute your own renderers!
A LED Christmas Tree controlled by Rust. Contribute your own renderers!

Rusty Christmas Tree This is code that draws on the LED Christmas Tree made by @aidancrowther. You can see his 3D design files and Pi Pico setup code

Shuttle.rs Christmas Code Hunt 2023

🚀 Shuttle.rs Christmas Code Hunt 2023 Submissions 🎄 These are my submissions for the Christmas Code Hunt hosted by shuttle.rs This is using a custom

ZeroNS: a name service centered around the ZeroTier Central API

ZeroNS: a name service centered around the ZeroTier Central API ZeroNS provides names that are a part of ZeroTier Central's configured networks; once

Tool to view and solve puzzles from the lichess puzzle database
Tool to view and solve puzzles from the lichess puzzle database

offline-chess-puzzles Tool to view and solve puzzles from the lichess puzzle database. It's a very simple tool for those who want to practice offline,

A puzzle game where you eat your own tail to win!

taileater taileater is a puzzle game available for free here: https://szunami.itch.io/taileater This project is built using Rust and Bevy. Assets were

Owner
Tim Visée
On GitLab: https://gitlab.com/timvisee
Tim Visée
Shuttle.rs Christmas Code Hunt 2023

?? Shuttle.rs Christmas Code Hunt 2023 Submissions ?? These are my submissions for the Christmas Code Hunt hosted by shuttle.rs This is using a custom

null 4 Dec 7, 2023
Wait Service is a pure rust program to test and wait on the availability of a service.

Wait Service Wait Service is a pure rust program to test and wait on the availability of a service.

Magic Len (Ron Li) 3 Jan 18, 2022
This article is about the unsound api which I found in owning_ref. Owning_ref is a library that has 11 million all-time downloads and 60 reverse dependencies.

Unsoundness in owning_ref This article is about the unsound api which I found in owning_ref. Owning_ref is a library that has 11 million all-time down

Noam Ta Shma 20 Aug 3, 2022
Ferris has to escape the creepers using a modified version of Dijkstra called A*

Ferris has to escape the creepers using a modified version of Dijkstra called A*

Security Union 13 Oct 30, 2022
Keyscope is a key and secret workflow (validation, invalidation, etc.) tool built in Rust

✅ Automate your key and secret validation workflows ?? Over 30 different providers ?? Export to JSON, audit via CSV ?? Keyscope Keyscope is a key and

null 364 Dec 22, 2022
Utilities and tools based around Amazon S3 to provide convenience APIs in a CLI

s3-utils Utilities and tools based around Amazon S3 to provide convenience APIs in a CLI. This tool contains a small set of command line utilities for

Isaac Whitfield 47 Dec 15, 2022
Fast, compact and all-around subdomain enumeration tool written in Rust

Fast, compact and all-around subdomain enumeration tool written in Rust, which uses dns bruteforce, internet search and recursive http content search.

foreseon 16 Dec 10, 2022
Thin wrapper around [`tokio::process`] to make it streamable

This library provide ProcessExt to create your own custom process

null 4 Jun 25, 2022
prelate-rs is an idiomatic, asynchronous Rust wrapper around the aoe4world API. Very much a WIP at this stage.

prelate-rs is an idiomatic, asynchronous Rust wrapper around the aoe4world API. Very much a WIP at this stage. Project Status We currently support the

William Findlay 4 Dec 29, 2022
A Wasm component optimizer (mostly a wrapper around wasm-opt)

component-opt An optimizer for Wasm Components Current Status This project currently only offers one optimization and does not allow it to be configur

Robin Brown 6 Mar 4, 2024