Lab: Agents
Before the lab
- Reading:
- AIMA: Chapter 2 - Intelligent Agents. Focus on agents and environments, rationality and performance measures, PEAS descriptions, properties of task environments, and the differences between simple reflex, model-based, goal-based, and utility-based agents.
- Technical preparation:
- Open today's notebook and run all setup cells and the first code cell in Segment 1 to verify that the notebook works in your environment. You should see a two-location Vacuum World.
Q&A
- Consider a robotic vacuum cleaner. What belongs to the agent, what belongs to the environment, and what are its percepts and actions?
- A vacuum agent moves left even though the right location is dirty. Does this prove that the agent is irrational? What information would you need before deciding?
- What changes when the vacuum can perceive only whether its current location is clean or dirty, but cannot perceive its location or the condition of other locations?
- Suppose the vacuum receives one point whenever it removes dirt. How might it exploit this performance measure, and how should the measure be redesigned?
Notebook
Notebook: HCAI_Lab_Agents.ipynb (Work in Google Colab or download the .ipynb file to local environment)
Work in groups of 2-4. Every group member must be able to explain the results.
Challenge
Work in groups of 2-4 to build an agent for the Code4Life laboratory.
Your robot needs to collect samples, diagnose them, gather the required molecules, and produce medicines. Begin with a working state machine:
collect samples -> diagnose -> collect molecules -> produce medicine
Next, make your agent smarter. Which samples are worth taking? Can they be completed with the available molecules? When should the robot change its plan? Should it react to the competing robot?
Use these decisions to identify whether your solution behaves like a reflex, model-based, goal-based, or utility-based agent.
Start the challenge during the lab and continue it as part of the self-study regarding classes. Selected groups may share their strategies at the next lab, and effective solutions may receive bonus points.
Learn more!
- Specification gaming: the flip side of AI ingenuity (Google DeepMind) – examples of agents satisfying the literal performance measure without achieving the designer's intended outcome.