A puzzle solver for the Cyberpunk 2077 breacher minigame.
You can now use this CLI to solve Breacher puzzles!
- Install the dotnet CLI (.NET SDK 5.0.101)
- Install with
dotnet
dotnet tool install --global breacher
Enter input manually by running the program with no arguments. e.g.
$ dist\breacher
You have opted to enter your puzzle manually. Enter your full puzzle input now.
End your input with a single q at the end to finish entry and begin solving.
4
1 2 3
1 2 3
1 2 3
1 1 2
1 2 2
q
Found solution with weight 3 length: 4
[ 1, 1 ] (1)
[ 2, 1 ] (1)
[ 2, 2 ] (2)
[ 1, 2 ] (2)
Solved in 22.69 ms
Enter input with an input file. The input file should not have a q
at the end.
$ dist\breacher input.txt
Reading input from input.txt
Found solution with weight 3 length: 4
[ 1, 1 ] (1)
[ 2, 1 ] (1)
[ 2, 2 ] (2)
[ 1, 2 ] (2)
Solved in 22.69 ms
Enter input by pipeing from stdin. The input file should not have a q
at the end.
$ type input.txt | dist\breacher
Reading input from standard in.
Found solution with weight 3 length: 4
[ 1, 1 ] (1)
[ 2, 1 ] (1)
[ 2, 2 ] (2)
[ 1, 2 ] (2)
Solved in 22.69 ms
(The |
(vertical bar) is what we call the pipe operator.)
<buffer-size: single digit>
<blank-line>
<puzzle: one row per line>
<blank-line>
<targets: one per line>
For example see the demo puzzles.
Puzzle 01.txt
is:
7
1c 55 ff bd e9
bd 1c e9 ff e9
55 bd ff 1c 1c
e9 bd 1c 55 55
55 e9 bd 55 ff
e9 55
55 bd e9
ff 1c bd e9
55 1c ff 55
Right now the solution chain is just printed from start to finish, with the coordinates and values. (TBD print as matrix to make it easier to follow).
The coordinates (a.k.a indeces) work as follows (using puzzle 40)
1 2 3 4 5 <-- columns
1 1c bd 55 55 1c
2 bd 55 1c bd 55
3 1c 1c 1c e9 55
4 bd bd 1c bd e9
5 1c 55 bd 55 1c
^
\
Rows
The output (on Windows) for puzzle 40 looks like:
type puzzles\40.txt | dotnet run -p Breacher
Found solution with weight 5 length: 6
[ 1, 3 ] (55)
[ 2, 3 ] (1C)
[ 2, 4 ] (BD)
[ 1, 4 ] (55)
[ 1, 2 ] (BD)
[ 4, 2 ] (BD)
Solved in 26.64 ms
- Install the dotnet CLI (.NET SDK 5.0.101)
- Install Git for your operating system.
- Open a terminal and clone this repo.
git clone https://github.com/kyle-rader/breacher.git
cd
into the repo.- Compile the program
This will make a folder called
publish.cmd
dist
in which you will find the self-contained executable. You can then run it viadist\breacher.exe
- Print the solution visually to make it easier to follow.
- Build GUI to allow pasting screen shots and parse puzzle input using ML for ultimate laziness.
I found this to be one of the more interesting mini game puzzles in a video game. Programming a solution was simply out of interest and for fun to check myself. The mini-game is to emulate "hacking" so I don't feel bad about actually "hacking" the game ;)
Suggestions welcome. Feel free to open a pull request!