๐ฎ Mode 1: Manual Control โ "Be the Agent"
๐ How to Play
Objective: You ARE the vacuum agent. Clean both rooms to maximize your score.
Rules: Use Left/Right to move between rooms, Suck to clean a dirty room. Each action costs 1 point, but you earn +1 for each clean room every step. Click a room to toggle its dirt status. NoOp skips your turn.
AI Concept: This is the agent-environment interaction loop. You experience what a Simple Reflex Agent must decide every step โ observe the percept (location + dirt status), then choose an action.
You are the vacuum agent. Click rooms to toggle dirt, then use buttons to act. Score: +1 per clean square per step, โ1 per action cost.
๐ Action Log
๐ง Mode 2: Agent Selector โ "Watch Different Agents"
๐ How to Play
Objective: Observe how 4 different agent architectures solve the same cleaning task.
Rules: Select an agent type from the dropdown, then click Step (one action) or Run (continuous). Watch the side panel โ it shows each agent's internal reasoning in real-time.
AI Concept: Compares the 4 agent types from AIMA Ch.2: Simple Reflex (conditionโaction rules), Model-Based (internal state tracking), Goal-Based (plans toward all-clean), and Random. Notice how Simple Reflex works perfectly here because the environment is fully observable.
Select an agent architecture and watch it solve the Vacuum World autonomously.
๐ Agent Internal State
๐ Action Log
๐ง Mode 3: Rule Editor โ Program Your Agent
๐ How to Play
Objective: Design your own condition-action rule table and see if your agent can clean both rooms optimally.
Rules: For each possible percept (location + dirt status), choose an action from the dropdown. Then click "Run My Agent" to watch it execute for 20 steps. Try to reach 36+ points!
AI Concept: This is AIMA Table 2.3 โ the complete agent function as a lookup table. There are only 4 possible percepts in this environment, so the entire agent program fits in 4 rules. Can you figure out the optimal mapping? Hint: think about what the agent should do when there's nothing to clean in its current room.
Initial state: Both rooms are dirty. You have 20 steps. Design one action for each possible percept.
- +1 point for each clean room at the end of every step (max +2/step)
- +10 bonus if both rooms are clean when the 20 steps finish
- Maximum possible: 20 steps ร 2 rooms + 10 bonus = 50 points
- Target to beat: 36+ points (excellent), 40 = perfect
Your Rule Table
| Location | Status | โ Action |
|---|---|---|
| A | Clean | |
| A | Dirty | |
| B | Clean | |
| B | Dirty |
๐ฌ Mode 4: Environment Properties Lab
๐ How to Play
Objective: See how changing environment properties breaks simple agents and demands more sophisticated architectures.
Rules: Toggle the environment switches (Partially Observable, Stochastic, Dynamic, Larger World), select an agent type, then click "Run Experiment" to observe behavior over 30 steps.
AI Concept: The 6 environment dimensions from AIMA Ch.2 determine agent design complexity. Partially Observable โ Simple Reflex fails (can't see other room); Stochastic โ plans may fail; Dynamic โ must re-plan continuously. This is why we need Model-Based and Goal-Based agents.
Environment Properties
Agent
๐ How Properties Affect Agents
๐ Partial Observability
When the agent can't see the other room, Simple Reflex fails! It has no memory โ it doesn't know if the other room is still dirty. A Model-Based agent maintains an internal model of the world and can track what it hasn't observed.
๐ฒ Stochasticity
Actions can have unintended outcomes. A Goal-Based agent's plan may fail mid-execution โ it must re-sense and re-plan after each action. Simple reflex agents are somewhat robust since they react to each step independently.
๐ Dynamic Environment
The world changes while the agent acts. Dirt appears randomly! The agent must re-plan continuously โ a one-shot plan is never enough. Model-Based and Goal-Based agents handle this best by maintaining up-to-date world models.
๐ Larger World
More rooms = harder exploration problem. The agent must navigate efficiently between rooms. Simple Reflex agents wander randomly; Model-Based agents use their internal map to plan efficient paths.
๐บ๏ธ State Space Diagram
๐ How to Play
Objective: Visualize the complete state space โ every possible world state and the transitions between them.
Rules: The diagram shows all 8 states (2 positions ร 4 dirt combinations). Green arrows = Suck action, Blue arrows = Move (Left/Right). As modes 1-2 run, the current state highlights in gold.
AI Concept: A well-defined problem has 5 components: Initial State, Actions, Transition Model, Goal Test, Path Cost. This diagram IS the transition model. The 8 states = the entire state space of the 2-room vacuum world (AIMA Figure 3.2).
All 8 possible states of the Vacuum World and transitions between them.
๐ Performance Comparison
๐ How to Play
Objective: Quantitatively compare all 4 agent types running in identical conditions.
Rules: Click "Compare All Agents" to run each agent for 50 steps from the same starting state (both rooms dirty, agent in A). Results show scores, steps to goal, and whether each agent reached the goal.
AI Concept: Agent performance measurement โ the rationality of an agent depends on its performance measure, environment, and actuators (PEAS). Simple Reflex and Goal-Based both achieve the goal, but Goal-Based is more efficient. Random almost never reaches the goal optimally.
Run all 4 agents side-by-side and compare their scores and efficiency.