Skip to content

govizlora/optical-breacher

Repository files navigation

optical-breacher

OPTICAL BREACHER

An online Cyberpunk 2077 breach protocol minigame solver using camera + OCR
Try it here: https://govizlora.github.io/optical-breacher

All Contributors

How to "install" it as a native app

Optical breacher is a Progressive Web App which means it can be "installed" to your home screen like a native app, and used offline. It will be automatically updated whenever there is an update on the website.

iOS

  1. Open the website in Safari, and click the Share button at the bottom.
  2. Choose Add to Home Screen, and confirm by clicking Add.

Android

  1. Open the website in Chrome. For the first time visit, there should be a prompt to add it to the home screen. If you don't see the prompt, follow below.
  2. Click the three dot icon on the top right corner of the browser.
  3. Choose Add to Home screen, and confirm by clicking Add.

PC

  1. Open the website in your browser (Using Chrome as example, Edge should be the same).
  2. Click the three dot icon on the top right corner of the browser.
  3. Choose Install Optical Breacher Mk.1..., and confirm by clicking Install.

Details

The puzzle solving algorithm is basically bruteforce, with a simple pruning at sequence lenth of 6 (See #23 for details)

The target sequences are weighted from top to bottom as this: 1, 1.1, 1.2, ... So it will focus on more hit first, and when even, the lower sequences will have higher priority.

The OCR part took the most time. I initailly used the default English OCR provided by tesseract, but it fails randomly (like recognizing "55" into "5") and the success rate is below 50%. Eventually I trained the model by myself, using tesstrain. Instead of recognizing single English characters, I let the program treat the byte as a whole, so the computer actually think "55" or "1C" as a single character in a mysterious language. The self-trained model worked better, but still not perfect. TBH I think maybe tesseract is not the best option, but since it's the only popular choice in JavaScript and I'm not famailiar with WASM, this will be the way to go for now.

Local develop

Using Node.js

  1. Make sure you have node and yarn installed
  2. Clone this repo, and run yarn to install the dependencies
  3. Run yarn start. A browser window will open automatically with the app running. You can also accees the app using your phone, as long as they are under the same network.

Using Docker

You can also run the app locally with docker using this Dockerfile (thanks @ddimick). In this case, you don't need to install node or clone this repo.

Demo

Camera mode

Camera mode

Screenshot mode

Screenshot mode

Acknowledgement

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Peter Polgar

🎨

Steve-luo

🎨

Doug Dimick

🚇

This project follows the all-contributors specification. Contributions of any kind welcome!