← Einstein Puzzle

Source code

Einstein Puzzle for the browser is a JavaScript port of Einstein Puzzle 2.0 by Alexander Babichev / Flowix (© 2003–2005). The original puzzle generator, possibility elimination, and five rule classes were translated from C++ to JavaScript, preserving the original rule-application and row-deduction order. The SDL interface was replaced with accessible HTML, CSS, and JavaScript.

The port adds responsive layouts, scalable vector redraws of the original symbols, touch controls, undo and redo, local automatic saves, seeded games, hints, and Russian / English interfaces. Published November 2026. No build step or third-party runtime dependencies are required.

New games restore the original starting reveals, rule-type probabilities, deduction order, clue pruning, and limits of 24 horizontal / 15 vertical clues. Starting-card rules are not displayed as clues. Same-column pairs are stacked below the horizontal clues; original arrow artwork marks horizontal relations. Right-click sets clues aside without shifting their slots.

Native-source tests compare 4,000 rule applications and 40 complete puzzles against C++ methods extracted unchanged from the original source. URL game IDs provide browser-specific deterministic seeds; row shuffling uses the original thirty-swap approach with a portable random stream. Older saved games retain their exact previous puzzle and progress.

As in the original, placing an incorrect card or excluding the correct possibility immediately ends the game. The clock stops. The browser port also offers “ШАГ НАЗАД!” to undo the losing move and continue, alongside retry, new puzzle, and exit.

The original game, its artwork, and this derivative port are distributed under the GNU General Public License version 2 or later. See the original copyright notices. The software is provided without warranty.

All clues stay visible simultaneously, including the original maximum of 24 horizontal and 15 vertical clues. Clue cards use one uniform scale independent of the enlarged playing field, without pagination or scrolling.

To run locally: extract the complete source archive, run python3 -m http.server 8000 in its directory, and open http://localhost:8000/games/. Progress is stored only in your browser. The original 48-pixel tiles are preserved as PNG files alongside their SVG redraws.