Giter VIP home page Giter VIP logo

optical-breacher's Introduction

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 govizlora#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!

optical-breacher's People

Contributors

allcontributors[bot] avatar govizlora avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.