Intelligent Agents: Agent-Environment Interaction — Beginner-Friendly Notes
1. The Core Loop (learn this diagram by heart)
Environment → [Sensors] → Agent → [Actuators] → Environment
↑ |
└────────────────── Percept Sequence ──────────────────────┘
- Agent: anything that perceives and acts (software bot, robot, thermostat).
- Sensors: what agent uses to perceive (camera, microphone, keyboard, temperature sensor).
- Actuators: what agent uses to act (motors, speakers, screen, API call).
- Percept: one snapshot from sensors at one time.
- Percept sequence: entire history of percepts so far — the agent's experience.
- Action: what agent does now, based on the sequence.
Agent function: maps percept sequence → action. Agent program: the actual code that implements that function on hardware.
2. Simple Example — Vacuum Robot
- Sensors: camera, bump sensor, dirt sensor.
- Actuators: wheels, suction motor.
- Percept:
[location=A, dirt=yes]→ Action:suck. - Next percept depends on previous action — loop continues.
3. Why This View Matters
- It is universal: human, robot, web crawler, game AI all fit the same loop.
- It turns "intelligence" into engineering: given percepts, choose best action.
- It leads directly to PEAS (next topic) and to agent types (reflex, model-based, etc.).
4. Rational Agent — One Definition
An agent is rational when it chooses the action that maximises its expected performance given its percept sequence and built-in knowledge.
Not "perfect" (cannot know future), just best possible with what it knows.
5. Tiny Contrast
- Ordinary program: input → output (no environment feedback).
- Agent: perceives → acts → environment changes → new percepts → acts again (closed loop).
6. One-Line Summary to Write in Exam
An intelligent agent perceives its environment through sensors, keeps a history of percepts, and acts through actuators to maximise performance — forming a continuous perception-action loop.
7. Quick Self-Check
- Name sensors and actuators for a self-driving car.
- What is the difference between a percept and a percept sequence?
- Why is the loop called "closed"?