IT314 Week6a
IT314 Week6a
IT314 Week6a
Week -6
Sarhad University of Science and Information Technology,
Search agents and its applications, searchAlgorithm terminologies, state space vs. search space, search strategies
BS SoftwareEngineering/ComputerScience
Engr.HasibShamshad
Peshawar
Last lecture summary
We discussed some very comment Agents i.e. Simple reflex agents with examples ,Rational
Agents and the performance measures associated with Rational agents( PEAS).
• States: All states reachable from the initial state by any sequence of actions
(State space)
• Actions: possible actions available to the agent. At a state s, Actions(s) returns
the set of actions that can be executed in state s. (Action space)
• Transition model: A description of what each action does Results(s, a)
• Goal test: determines if a given state is a goal state
• Path cost: function that assigns a numeric cost to a path w.r.t. performance
measure
• States: all arrangements of 0 to 8 queens on
the board.
• Initial state: No queen on the board
• Actions: Add a queen to any empty square
• Transition model: updated board
• Goal test: 8 queens on the board with none
attacked
Problem Solving by search
In Artificial Intelligence, Search techniques are universal problem-solving
methods.
Rational agents or Problem-solving agents in AI mostly used these search
strategies or algorithms to solve a specific problem and provide the best result.
Problem-solving agents are the goal-based agents and use atomic
representation.
We will now learn various problem-solving search algorithms.
Search Algorithm Terminologies
“Because we want to achieve the goals for our agents and want to predict the future actions for
the agents”
Real world examples
Route finding problem: typically our example of map search, where we need to
go from location to location using links or transitions. Example of applications
include tools for driving directions in websites, in-car systems, etc.
Real world examples
Traveling salesperson problem: Find the shortest tour to visit each city exactly
once.
Real world examples
VLSI layout: position million of components and connections on a chip to
minimize area, shorten delays. Aim: put circuit components on a chip so as they
don’t overlap and leave space to wiring which is a complex problem.
Real world examples
Robot navigation: Special case of route finding for robots with no specific routes
or connections. The robot navigates in 2D or 3D space or ore where the state
space and action space are potentially infinite.
Real world examples
Automatic assembly sequencing: find an order in which to assemble parts of an
object which is in general a difficult and expensive geometric search.
Real world examples
Protein design: find a sequence of amino acids that will fold into a 3D protein
with the right properties to cure some disease.
Search Algorithm Terminologies
Search tree: A tree representation of search problem is called Search tree. The
root of the search tree is the root node which is corresponding to the initial
state.
Actions: It gives the description of all the available actions to the agent.
Solution: It is an action sequence which leads from the start node to the goal
node.
Optimal Solution: If a solution has the lowest cost among all solutions.
State Space vs. Search Space
State Space: a physical configuration
Search Space: an abstract configuration represented by a search tree or a graph
of possible solutions.
Search tree: models the sequence of actions
Let’s show the first steps in growing the search tree to find a route from San Francisco to
another city
How to handle repeated states?
Graph search
Search Strategies
A strategy is defined by picking the order of node expansion
– m: maximum depth of the state space (may be ∞) (also noted sometimes D).