@@@@@@@\ @@\
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀@@ __@@\ @@ |
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡈⢯⡉⠓⠦⣄⡀⠀⠀⠀⠀⠀ @@ | @@ | @@@@@@\ @@ | @@\ @@@@@@\ @@@@@@\ @@\ @@\ ⠀
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣉⠹⠷⠀⠀⠀⠙⢷⡀⠀⠀⠀⠀@@@@@@@\ | \____@@\ @@ | @@ |@@ __@@\ @@ __@@\ @@ | @@ |
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠞⠀⠀⠀⠀⠀⠀⠀⢿⡇⠀⠀⠀ @@ __@@\ @@@@@@@ |@@@@@@ / @@@@@@@@ |@@ | \__|@@ | @@ |
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⢈⡇⠀⠀⠀ @@ | @@ |@@ __@@ |@@ _@@< @@ ____|@@ | @@ | @@ |
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠹⠝⠀⠀⠀⠀⠀⣼⠃⠀⠀⠀ @@@@@@@ |\@@@@@@@ |@@ | \@@\ \@@@@@@@\ @@ | \@@@@@@ |
⠀ ⠀⠀⠀⠀⠀⠀⠀⣠⠞⠀⣀⣠⣤⣤⠄⠀⠀⢠⡏⠀⠀⠀⠀\_______/ \_______|\__| \__| \_______|\__| \______/
⠀ ⠀⠀⠀⠀⠀⠀⠚⠢⠼⠿⠟⢛⣾⠃⠀⠀⠀⢸⡇⠀⠀⠀
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⣻⠃⠀⠀⠀⠀⢸⡉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀.@@ @@: @@@ -
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⣰⢻⡷⠁⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀ @@+ @@ @@# @@% @@@@@@@@@@@-
⠀ ⠀⠀⠀⠀⠀⠀⠀⢰⢽⡟⠁⠀⠀⠀⠀⠀⠀⠀⣇⠀⠀⠀⠀⠀⠀⠀⠀ @@* @@ #@- -@@ @@% =@@@
⠀ ⠀⠀⠀⠀⠀⠀⠀⢾⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡆⠀⠀⠀⠀⠀⠀:@@@= @@ .@@@@. %@@ #@@@@@@@@@@: :@@%
⠀ ⠀⠀⠀⠀⠀⠀⠀⢸⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡀⠀⠀⠀ #@@@@= @@@@@: %@# @@% :@@@@@@@@@@:
⠀ ⠀⠀⠀⠀⠀⠀⠀⠘⢧⣳⡀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣷⠀⠀⠀⠀ # %@= @@: %@* @ @@% :@@@%-. +@@@
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠈⣷⣱⡀⠀⠀⠀⠀⣸⠀⠀⠀⠈⢻⣦⠀⠀⠀⠀ %@= @@ %@@@@: @@# @@@- :. =@@
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣷⡙⣆⠀⠀⣾⠃⠀⠀⠀⠀⠈⢽⡆⠀⠀⠀ %@= @@ @@ *@@@ @@@ : @@@%@@@. %@@
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡇⢷⡏⠃⢠⠇⠀⠀⣀⠄⠀⠀⠀⣿⡖⠀⠀ %@= @@- #@# @@# *@@@ @@+ %@@@@@
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡇⢨⠇⠀⡼⢀⠔⠊⠀⠀⠀⠀⠀⠘⣯⣄⢀ %@= -@@@@@@@@ @@. -@@@@@@=
⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⡇⣼⡀⣰⣷⠁⠀⠀⠀⠀⠀⠀⠀⠀⣇⢻⣧⡄
⠀ ⠀⠀⠀⠀⠀⠀⣀⣮⣿⣿⣿⣯⡭⢉⠟⠛⠳⢤⣄⣀⣀⣀⣀⡴⢠⠨⢻⣿ Version 3.2.1
⠀ ⠀ ⢀⣾⣿⣿⣿⣿⢏⠓⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢨⣿
⠀ ⣰⣿⣿⣿⣿⣿⣿⡱⠌⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢭⣾⠏ Tauri Application by @willnjohnson
⣰⡿⠟⠋⠛⢿⣿⣿⊊⠡⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⢀⣠⣼⡿⠋⠀
⠋⠁⠀⠀⠀⠀⠈⠑⠿⢶⣄⣀⣀⣀⣀⣀⣄⣤⡶⠿⠟⠋⠁⠀⠀⠀ Written in Rust (inspired by C algorithm by Kvho)
Bakeru (化ける), meaning "to transform" in Japanese, is a modern Tauri Application designed to help solve the Neopets game Shapeshifter. It features a Rust backend supplied with a low-level, pointer-optimized backtracking algorithm, paired with a clean React-based user interface.
Originally, when I built this tool, it was built as a Windows-only Visual Studio C# application. While functional, the interface was clunky and difficult to maintain. And the application was not cross-platform. This complete rewrite into the Tauri ecosystem provides that support, a more responsive UI, and improved solving speeds.
Important
Please add this GreaseMonkey script to your GreaseMonkey/TamperMonkey extension for browser convenience, which will:
- Help quickly extract puzzle data with a "Copy HTML" button.
- Provide visual symbol replacement to match the solver's clean interface.
No need to install any dependencies. Just a simple installation:
| Windows | Linux | macOS |
|---|---|---|
Official releases for Windows, Linux, and macOS can be found under the Releases section.
Enregistrement.de.l.ecran.2026-02-20.070021.mp4
- Fast HTML Parsing: Instantly extracts the grid state and token shapes from the Neopets source code.
- Native Performance: Core solver implemented in Rust using raw pointers and aggressive optimization profiles, with better performance to the original C implementation.
- Asynchronous Solving: The solver runs on a separate thread, keeping the UI fluid and responsive even during multi-minute searches for high-level puzzles.
- Progressive UI: Visual board preview that updates with your progress through the solution steps.
- Symmetry Pruning: Detects equivalent tokens to avoid redundant search permutations, critical for levels 40+.
-
Grid Layout: The
$M \times N$ board containing various token types. - Token Sequence: The specific set of puzzle shapes provided by the game for the current level.
- Goal: The specific token type (usually swords) that all cells must match to win.
- Launch the Bakeru application.
- Paste the HTML source of your current Shapeshifter puzzle into the input area.
- Click "Solve" to begin the process.
- Follow the Solution Steps provided. You can check them off as you go.
- Hover over or click a step to see the placement highlighted on the board preview.
Tip
If a puzzle seems impossible or the search is taking too long, lose the game on purpose to generate a new grid and try again!
Results are displayed in the "Solution Steps" sidebar. Each step is zero-padded (e.g., Step 01:) and provides coordinates in Row Y, Col X format. The main board view allows you to visualize the current state of the puzzle as you apply each step.
Throughout its development, this project has explored several search strategies to conquer the Shapeshifter puzzle:
- Recursive Depth-First Search (DFS): The fundamental approach, exploring every possible placement sequence.
- A-Star & IDA-Star (Iterative Deepening A-Star): Guided search using the number of non-goal cells as a heuristic. While robust, these often suffered from high memory usage or redundant re-explorations.
- The Chosen Approach: Optimized Backtracking with Symmetry Pruning:
- Low-Level Rust Implementation: Uses raw pointers to achieve performance parity with original C solver.
- In-Place State Toggling: Modifies the grid state directly and reverses changes during backtracking to avoid expensive allocations.
- Pruning: Aggressively prunes branches using a "toggle budget" and by identifying equivalent token shapes to skip redundant permutations.
- ShapeShifter algorithm: Dr. Plank's lab writeup explanation
- A-Star Heuristic search: CMU AI Course PDF
- Lights Out: Solutions Using Linear Algebra: Madsen Lights Out PDF
- She Who Shapes: Historical Shapeshifter Resource
The app has evolved through a couple iterations:
- Version 1 (C#) – The backtracking and pruning algorithm was written entirely in C#. Performance was slow for larger inputs.
- Version 2 (C DLL) – Ported Kvho’s code to a C DLL and integrated it into the C# app, improving speed significantly.
- Version 3 (Rust + Tauri) – Reimplemented Kvho’s 532-line algorithm in Rust (199 lines excluding comments and whitespace) and integrated it into a Tauri app.
Left: Tauri app using Rust (18.51s) v.s. Right: Visual C# app using C DLL (~24-25s)
On level 48, the Rust implementation yields an additional ~6 seconds of improvement over the C DLL version, quite a noticeable speedup while reducing code size.
Note: This is by no means a full benchmark. However, from my experience, this Rust implementation is faster.
Special thanks to Kvho for the highly optimized DFS backtracking logic implemented in C, the inspiration for the now robust Rust port.
This project is open-source and available under the MIT License.
Disclaimer: "Neopets" is a registered trademark of Neopets, Inc. This application is an unofficial fan-made helper and is not affiliated with or endorsed by Neopets, Inc.
