Artificial Intelligence · Unit 2 · 4 hrs
Intelligent Agents
Exam-focused notes for Intelligent Agents (Artificial Intelligence, CSC266): what the TU syllabus asks and how it has actually been tested, with 8 solved past questions from this unit.
Intelligent Agents in short
This unit formalises the idea of an agent: what an agent is made of, how it is judged, how its task environment is specified, the main agent designs, and the properties of environments that determine which design is appropriate.
What this unit covers
- Introduction of agents
- Structure of Intelligent agent
- Properties of Intelligent Agents
- Configuration of Agents
- PEAS description of Agents
- Types of Agents: Simple Reflexive, Model Based, Goal Based, Utility Based
- Environment Types: Deterministic, Stochastic, Static, Dynamic, Observable, Semi-observable, Single Agent, Multi Agent
Environment Types
2081 · 5 marks
Justify which type of environments resembles following agents. a. Mission Game with fixed 6 states having two players. b. Tesla Driverless Robovan where road conditions are changing. c. Game Result Predicting Agent where current prediction state is independent of previous state. [5]
Show solved answerHide answer
Environment Types for Given Agents
Background
Environments are classified along several dimensions:
- Deterministic vs Stochastic
- Dynamic vs Static
- Observable vs Semi-Observable
a. Mission Game with Fixed 6 States Having Two Players
This is a game-playing scenario with two players competing against each other.
| Property | Justification |
|---|---|
| Fully Observable | The game has only 6 fixed states, meaning both players can see and access the complete state of the environment at each point in time (like a chess board). |
| Deterministic | With a fixed number of states (6), the next state is completely determined by the current state and the action taken. There is no randomness involved. |
| Static | The environment (game state) does not change on its own while a player is deciding their move. It only changes when a player takes an action. |
| Multi-agent / Competitive | , "Both players try to win the game" -- this is a competitive multi-agent environment. |
Conclusion: This environment is Fully Observable, Deterministic, Static, and Multi-agent (Competitive).
b. Tesla Driverless Robovan Where Road Conditions Are Changing
This is a self-driving vehicle operating in a real-world road environment.
| Property | Justification |
|---|---|
| Semi-Observable | As stated in the notes, "Driving the environment is semi-observable because what's around the corner is not known." The sensors cannot capture the complete state at all times. |
| Stochastic | As stated in the notes, "Self Driving Cars -- the actions are not unique, it varies time to time." Road conditions keep changing unpredictably, so the next state cannot be completely determined. |
| Dynamic | The road conditions are constantly changing (traffic, pedestrians, weather, obstacles) even while the agent is processing its next action. The notes state: "An environment that keeps constantly changing itself when the agent is up with some action is said to be dynamic." |
Conclusion: This environment is Semi-Observable, Stochastic, and Dynamic -- the most complex type of environment for an agent to operate in.
c. Game Result Predicting Agent Where Current Prediction State Is Independent of Previous State
This agent predicts game results, and each prediction is made independently without considering past states.
| Property | Justification |
|---|---|
| Stochastic | Game results are inherently uncertain and random in nature. The outcome cannot be uniquely determined from the current state alone. |
| Static | The historical data or input given to the agent does not change while the agent is computing its prediction. |
| Partially Observable | The agent may not have access to all factors (player fitness, weather, morale) that affect the game result. |
| Memoryless (Independent States) | The key characteristic here is that the current prediction state is independent of the previous state -- this resembles a Markov Property environment, where only the current state matters for decision-making, not the history. |
Conclusion: This environment is Stochastic, Static, and Memoryless (Markov-type), where each prediction is made independently based only on the current state.
Summary Table
| Agent | Observable | Deterministic/Stochastic | Dynamic/Static | Special Property |
|---|---|---|---|---|
| Mission Game (6 states, 2 players) | Fully Observable | Deterministic | Static | Multi-agent, Competitive |
| Tesla Driverless Robovan | Semi-Observable | Stochastic | Dynamic | Real-world complexity |
| Game Result Predicting Agent | Partially Observable | Stochastic | Static | Memoryless / Markov |
2076 · 5 marks
Discuss the types of environment where an agent can work on. [5]
Properties of Intelligent Agents
2080 · 5 marks
What are the properties of intelligent agent? How simple reflex agents work? Give an example of simple reflex agent. [5]
PEAS description of Agents
2080 · 5 marks
Using your own assumptions, design PEAS framework for following intelligent agents. a. Covid-19 prediction system b. Vaccine recommender system. [5]
2078 · 5 marks
How agent can be configured used PEAS framework? Illustrate with example. [5]
2080.1 · 5 marks
Using your own assumptions, design PEAS framework for following intelligent agents. a. Medicine delivery drone b. Covid medicine prescriber. [5]
Types of Agents
2079 · 5 marks
What do you mean by Rational Agent? What are differences between Utility based agent and model based agent? [5]
2080.1 · 5 marks
What is an agent? How utility agent works? Give an example of utility agent. [5]
Show solved answerHide answer
What is an Agent? Utility Agent and Example
What is an Agent? (1 mark)
An agent is anything that can perceive its environment through sensors and act upon that environment through actuators. An agent operates in a continuous cycle:
Environment --> Sensors --> Agent --> Actuators --> Environment
An agent takes a percept sequence as input and produces an action as output. The goal of an agent is to act rationally, meaning it selects actions that maximize its expected performance measure based on available knowledge.
How a Utility-Based Agent Works (2 marks)
A utility-based agent is an advanced type of agent that goes beyond simply achieving goals. It uses a utility function to measure how desirable a particular state is, allowing the agent to choose the best possible action among many alternatives.
Working Mechanism:
Percepts --> [State Representation] --> [Utility Function] --> Best Action
Step-by-step working:
- Perceive the current state of the environment through sensors.
- Maintain an internal model of the world (current state).
- Evaluate possible next states using a utility function, which assigns a numerical value (happiness/desirability score) to each state.
- Select the action that leads to the state with the maximum expected utility.
- Execute the chosen action through actuators.
Key Features:
- It handles situations where multiple goals conflict with each other.
- It handles uncertainty by computing expected utility (probability-weighted utility).
- It does not just ask "Did I achieve the goal?" but rather "How well did I achieve it?"
Formula:
Best Action = argmax [ Σ P(outcome | action) × Utility(outcome) ]
Example of a Utility-Based Agent (2 marks)
Example: Self-Driving Taxi (Automated Taxi)
Consider an automated taxi agent navigating from point A to point B.
| Possible Action | Utility Score |
|---|---|
| Take shortest route (heavy traffic) | 60 |
| Take longer route (no traffic) | 75 |
| Take toll route (fast, costs money) | 70 |
How it works:
- The taxi perceives road conditions, traffic, distance, and fuel level.
- It evaluates each possible route using a utility function that considers:
- Travel time (less time = higher utility)
- Passenger comfort (smooth road = higher utility)
- Fuel cost (less cost = higher utility)
- Safety (safer route = higher utility)
- It selects the route with the maximum utility score (longer route with no traffic = 75).
- This is better than a simple goal-based agent that would just pick the shortest route without considering comfort or traffic.
Why Utility Agent is Better:
- A goal-based agent only checks: "Did I reach destination? Yes/No"
- A utility-based agent checks: "Which path gives the best overall experience?"
This makes utility-based agents ideal for stochastic and partially observable environments (like driving) where uncertainty must be handled rationally through probability and utility calculations.
Make Unit 2 stick
Practice CSC266 with flashcards & quizzes