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.
Both routes start the same way.
Enable JavaScript to run the Agent Maze simulation.
Candidate move scores will appear here before Wovi acts.
The shortcut offers extra energy (+2) and a storm penalty (−2). Pick a route above, then run Wovi to see which it takes.
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.