Phase 1 — Review

Phase 1 — Review

Iteration 1. No prior iteration, so no Reflection section.

Context summary

Goal: Build an interactive, self-contained artifact (vanilla HTML + JS, no build step, no network) that demonstrates a few pathfinding algorithms in the spirit of the PathFinding.js visual demo (https://qiao.github.io/PathFinding.js/visual/).

What the source demo does (reference, not a spec to clone):

Requirements (from the user)

# Requirement Notes
R1 Interactive User can manipulate the grid and trigger searches
R2 Vanilla HTML + JS No frameworks, no bundler
R3 Fully runnable offline Single file, zero network requests, no CDN
R4 Demonstrates "a few" algorithms Plural but bounded — not the full library
R5 Runs in a web browser Standard modern browser, no plugins

Constraints

Candidate algorithm set (narrowing, per skill: eliminate, don't expand)

The source library has ~10 finders. "A few" + a clear teaching story argues for a small, contrasting set rather than breadth. Leading candidate — the classic quartet:

  1. BFS — uninformed, explores in rings, optimal on unweighted grids.
  2. Dijkstra — uniform-cost; same as BFS when all costs equal, but the framing matters.
  3. Greedy Best-First — pure heuristic; fast, beelines to goal, not optimal.
  4. A* — combines cost-so-far + heuristic; optimal and directed.

This set is pedagogically tight: each one differs from its neighbour by exactly one idea (add a cost function → add a heuristic → combine them). That contrast is the demo's payload.

Deliberately set aside (candidates for a later iteration, not iteration 1):

Gaps / ambiguities to resolve in Brainstorm

Candidate approaches (high level)

These trade-offs are exactly what Phase 2 (Brainstorm) should settle interactively.