Artificial Intelligence · Unit 2
Agent Environments and Problem Formulation
Exam-focused notes for Agent Environments and Problem Formulation (Artificial Intelligence, BIT252): what the TU syllabus asks and how it has actually been tested, with 3 solved past questions from this unit.
Agent Environments and Problem Formulation in short
Before an agent can search for a solution, we must describe its world and its problem clearly. This chapter covers the kinds of environments, how to write a problem as a state space, and how heuristics guide the search.
What this unit covers
- Environment types and properties
- Deterministic and non-deterministic environments
- State space representation
- Goal formulation and problem definition
- Heuristic functions and evaluation metrics
State space representation
2082 · 10 marks
How problems is formulated in state space representation?Create a state space representation with start and goal state.Configure the states with appropriate heuristics and actual cost.Show search path using Greedy Best First Search.[2+2+6]
2080 · 5 marks
Define game. Give a state space representation of any problem you know. [5]
Show solved answerHide answer
Game and State Space Representation
Definition of Game (2 marks)
A game in the context of Artificial Intelligence is a type of search problem that involves two or more competing agents (players) who take turns making moves, each trying to achieve their own goal (usually to win) while the opponent tries to prevent it.
Key characteristics of a game:
- There are two players (usually called MAX and MIN)
- Players take turns alternately
- The game has a terminal state (win, lose, or draw)
- Each player tries to maximize their own utility and minimize the opponent's utility
- The outcome depends on the actions of both players
Examples: Chess, Tic-Tac-Toe, Checkers, Go
State Space Representation (3 marks)
A state space is a way of representing a problem as a set of states, operators (actions), an initial state, and a goal state. It forms a graph where nodes represent states and edges represent transitions.
Components of State Space Representation:
| Component | Description |
|---|---|
| States | All possible configurations of the problem |
| Initial State | The starting configuration |
| Operators/Actions | Rules that move from one state to another |
| Goal State | The desired final configuration |
Example: 8-Puzzle Problem
The 8-Puzzle consists of a 3x3 grid with 8 numbered tiles and one blank space. The goal is to reach a target arrangement by sliding tiles.
Initial State:
2 | 8 | 3
---------
1 | 6 | 4
---------
7 | | 5
Goal State:
1 | 2 | 3
---------
8 | | 4
---------
7 | 6 | 5
State Space Representation:
- State: The arrangement of all 8 tiles and the blank in the 3x3 grid
- Initial State: The given starting arrangement
- Operators: Move blank UP, DOWN, LEFT, or RIGHT
- Goal State: The target arrangement of tiles
- Path Cost: Each move costs 1 (total number of moves)
Partial State Space Tree:
[2,8,3,1,6,4,7,_,5] <- Initial State
|
__________|__________
| |
Move LEFT Move UP
| |
[2,8,3,1,6,4,7,5,_] [2,8,3,1,_,4,7,6,5]
|
Move LEFT / RIGHT ...
|
... (Goal State)
Total number of possible states = 9! / 2 = 181,440 reachable states
This state space is searched using algorithms like BFS, DFS, A*, or Hill Climbing to find the path from the initial state to the goal state.
Deterministic and non-deterministic environments
2079 · 5 marks
Define deterministic and non-deterministic environment. Differentiate between BFS and DFS. [2+3]
Make Unit 2 stick
Practice BIT252 with flashcards & quizzes