# LearnAI planner implementation studio

Original dependency-free Python exercises for directed nonnegative-cost search and finite-state filtering. Requires Python 3.10 or later. No downloads, account, API, network access or GPU are needed by these files.

## Work in a local folder

Unzip the package. Keep the supplied reference unchanged. Run:

    python3 planner_checks.py planner_reference.py
    python3 planner_checks.py planner_exercise.py

The first command should pass six tests. The second deliberately fails until you implement both functions. The checks execute your selected Python file normally; this is not the browser's restricted coding interpreter.

The exercise contract is documented in planner_exercise.py. Implement A* with directed costs, stable priority handling, stale-entry filtering, reopening, bounded expansions and exact status labels. Implement HMM prediction/correction with transition rows indexed from/to, missing likelihoods of one and explicit impossible-evidence stopping. Keep inputs unchanged. Test your own counterexamples too.

Public transfer cases include 25 generated five-node maps checked by exhaustive simple-path enumeration and a binary HMM checked by enumeration of latent paths. They are reproducible exposed practice, not independent supervision, authorship verification or a comprehensive proof. They do not test every possible heuristic or model.

## Produce browser-compatible supplied-reference evidence

    python3 planner_reference.py search uniform.json --method uniform
    python3 planner_reference.py search misleading.json --method misleading
    python3 planner_reference.py belief moving.json --motion slow --steps 3
    python3 planner_reference.py belief fixed.json --motion fixed --steps 3

Outputs use exclusive creation: choose a different filename if it already exists. Import these lesson-shaped artifacts into /learn/projects/planner/. The browser accepts only the registered seven-node map and three-state HMM settings, then recomputes results. It does not execute or verify your Python implementation. Generic graphs and binary-HMM test results belong in your implementation report, not this restricted importer.

Supplied-reference files must remain labelled supplied. Browser imports record imported origin and cannot authenticate authorship. Attach your own runnable source, test output and protocol to your implementation evidence; human review remains pending. Local test success does not award project mastery.

## Bounds and meanings

Reference search: 1–32 states, at most 128 directed edge records, nonnegative finite costs/heuristics, 1–256 expanded states, zero heuristic at goal. Goal selection at the expansion cap is permitted. An overestimate can return a nonoptimal legal path. The heap can contain stale entries; edge reads exclude heap/validation/rendering costs.

Reference filtering: 2–8 states, at most 16 likelihood rows, normalized initial/transition distributions, finite likelihoods in [0,1]. A move occurs before every reading. Zero evidence produces an undefined posterior and stops; it never becomes a uniform restart. These scalar routines are bounded CPU examples, not neural planners or general research-scale trackers.

No files are written on import. CLI commands compute first and only then create a new output. Ctrl-C stops local computation. Keep previous outputs for comparison. All included data and maps are original synthetic LearnAI teaching examples.

## Review rubric

Explain state and model assumptions, independent oracle design, failed cases, work bounds and reproducibility. Demonstrate a route requiring reopening, a cutoff versus exhaustive failure, a missing reading and a zero-probability observation. Compare a model misspecification with an algorithm bug. Explain a new inspect-versus-act decision with both signal branches and costs. Seek independent review of runnable source and unseen-instance behavior; learner pilots and human review remain pending.
