Goals are designed
An agent optimizes the score it is given—not the intention a person forgot to express.
AI AGENTS + PYTHON · AGES 9–13
Help Wovi reach the beacon. Predict a route, watch the agent, then improve its rules.
The shortcut has energy (+2) and a storm (−2). Take a guess, then watch.
Enable JavaScript to run the Agent Maze simulation.
Candidate move scores will appear here before Wovi acts.
The fastest-looking route contains both energy and a storm. Predict what the scores will make Wovi do.
Compare the result with your prediction. Change a reward, then test again.
GOAL_REWARD = 4
ENERGY_REWARD = 2
STORM_PENALTY = 2
MEMORY_REWARD = 0
def score(move):
value = GOAL_REWARD * move.progress
if move.has_energy:
value += ENERGY_REWARD
if move.is_storm:
value -= STORM_PENALTY
if not move.visited:
value += MEMORY_REWARD
return valueAgent Maze exposes a small reward-scoring algorithm rather than pretending the agent understands the world. The first policy is intentionally flawed: useful failure creates a reason to inspect, debug and rerun.
What this five-minute mission teaches
Every visible control maps to a value in the Python view, so the learner can explain why the route changed.
An agent optimizes the score it is given—not the intention a person forgot to express.
Fast progress and extra energy may compete with safety. Weights decide the tradeoff.
A failed route is a clue about the policy, not proof that the agent is careless or alive.
Visual blocks become Python variables, conditions and a scoring function.
Founding families
Join the early-access list for product previews, parent research invitations and launch updates.