Class-3_Problem Solving agent
Class-3_Problem Solving agent
problem-solving agent:
• It is one kind of Goal based agent
Initial state: The initial state that the agent starts in.
Pathcost
Goal
A simple problem-solving agent. It first formulates a goal and a problem, searches
for a sequence of actions that would solve the problem and then executes the actions
one at a time. When this is complete, it formulates another goal and starts over.
a problem can be gathered into a single data structure that is
given as input to a problem-solving algorithm. A solution to
a problem is an action sequence that leads from the initial
state to a goal state. Solution quality is measured by the
path cost function, and an optimal solution has the lowest
path cost among all solutions.
Ex: vacuum world
• States: The state is determined by both the agent location
and the dirt locations. The agent is in one of two
locations, each of which might or might not contain dirt.
Thus, there are 8 possible world states.
Goal test: This checks whether all the squares are clean.
Path cost: Each step costs 1, so the path cost is the number
of steps in the path
Ex: The goal of the 8-queens problem is to place eight
queens on a chessboard such that no queen attacks any
other.
States: Any arrangement of 0 to 8 queens on the board is a
state.
Initial state: No queens on the board.
Actions: Add a queen to any empty square.
Transition model: Returns the board with a queen added
to the specified square.
Goal test: 8 queens are on the board, none attacked.
Example: Solve the given problem using Breadth-first
search approach. Here
• States: A state description specifies the location of each
of the eight tiles and the blank in one of the nine squares.