You are on page 1of 18

Artificial Intelligence

Md. Zasim Uddin, PhD


Associate professor, Dept. Computer Science & Engineering
Begum Rokeya University, Rangpur
Content of previous lecture

 Simple agent: direct mapping from state to actions


 Goal-based agent: can succeed by considering future
action and desirability of their outcomes

2
Summary for today’s lecture

 Simple agent: direct mapping from state to actions


 Goal-based agent: can succeed by considering future
action and desirability of their outcomes
 Problem solving agent: decide what to do by finding
sequences of actions that lead to desirable states.
 Uninformed search: they are given no information
except its definition.
3
Search
 Search: process of looking for such a
sequence
 What choices are we searching through?
 Problem solving
Action combinations (move 1, then move 3,
then move 2...)
 Natural language
Ways to map words to parts of speech
 Computer vision
Ways to map features to object model
Assumptions

 Static or dynamic?

Environment is static
Assumptions

 Static or dynamic?
 Fully or partially observable?

Environment is fully observable


Assumptions

 Static or dynamic?
 Fully or partially observable?

 Discrete or continuous?

Environment is discrete
Assumptions

 Static or dynamic?
 Fully or partially observable?

 Discrete or continuous?

 Deterministic or stochastic?

Environment is deterministic
Assumptions

 Static or dynamic?
 Fully or partially observable?

 Discrete or continuous?

 Deterministic or stochastic?

 Episodic or sequential?

Environment is sequential
Assumptions

 Static or dynamic?
 Fully or partially observable?

 Discrete or continuous?

 Deterministic or stochastic?

 Episodic or sequential?

 Single agent or multiple


agent?
Assumptions

 Static or dynamic?
 Fully or partially observable?

 Discrete or continuous?

 Deterministic or stochastic?

 Episodic or sequential?

 Single agent or multiple


agent?
Search example
Formulate goal: Be in
Bucharest.

Formulate problem: states


are cities, operators drive
between pairs of cities

Find solution: Find a


sequence of cities (e.g.,
Arad, Sibiu, Fagaras,
Bucharest) that leads from
the current state to a state
meeting the goal condition
Search space definitions
 State
 A description of a possible state of the world
 Initial state
 Agent starts the search
 Goal test
 Conditions the agent is trying to meet
 Goal state
 Any state which meets the goal condition
 Action
 Function that maps (transitions) from one state to
another
Search space definitions
 Problem formulation
 Describe a general problem as a search problem
 Solution
 Sequence of actions that transitions the world from the initial
state to a goal state
 Solution cost (additive)
 Sum of the cost of operators
 Alternative: sum of distances, number of steps, etc.
 Search
 Process of looking for a solution
 Search algorithm takes problem as input and returns solution
 We are searching through a space of possible states
 Execution
 Process of executing sequence of actions
Problem formulation

A search problem is defined by the

1. Initial state (e.g., Arad)


2. Operators (e.g., Arad -> Zerind, Arad -> Sibiu,
etc.)
3. Goal test (e.g., at Bucharest)
4. Solution cost (e.g., path cost)
Example problems
 Toy problem: is intended o illustrate or exercise
various problem-solving methods.

 Real-world problem: is one whose solutions to


compare the performance of algorithms.
Example problems – Eight Puzzle
States: tile locations

Initial state: one specific tile configuration

Operators: move blank tile left, right, up,


or down

Goal: tiles are numbered from one to


eight around the square

Path cost: cost of 1 per move (solution


cost same as number of most or path
length)

Eight puzzle applet


Example problems – eight
queens
States: locations of 8 queens on chess
board

Initial state: one specific queens


configuration

Operators: move queen x to row y and


column z

Goal: no queen can attack another


(cannot be in same row, column, or
diagonal)

Path cost: 0 per move

Eight queens applet

You might also like