What Is Searching

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

What is Searching?

Copyright © Global Tech Council www.globaltechcouncil.org


Problem-Solving Agents
● Problem-solving agents are goal-based agents that use atomic representations.

● The first step of problem-solving is goal formulation.

● The problem is formulated by deciding the actions and states to consider, to achieve the given goal.

● Initially, the agent does not know which of its possible actions is best. This is because it does not yet
know enough about the state that results from taking each action.

● Agents with no additional information try the actions at random to get the best result.

Copyright © Global Tech Council www.globaltechcouncil.org 2


Problem Definition
function SIMPLE-PROBLEM-SOLVING-AGENT(percept) returns an action

persistent: sequence, state, goal, problem

state ← UPDATE-STATE(state,percept)

if sequence is empty then


goal ← FORMULATE-GOAL(state)
problem ←FORMULATE-PROBLEM(state,goal)
sequence ← SEARCH(problem)
if sequence = failure then return a null action
action ← FIRST(sequence)
sequence ← REST(sequence)
return action

Copyright © Global Tech Council www.globaltechcouncil.org 3


Search
● A process of inspecting several sequences and choosing one that achieves the desired goal is
called search.

● Each sequence is associated with a certain cost.

● Main aim of a search problem is to reach the goal at a minimal cost.

● Searching strategies are evaluated along the dimensions like:


○ Completeness: Does it always find a solution, if it exists?
○ Optimality: Does it always find a least-cost solution?
○ Space Complexity: Maximum number of nodes in memory.
○ Time Complexity: Number of nodes generated.

● Search algorithm takes a problem as input and returns a solution as an action sequence.

Copyright © Global Tech Council www.globaltechcouncil.org 4


Search Terminologies
● State: Potential outcome of a problem.
D Parent Node
○ Starting State
○ Intermediate State 6
○ Goal State
C Child Node
● Transition: Act of moving between states.
4 4
● Problem Space Graph: Represents problem state.
A B
● Search Space: Collection of states.

● Path Cost: A function that assigns a numeric cost to each path. Path-Cost

● Branching Factor: Average number of child nodes in the problem space graph.

● Depth of a problem: Shortest path length from Initial State to the Goal state.

Copyright © Global Tech Council www.globaltechcouncil.org 5


Types of Search Algorithms
Search Algorithms

Uninformed Search Local Search

Breadth First Iterative Deepening


Search Search Hill Climbing Simulated
Search Annealing

Depth First Search Uniform Cost Monte Carlo


Search Search Genetic Search

Bidirectional
Search Informed Search

Best First Search Beam Search

A* Search

Copyright © Global Tech Council www.globaltechcouncil.org 6


THANK YOU!
Any questions?
You can mail us at
hello@globaltechcouncil.org

Copyright © Global Tech Council www.globaltechcouncil.org 7

You might also like