Rating: 4.0

The python code provided allows you to make a single move then it makes some predefined moves. The goal was a bit confusing to me at first as I wasn’t sure if they wanted the position of the king after the first move only (assuming it survided) or its final position regardless. It was the latter.

I tweaked the code a bit so that it tries all the possible (wrong) moves that would matter, which are the king’s. So basically:

1. Make king move from e1 to X (64 possible combinations [a-h][1-8]).
2. Let bot make moves.
3. If king survived after those moves, add its position to a set list.

Code: <https://github.com/abatchy17/abatchy17.github.io/blob/a5bc614b2fb353f9c645e437696151096c7f9202/code/buggybot.py>

Output: `d1;d2;d3;d4;d5;d6;d7;h7;a8;b8;c8;d8;e8;f8;g8;h8`

The flag is `DCTF{sha256(positions)}` = `DCTF{1bdd0a4382410d33cd0a0bf0e8193345babc608ea0ddd83dccbcb4763d67c67b}.`

Abatchy

Original writeup (http://www.abatchy.com/2017/10/defcamp-buggy-bot).