Insane Bolt
Insane Bolt
tl;dr
A game where we have to find the shortest path to the diamond without touching the mines, and do it 500 times
Initial Execution
Connecting to the server with netcat, we see the following:

The instructions are pretty clear. We get the board and we have to reach the diamond in the shortest path possible. We have to collect 500 diamonds so obviously we have to run this 500 times. Let's try the game out:

We attempt to solve the first game:

And this will continue on for 500 times. Let's use python instead of writing this by hand:
# solve.py
# define emote hexs
= b
= b
= b
= b
= b
=
= 0
= 0
# run game loop
=
# parse game board
=
=
= 0
= 0
= -1
= 0
=
=
=
= 0
# parse emotes in current line
=
=
= - 1
= + 1
= + 1
# remove empty arrays
=
=
= + +
=
# solve current board
# if out of bounds
return 9999
=
# if stepping on fire or mine
return 9999
# finally reached the diamond, exit recursion
return 0
= 9999
= 9999
= 9999
# try right
=
# try left
=
# try down
=
# return shortest path of above three
return + 1
=
= + 1
= +
break
Hopefully the comments are self explanatory, but in short:
- We parse the current game board
- We start at the player starting point
- For each block we are on, we recursively check all adjacent blocks
- If the block we are checking right now is either out of bounds or a mine/fire, we return 9999 to mark that path as very long
- Once the diamond is reached, we return 0 and compare all paths, returning the shortest
- Once the board is solved, send the solution and increase number of collected diamonds and wrenches
- Jump to 1 till we have atleast 500 diamonds and 5000 wrenches
After solving 500 of them, we get the following:
