breacher 0.1.0

Suggested Alternatives

breach

Additional Details

breacher has been renamed to breach

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global breacher --version 0.1.0                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local breacher --version 0.1.0                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=breacher&version=0.1.0                
nuke :add-package breacher --version 0.1.0                

breacher

A puzzle solver for the Cyberpunk 2077 breacher minigame.

Dotnet Test

You can now use this CLI to solve Breacher puzzles!

Install with dotnet

  1. Install the dotnet CLI (.NET SDK 5.0.101)
  2. Install with dotnet
    dotnet tool install --global breacher
    

Using the tool

Manual entry on the cli

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

Input File

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

Piping from stdin

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.)

Puzzle Input Format

<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

Solution Format

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

Run/build from source

  1. Install the dotnet CLI (.NET SDK 5.0.101)
  2. Install Git for your operating system.
  3. Open a terminal and clone this repo.
    git clone https://github.com/kyle-rader/breacher.git
    
  4. cd into the repo.
  5. Compile the program
    publish.cmd
    
    This will make a folder called dist in which you will find the self-contained executable. You can then run it via
    dist\breacher.exe
    

Future Work

  • 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.

Closing Notes

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!

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.3.0 934 12/19/2020
0.2.0 854 12/19/2020
0.1.0 747 12/18/2020