Giter Club home page Giter Club logo

theapparatus's Introduction

The Apparatus.

The Apparatus supersedes The Machine. I decided to do the entire project again, because 1. typing in the letters of the wordgame sucked and 2. using the Arduino USB HID library sucked even more. So just under the span of four months, I took the oath of celibacy from all external dependencies and rewrote the project all entirely from scratch.

This includes writing myself the USB firmware stack, which implements the mass storage interface to automatically perform OCR on the fly. It's pretty sick, honestly. All of it was done entirely on the ATmega32U4, an 8-bit AVR microcontroller running at 16 MIPS. To achieve this, I took the approach of using the cutting edge artifical intelligence algorithm that is: comparing BMPs of the letters against the screenshot of the game and picking the close matching one. It ain't slow either (lots of clever optimizations had to be done). It only takes around 6 seconds to parse the board of the largest word game ๐Ÿš€๐Ÿš€๐Ÿš€๐Ÿš€๐Ÿš€!

Here are some demos:

Anagrams, 7 Letters, 78 words, 41900 points in 60 seconds.

Anagrams.7.Compressed.mp4

Anagrams, Russian, 26 words, 9700 points in 38 seconds.

The Apparatus is not particularly fluent in Russian which wouldn't be the case if I had a better corpus. Probably still better than you, though.

Anagrams.Russian.Compressed.mp4

Anagrams, Spanish, 45 words, 29000 points in 36 seconds.

At least it knows Spanish!

Anagrams.Spanish.Compressed.mp4

Word Hunt, 5x5, 215 words, 95700 points in 30 seconds.

WordHunt.5x5.Compressed.mp4

Word Bites, 161 words, 72300 points in 80 seconds.

The Apparatus can now even do Word Bites, a word game that The Machine didn't do before.

WordBites.Compressed.mp4

Other Notes

The Apparatus mostly uses the same design that of The Machine where it is comprised of two 8-bit AVR microcontrollers: an ATmega32U4 and a ATmega2560. The ATmega32U4 (which I call The Diplomat, because I'm not great with names) handles all the USB transactions (including the OCR) using only 2.5KB of RAM. The ATmega2560 (The Nerd) handles all the processing of the words; having two MCUs allows for multi-tasking of sorts, between handling USB transactions and processing for reproducibility of words. I used these microcontrollers because... well, they're just what I'm happened to be familiar with and had around. I probably could've used some beefy 32-bit microcontroller and have an easier time, but where's the fun in that?

The Apparatus relies on a dataset for the words in English, Russian, French, German, Spanish, and Italian. Several gigabytes worth of screenshots of each word game are also needed to generate masks for the OCR.

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.