Headstart Bootcamp 2026 — Prep Simulator
A browser-based robot simulation environment for practicing coding, pathfinding, and algorithm design. Navigate a robot through grid-based maps, avoid hazards, collect items, and reach the goal — all by writing JavaScript code in real time.
| Feature | Description |
|---|---|
| 🗺️ Built-in Maps | 10+ hand-crafted maps of increasing complexity, plus random map generation |
| 🧠 Smart Path | One-click A* pathfinding — plans the optimal route and generates code automatically |
| 🔄 Auto Optimize | Brute-force optimizer that plans, runs, and adjusts until the robot succeeds |
| 📝 Live Code Editor | Powered by CodeMirror with syntax highlighting and auto-save |
| 🎮 4 API Modes | Simple, Position, Sensor, and Continuous — different skill levels |
| 📊 Performance Stats | Efficiency, path length, items collected, hazards hit |
| 🏆 Leaderboard | Best scores saved per map in your browser |
| 🎲 Random Maps | Procedurally generated maps for unlimited practice |
| 🐢 Speed Control | Adjust simulation speed from turtle to rabbit |
Just open index.html in any modern browser. No build step, no dependencies.
- Select a map from the toolbar dropdown (or click 📂 to browse)
- Pick an API mode (start with
simple— it's the easiest) - Write code in the editor panel. Each mode exposes different commands.
- Click ▶ Run to execute, ⏭ Step to tick through one step at a time, or ↺ Reset to start over.
| Mode | Commands | Best For |
|---|---|---|
| simple | moveForward(), turnLeft(), turnRight() |
Absolute beginners |
| position | moveTo(x, y), turnLeft(), turnRight() |
Coordinate-based thinking |
| sensor | moveForward(), turnLeft(), turnRight(), canMoveForward(), isGoal(), isHazard() |
Conditional logic practice |
| continuous | move(speed), rotate(angle) |
Real-world robotics metaphor |
- Smart Path (
🧠): Uses A* to find the optimal path, then generates working code for your selected API mode. Great for learning how pathfinding translates to code. - Auto Optimize (
🔄): Runs Smart Path, executes the code, and if it fails — adjusts and retries. Repeats until success or the robot reaches the goal.
All known issues, fixes, and audit history are documented in:
Includes severity ratings, code references, and fix status for every bug found during the codebase audit.
| Severity | Count |
|---|---|
| Critical | 0 |
| High | 0 |
| Medium | 0 |
| Low | 5 |
| Fixed | 14 |
Last audit: May 2026
| Layer | Technology |
|---|---|
| UI | Vanilla HTML + CSS + Canvas |
| Editor | CodeMirror 5 |
| Pathfinding | A* with hazard avoidance, path simplification |
| Storage | localStorage (code auto-save, leaderboard) |
| Fonts | SF Mono / Cascadia Code / Fira Code |
Zero frameworks. Zero build tools. Open index.html and go.
robot-prep/
├── index.html # Main app
├── style.css # Styles & animations
├── README.md # You are here
├── ROBOT_PREP_AUDIT.html # Full bug tracker & audit
├── .gitignore
├── js/
│ ├── app.js # App controller (UI bindings, run/step/reset)
│ ├── maps.js # Map definitions (10+ levels)
│ ├── renderer.js # Canvas renderer (grid, robot, overlays)
│ ├── simulator.js # Simulation engine (movement, scoring, collisions)
│ ├── code-generator.js # Generates JS code from path waypoints
│ └── map-generator.js # Procedural random map generation
└── modules/
├── pathfinding.js # A* + path simplification + multi-target planning
├── robot-control.js # User-code execution sandbox
└── strategy.js # Smart Path planner + Auto Optimizer
MIT — use it, learn from it, break it, fix it.