SlideShare a Scribd company logo
1 of 55
CSE 412: Artificial IntelligenceCSE 412: Artificial Intelligence
Fall 2018Fall 2018
Topic – 4: Informed SearchTopic – 4: Informed Search
and Explorationand Exploration
Tajim Md. Niamat Ullah Akhund
Lecturer
Department of Computer Science and Engineering
Daffodil International University
Email: tajim.cse@diu.edu.bd
1
Informed (Heuristic) Search StrategiesInformed (Heuristic) Search Strategies
Heuristic FunctionsHeuristic Functions
Local Search Algorithms and OptimizationLocal Search Algorithms and Optimization
ProblemsProblems
 Hill-climbing search
 Simulated annealing search
 Local beam search
 Genetic algorithms
Topic ContentsTopic Contents
2
Best-First SearchBest-First Search
• Node is selected for expansion based on
an evaluation function f(n)
• Evaluation function estimates distance to
the goal
• Choose node which appears best
• Implementation:
– fringe is a priority queue sorted in ascending
order of f-values
3Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
A Heuristic FunctionA Heuristic Function hh((nn))
• Dictionary definition: “A rule of thumb,
simplification, or educated guess that
reduces or limits the search for solutions
in domains that are difficult and poorly
understood”
• For best-first search:
– h(n) = estimated cost of the cheapest path
from node n to goal node
4Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Romania with Step Costs in KmRomania with Step Costs in Km
• hSLD = straight-line
distance heuristic
• hSLD cannot be
computed from the
problem description
itself
• In greedy best-first
search f(n)=h(n)
– Expand node that is
closest to goal
5Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Greedy Search: ExampleGreedy Search: Example
6Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Greedy Search: ExampleGreedy Search: Example
7Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Greedy Search: ExampleGreedy Search: Example
8Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Greedy Search: ExampleGreedy Search: Example
• Goal reached
– For this example no node is expanded that is not
on the solution path
– But not optimal (see Arad, Sibiu, Rimnicu Vilcea,
Pitesti)
9Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Greedy Search: EvaluationGreedy Search: Evaluation
• Complete or optimal: no
– Minimizing h(n) can result in false starts, e.g. Iasi
to Fagaras
– Check on repeated states
10Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Greedy Search: EvaluationGreedy Search: Evaluation
• Time and space complexity:
– In the worst case all the nodes in the search
tree are generated: O(bm
)
(m is maximum depth of search tree and b is
branching factor)
– But: choice of a good heuristic can give
dramatic improvement
11Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
A* SearchA* Search
• Best-known form of best-first search
• Idea: avoid expanding paths that are already
expensive
• Evaluation function f(n)= g(n) + h(n)
– g(n): the cost (so far) to reach the node
– h(n): estimated cost to get from the node to the goal
– f(n): estimated total cost of path through n to goal
• A* search is both complete and optimal if h(n)
satisfies certain conditions
12Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
A* SearchA* Search
• A* search is optimal if h(n) is an admissible
heuristic
• A heuristic is admissible if it never overestimates
the cost to reach the goal
– h(n) ≤ h*(n) where h*(n) is the true cost from n
• Admissible heuristics are optimistic about the
cost of solving the problem
• e.g. hSLD(n) never overestimates the actual road
distance
13Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Romania ExampleRomania Example
14Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
A* Search: ExampleA* Search: Example
15Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
A* Search: ExampleA* Search: Example
16Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
A* Search: ExampleA* Search: Example
17Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
A* Search: ExampleA* Search: Example
18Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
A* Search: ExampleA* Search: Example
19Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
A* Search: ExampleA* Search: Example
20Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Optimality of A*Optimality of A*
• Suppose a suboptimal goal node G2 appears on
the fringe and let the cost of the optimal solution be
C*.
• Since G2 is suboptimal and
h(G2) = 0 (true for any goal node),
we know that f(G2) = g(G2) + h(G2) = g(G2) > C*
• Now consider a fringe node n that is on an optimal
solution path.
• If h(n) does not overestimate the cost of
completing the solution path,
then we know that f(n) = g(n) + h(n) ≤ C*
• Since f(n) ≤ C* < f(G2), G2 will not be expanded and
A* search must return an optimal solution. 21Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
A* Search: EvaluationA* Search: Evaluation
• Complete: yes
– Unless there are infinitely many nodes with
f < f(G)
• Optimal: yes
– A* is also optimally efficient for any given
h(n). That is, no other optimal algorithm is
guaranteed to expand fewer nodes than A*.
22Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
A* Search: EvaluationA* Search: Evaluation
• Time complexity:
– number of nodes expanded is still exponential
in length of solution
• Space complexity:
– All generated nodes are kept in memory
– A* usually runs out of space before running
out of time
23Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Heuristic FunctionsHeuristic Functions
• Let us see two heuristics for a problem.
24Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Example: 8-puzzleExample: 8-puzzle
• States: location of each tile plus blank
• Initial state: Any state can be initial
• Actions: Move blank {Left, Right, Up, Down}
• Goal test: Check whether goal configuration is
reached
• Path cost: Number of actions to reach goal
25Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Example: 8-puzzleExample: 8-puzzle
• For 8-puzzle problem:
– h1 = number of tiles out of place. In the
example h1= 8
– h2 = total Manhattan distance of errant pieces.
In the example
h2 = 3+1+2+2+2+3+3+2 = 18
26Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Local Search Algorithms andLocal Search Algorithms and
Optimization ProblemsOptimization Problems
• Previously: systematic exploration of search space
– Path to goal is solution to problem
• for some problem classes, it is sufficient to find a solution
– the path to the solution is not relevant, e.g. 8-queens
• Different algorithms can be used
– LocalLocal search
• memory requirements can be dramatically relaxed by modifying
the current state
– all previous states can be discarded
– since only information about the current state is kept, such
methods are called local
27Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
• Local search = use single current state and
move to neighboring states.
• Advantages:
– Use very little memory
– Find often reasonable solutions in large or infinite state spaces.
• Are also useful for pure optimization problems.
– Find best state according to some objective function.
– e.g. survival of the fittest as a metaphor for optimization.
Local Search Algorithms andLocal Search Algorithms and
Optimization ProblemsOptimization Problems
28Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Local Search Algorithms andLocal Search Algorithms and
Optimization ProblemsOptimization Problems
29Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Hill-Climbing SearchHill-Climbing Search
• continually moves uphill
– increasing value of the evaluation function
– gradient descent search is a variation that
moves downhill
• is a loop that continuously moves in the direction
of increasing value - that is, uphill.
– It terminates when a peak is reached.
30Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Hill-Climbing SearchHill-Climbing Search
• Hill-climbing does not look ahead of the immediate
neighbors of the current state.
• Hill-climbing chooses randomly among the set of
best successors, if there is more than one.
• Hill-climbing is also called greedy local search
• Hill-climbing is a very simple strategy with low
space requirements
– stores only the state and its evaluation, no search tree
•
31Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Hill-Climbing ExampleHill-Climbing Example
• 8-queens problem (complete-state
formulation).
• Successor function: move a single queen
to another square in the same column.
• Heuristic function h(n): the number of pairs
of queens that are attacking each other
(directly or indirectly).
32Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Hill-Climbing ExampleHill-Climbing Example
(a)(a) An 8-queens state with heuristic cost estimate h = 17,
showing the value of h for each possible successor
obtained by moving a queen within its column. The best
moves are marked.
(b)(b) A local minimum in the 8-queens state space; the state
has h = 1 but every successor has a higher cost.
(a)(a) (b)(b)
33Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
34Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
DrawbacksDrawbacks
• Ridge = sequence of local maxima difficult for greedy
algorithms to navigate
• Plateaux = an area of the state space where the
evaluation function is flat.
• Gets stuck 86% of the time.
35Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Hill-Climbing SearchHill-Climbing Search
• problems
– local maxima
• algorithm can’t go higher, but is not at a satisfactory solution
– plateau
• area where the evaluation function is flat
– ridges
• search may oscillate slowly
36Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Escaping Local OptimaEscaping Local Optima
 HC gets stuck at local maxima limiting
the quality of the solution found.
• Two ways to modify HC:
1. choice of neighbor
2. criteria for accepting neighbor for current
• For example:
1. choose neighbor randomly
2. accept neighbor if it is better or
if it isn't, accept with some fixed probability p 37Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Escaping Local OptimaEscaping Local Optima
• Modified HC can escape local maxima but:
– chance of making a bad move is the same
at the beginning of the search as at the end
– magnitude of improvement or lack of is ignored
How can HC address these concerns?
– fixed probability p that bad move is accepted
can be replaced with a probability
that decreases as the search proceeds
– now as the search progresses,
the chances of taking a bad move reduces
38Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Hill-Climbing SearchHill-Climbing Search
function HILL-CLIMBING( problem) return a state that is a local maximum
input: problem, a problem
local variables: current, a node.
neighbor, a node.
current ← MAKE-NODE(INITIAL-STATE[problem])
loop do
neighbor ← a highest valued successor of current
if VALUE [neighbor] ≤ VALUE[current] then return STATE[current]
current ← neighbor
39Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Hill-Climbing VariationsHill-Climbing Variations
• Stochastic hill-climbing
– Random selection among the uphill moves.
– The selection probability can vary with the
steepness of the uphill move.
• First-choice hill-climbing
– implements stochastic hill climbing by
generating successors randomly until a better
one is found.
• Random-restart hill-climbing
– Tries to avoid getting stuck in local maxima.
40Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Simulated AnnealingSimulated Annealing
• Escape local maxima by allowing “bad” moves.
– Idea: but gradually decrease their size and frequency.
• Origin; metallurgical annealing
• Bouncing ball analogy:
– Shaking hard (= high temperature).
– Shaking less (= lower the temperature).
• If T decreases slowly enough, best state is reached.
• Applied for VLSI layout, airline scheduling, etc.
41Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
function SIMULATED-ANNEALING( problem, schedule) return a solution state
input: problem, a problem
schedule, a mapping from time to temperature
local variables: current, a node.
next, a node.
T, a “temperature” controlling the probability of downward steps
current ← MAKE-NODE(INITIAL-STATE[problem])
for t ← 1 to ∞ do
T ← schedule[t]
if T = 0 then return current
next ← a randomly selected successor of current
∆E ← VALUE[next] - VALUE[current]
if ∆E > 0 then current ← next
else current ← next only with probability e∆E /T
Simulated AnnealingSimulated Annealing
42Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Local Beam SearchLocal Beam Search
• Keep track of k states instead of one
– Initially: k random states
– Next: determine all successors of k states
– If any of successors is goal → finished
– Else select k best from successors and repeat.
• Major difference with random-restart search
– Information is shared among k search threads.
• Can suffer from lack of diversity.
– Stochastic variant: choose k successors at proportionally to state
success.
43Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Genetic AlgorithmsGenetic Algorithms
• Variant of local beam search with sexual recombination.
44Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Genetic AlgorithmsGenetic Algorithms
• GAs begin with a set of k randomly generated states, called
the population.
• Each state, or individual, is represented as a string over a
finite alphabet—most commonly, a string of 0s and 1s.
• For example, an 8-queens state must specify the positions of
8 queens, each in a column of 8 squares, and so requires
8 x log2 8 = 24 bits.
• Alternatively, the state could be represented as 8 digits, each
in the range from 1 to 8.
• Figure 4.6(a) shows a population of four 8-digit strings
representing 8-queens states.
45Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Figure 4.6: The three major operations in genetic algorithm.
The initial population in (a) is ranked by the fitness function
in (b), resulting in pairs for mating in (c). They produce
offspring in (d), which are subject to mutation in (e).
46
Genetic AlgorithmsGenetic Algorithms
Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Genetic AlgorithmsGenetic Algorithms
• The 8-queens states involved in this reproduction step are
shown in Figure 4.7.
47
Figure 4.7: The 8-queens states corresponding to the first
two parents in Figure 4.6(c) and the first offspring in
Figure 4.6(d).
Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Genetic AlgorithmsGenetic Algorithms
• The production of the next generation of states is shown in
Figure 4.6(b)–(e).
• In (b), each state is rated by the objective function, or (in GA
terminology) the fitness function.
• A fitness function should return higher values for better
states, so, for the 8-queens problem we use the number of
nonattacking pairs of queens, which has a value of 28 for a
solution.
• The values of the four states are 24, 23, 20, and 11.
• In this particular variant of the genetic algorithm, the
probability of being chosen for reproducing is directly
proportional to the fitness score, and the percentages are
shown next to the raw scores.
48Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Genetic AlgorithmsGenetic Algorithms
• In (c), two pairs are selected at random for reproduction, in
accordance with the probabilities in (b).
• Notice that one individual is selected twice and one not at all.
• For each pair to be mated, a crossover point is chosen
randomly from the positions in the string.
• In Figure 4.6, the crossover points are after the third digit in
the first pair and after the fifth digit in the second pair.
• In (d), the offspring themselves are created by crossing over
the parent strings at the crossover point.
• For example, the first child of the first pair gets the first three
digits from the first parent and the remaining digits from the
second parent, whereas the second child gets the first three
digits from the second parent and the rest from the first
parent.
49Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Genetic AlgorithmsGenetic Algorithms
• The 8-queens states involved in this reproduction step are
shown in Figure 4.7.
50
Figure 4.7: The 8-queens states corresponding to the first
two parents in Figure 4.6(c) and the first offspring in
Figure 4.6(d).
Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Genetic AlgorithmsGenetic Algorithms
• The example shows that when two parent states are
quite different, the crossover operation can produce
a state that is a long way from either parent state.
• It is often the case that the population is quite
diverse early on in the process, so crossover (like
simulated annealing) frequently takes large steps in
the state space early in the search process and
smaller steps later on when must individuals are
quite similar.
51Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
Genetic AlgorithmsGenetic Algorithms
• Finally, in (e), each location is subject to random
mutation with a small independent probability.
• One digit was mutated in the first, third, and fourth
offspring.
• In the 8-queens problem, this corresponds to choosing a
queen at random and moving it to a random square in its
column.
52Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
53
Genetic AlgorithmsGenetic Algorithms
Figure: A genetic algorithm. The algorithm is the same as the
one diagrammed in the figure in slide no. 45, with one variation:
in this more popular version, each mating of two parents
produces only one offspring, not two.
Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
function GENETIC_ALGORITHM( population, FITNESS-FN) return an individual
input: population, a set of individuals
FITNESS-FN, a function which determines the quality of the individual
repeat
new_population ← empty set
loop for i from 1 to SIZE(population) do
x ← RANDOM_SELECTION(population, FITNESS_FN)
y ← RANDOM_SELECTION(population, FITNESS_FN)
child ← REPRODUCE(x,y)
if (small random probability) then child ← MUTATE(child )
add child to new_population
population ← new_population
until some individual is fit enough or enough time has elapsed
return the best individual
54
Genetic AlgorithmsGenetic Algorithms
Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
********** ********** If You Need Me ********** **********
Mail: tajim.cse@diu.edu.bd
Website: https://www.tajimiitju.blogspot.com
ORCID: https://orcid.org/0000-0002-2834-1507
LinkedIn: https://www.linkedin.com/in/tajimiitju
ResearchGate: https://www.researchgate.net/profile/Tajim_Md_Niamat_Ullah_Akhund
YouTube: https://www.youtube.com/tajimiitju?sub_confirmation=1
SlideShare: https://www.slideshare.net/TajimMdNiamatUllahAk
Facebook: https://www.facebook.com/tajim.mohammad
GitHub: https://github.com/tajimiitju
Google+: https://plus.google.com/+tajimiitju
Gmail: tajim.mohammad.3@gmail.com
Twitter: https://twitter.com/Tajim53
Thank you
Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund 55

More Related Content

What's hot

Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesDr. C.V. Suresh Babu
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agentsMegha Sharma
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}FellowBuddy.com
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search StrategiesAmey Kerkar
 
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfJenishaR1
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searchingLuigi Ceccaroni
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmvikas dhakane
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligencesandeep54552
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AIMegha Sharma
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniquesKirti Verma
 
Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms Syed Ahmed
 
Minmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesMinmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesSamiaAziz4
 
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...vikas dhakane
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceSahil Kumar
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search TechniquesJismy .K.Jose
 

What's hot (20)

Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithm
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
 
Forward and Backward chaining in AI
Forward and Backward chaining in AIForward and Backward chaining in AI
Forward and Backward chaining in AI
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniques
 
Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms
 
Minmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesMinmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slides
 
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
 
Uninformed search
Uninformed searchUninformed search
Uninformed search
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial Intelligence
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search Techniques
 
Intelligent Agents
Intelligent Agents Intelligent Agents
Intelligent Agents
 

Similar to CSE 412 AI Informed Search

Heuristic search
Heuristic searchHeuristic search
Heuristic searchNivethaS35
 
Heuristic search
Heuristic searchHeuristic search
Heuristic searchNivethaS35
 
Heuristic or informed search
Heuristic or informed searchHeuristic or informed search
Heuristic or informed searchHamzaJaved64
 
2-Heuristic Search.ppt
2-Heuristic Search.ppt2-Heuristic Search.ppt
2-Heuristic Search.pptMIT,Imphal
 
Overview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep LearningOverview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep LearningKhang Pham
 
Searching Informed Search.pdf
Searching Informed Search.pdfSearching Informed Search.pdf
Searching Informed Search.pdfDrBashirMSaad
 
clique-summary
clique-summaryclique-summary
clique-summaryJia Wang
 
informed_search.pdf
informed_search.pdfinformed_search.pdf
informed_search.pdfSankarTerli
 
4-Local search Artificial Intelligent Presentation
4-Local search Artificial Intelligent Presentation4-Local search Artificial Intelligent Presentation
4-Local search Artificial Intelligent Presentationfokac40868
 
Exploration Strategies in Reinforcement Learning
Exploration Strategies in Reinforcement LearningExploration Strategies in Reinforcement Learning
Exploration Strategies in Reinforcement LearningDongmin Lee
 
Introduction to artificial intelligence
Introduction to artificial intelligenceIntroduction to artificial intelligence
Introduction to artificial intelligencerishi ram khanal
 
Discrete Computaional Geometry
Discrete Computaional GeometryDiscrete Computaional Geometry
Discrete Computaional GeometrySaurav Mistry
 
Search problems in Artificial Intelligence
Search problems in Artificial IntelligenceSearch problems in Artificial Intelligence
Search problems in Artificial Intelligenceananth
 

Similar to CSE 412 AI Informed Search (20)

Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
Approximation Algorithms TSP
Approximation Algorithms   TSPApproximation Algorithms   TSP
Approximation Algorithms TSP
 
Lecture 3 problem solving
Lecture 3   problem solvingLecture 3   problem solving
Lecture 3 problem solving
 
Heuristic or informed search
Heuristic or informed searchHeuristic or informed search
Heuristic or informed search
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
m4-heuristics.ppt
m4-heuristics.pptm4-heuristics.ppt
m4-heuristics.ppt
 
2-Heuristic Search.ppt
2-Heuristic Search.ppt2-Heuristic Search.ppt
2-Heuristic Search.ppt
 
Overview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep LearningOverview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep Learning
 
Searching Informed Search.pdf
Searching Informed Search.pdfSearching Informed Search.pdf
Searching Informed Search.pdf
 
clique-summary
clique-summaryclique-summary
clique-summary
 
informed_search.pdf
informed_search.pdfinformed_search.pdf
informed_search.pdf
 
daa unit 1.pptx
daa unit 1.pptxdaa unit 1.pptx
daa unit 1.pptx
 
4-Local search Artificial Intelligent Presentation
4-Local search Artificial Intelligent Presentation4-Local search Artificial Intelligent Presentation
4-Local search Artificial Intelligent Presentation
 
Exploration Strategies in Reinforcement Learning
Exploration Strategies in Reinforcement LearningExploration Strategies in Reinforcement Learning
Exploration Strategies in Reinforcement Learning
 
M4 heuristics
M4 heuristicsM4 heuristics
M4 heuristics
 
Introduction to artificial intelligence
Introduction to artificial intelligenceIntroduction to artificial intelligence
Introduction to artificial intelligence
 
Discrete Computaional Geometry
Discrete Computaional GeometryDiscrete Computaional Geometry
Discrete Computaional Geometry
 
Search problems in Artificial Intelligence
Search problems in Artificial IntelligenceSearch problems in Artificial Intelligence
Search problems in Artificial Intelligence
 
02LocalSearch.pdf
02LocalSearch.pdf02LocalSearch.pdf
02LocalSearch.pdf
 

More from Tajim Md. Niamat Ullah Akhund

Artificial intelligence LAB 1 overview &amp; intelligent systems
Artificial intelligence LAB 1   overview &amp; intelligent systemsArtificial intelligence LAB 1   overview &amp; intelligent systems
Artificial intelligence LAB 1 overview &amp; intelligent systemsTajim Md. Niamat Ullah Akhund
 
Matlab lecture 9 – simpson 1,3 and trapezoidal method@taj
Matlab lecture 9 – simpson 1,3 and trapezoidal method@tajMatlab lecture 9 – simpson 1,3 and trapezoidal method@taj
Matlab lecture 9 – simpson 1,3 and trapezoidal method@tajTajim Md. Niamat Ullah Akhund
 
Matlab lecture 8 – newton's forward and backword interpolation@taj copy
Matlab lecture 8 – newton's forward and backword interpolation@taj   copyMatlab lecture 8 – newton's forward and backword interpolation@taj   copy
Matlab lecture 8 – newton's forward and backword interpolation@taj copyTajim Md. Niamat Ullah Akhund
 
Matlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@tajMatlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@tajTajim Md. Niamat Ullah Akhund
 
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@taj
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@tajMatlab lecture 3 – commands, the m files, data types, bitwise op, set@taj
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@tajTajim Md. Niamat Ullah Akhund
 
Matlab lecture 2 matlab basic syntax &amp; variables @taj
Matlab lecture 2   matlab basic syntax &amp; variables @tajMatlab lecture 2   matlab basic syntax &amp; variables @taj
Matlab lecture 2 matlab basic syntax &amp; variables @tajTajim Md. Niamat Ullah Akhund
 
Matlab lecture 1 - installation of matlab, introduction and course outline@taj
Matlab lecture 1 - installation of matlab, introduction and course outline@tajMatlab lecture 1 - installation of matlab, introduction and course outline@taj
Matlab lecture 1 - installation of matlab, introduction and course outline@tajTajim Md. Niamat Ullah Akhund
 
Circuit lab 9 verification of maximum power transfer theorem@taj
Circuit lab 9  verification of maximum power transfer theorem@tajCircuit lab 9  verification of maximum power transfer theorem@taj
Circuit lab 9 verification of maximum power transfer theorem@tajTajim Md. Niamat Ullah Akhund
 
Circuit lab 8 verification of thevenin's theorem@taj
Circuit lab 8  verification of thevenin's theorem@tajCircuit lab 8  verification of thevenin's theorem@taj
Circuit lab 8 verification of thevenin's theorem@tajTajim Md. Niamat Ullah Akhund
 
Circuit lab 7 verification of superposition theorem@taj
Circuit lab 7  verification of superposition theorem@tajCircuit lab 7  verification of superposition theorem@taj
Circuit lab 7 verification of superposition theorem@tajTajim Md. Niamat Ullah Akhund
 

More from Tajim Md. Niamat Ullah Akhund (20)

AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)
 
AI Lecture 6 (logical agents)
AI Lecture 6 (logical agents)AI Lecture 6 (logical agents)
AI Lecture 6 (logical agents)
 
AI Lecture 5 (game playing)
AI Lecture 5 (game playing)AI Lecture 5 (game playing)
AI Lecture 5 (game playing)
 
AI Lecture 2 (intelligent agents)
AI Lecture 2 (intelligent agents)AI Lecture 2 (intelligent agents)
AI Lecture 2 (intelligent agents)
 
AI Lecture 1 (introduction)
AI Lecture 1 (introduction)AI Lecture 1 (introduction)
AI Lecture 1 (introduction)
 
Course outline (cse 412 - artificial intelligence)
Course outline (cse   412 - artificial intelligence)Course outline (cse   412 - artificial intelligence)
Course outline (cse 412 - artificial intelligence)
 
Artificial intelligence LAB 1 overview &amp; intelligent systems
Artificial intelligence LAB 1   overview &amp; intelligent systemsArtificial intelligence LAB 1   overview &amp; intelligent systems
Artificial intelligence LAB 1 overview &amp; intelligent systems
 
Matlab lecture 9 – simpson 1,3 and trapezoidal method@taj
Matlab lecture 9 – simpson 1,3 and trapezoidal method@tajMatlab lecture 9 – simpson 1,3 and trapezoidal method@taj
Matlab lecture 9 – simpson 1,3 and trapezoidal method@taj
 
Matlab lecture 8 – newton's forward and backword interpolation@taj copy
Matlab lecture 8 – newton's forward and backword interpolation@taj   copyMatlab lecture 8 – newton's forward and backword interpolation@taj   copy
Matlab lecture 8 – newton's forward and backword interpolation@taj copy
 
Matlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@tajMatlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@taj
 
Matlab lecture 6 – newton raphson method@taj copy
Matlab lecture 6 – newton raphson method@taj   copyMatlab lecture 6 – newton raphson method@taj   copy
Matlab lecture 6 – newton raphson method@taj copy
 
Matlab lecture 5 bisection method@taj
Matlab lecture 5  bisection method@tajMatlab lecture 5  bisection method@taj
Matlab lecture 5 bisection method@taj
 
Matlab lecture 4 loops@taj
Matlab lecture 4  loops@tajMatlab lecture 4  loops@taj
Matlab lecture 4 loops@taj
 
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@taj
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@tajMatlab lecture 3 – commands, the m files, data types, bitwise op, set@taj
Matlab lecture 3 – commands, the m files, data types, bitwise op, set@taj
 
Matlab lecture 2 matlab basic syntax &amp; variables @taj
Matlab lecture 2   matlab basic syntax &amp; variables @tajMatlab lecture 2   matlab basic syntax &amp; variables @taj
Matlab lecture 2 matlab basic syntax &amp; variables @taj
 
Matlab lecture 1 - installation of matlab, introduction and course outline@taj
Matlab lecture 1 - installation of matlab, introduction and course outline@tajMatlab lecture 1 - installation of matlab, introduction and course outline@taj
Matlab lecture 1 - installation of matlab, introduction and course outline@taj
 
Circuit lab 10 verification of norton's theorem@taj
Circuit lab 10  verification of norton's theorem@tajCircuit lab 10  verification of norton's theorem@taj
Circuit lab 10 verification of norton's theorem@taj
 
Circuit lab 9 verification of maximum power transfer theorem@taj
Circuit lab 9  verification of maximum power transfer theorem@tajCircuit lab 9  verification of maximum power transfer theorem@taj
Circuit lab 9 verification of maximum power transfer theorem@taj
 
Circuit lab 8 verification of thevenin's theorem@taj
Circuit lab 8  verification of thevenin's theorem@tajCircuit lab 8  verification of thevenin's theorem@taj
Circuit lab 8 verification of thevenin's theorem@taj
 
Circuit lab 7 verification of superposition theorem@taj
Circuit lab 7  verification of superposition theorem@tajCircuit lab 7  verification of superposition theorem@taj
Circuit lab 7 verification of superposition theorem@taj
 

Recently uploaded

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 

Recently uploaded (20)

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 

CSE 412 AI Informed Search

  • 1. CSE 412: Artificial IntelligenceCSE 412: Artificial Intelligence Fall 2018Fall 2018 Topic – 4: Informed SearchTopic – 4: Informed Search and Explorationand Exploration Tajim Md. Niamat Ullah Akhund Lecturer Department of Computer Science and Engineering Daffodil International University Email: tajim.cse@diu.edu.bd 1
  • 2. Informed (Heuristic) Search StrategiesInformed (Heuristic) Search Strategies Heuristic FunctionsHeuristic Functions Local Search Algorithms and OptimizationLocal Search Algorithms and Optimization ProblemsProblems  Hill-climbing search  Simulated annealing search  Local beam search  Genetic algorithms Topic ContentsTopic Contents 2
  • 3. Best-First SearchBest-First Search • Node is selected for expansion based on an evaluation function f(n) • Evaluation function estimates distance to the goal • Choose node which appears best • Implementation: – fringe is a priority queue sorted in ascending order of f-values 3Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 4. A Heuristic FunctionA Heuristic Function hh((nn)) • Dictionary definition: “A rule of thumb, simplification, or educated guess that reduces or limits the search for solutions in domains that are difficult and poorly understood” • For best-first search: – h(n) = estimated cost of the cheapest path from node n to goal node 4Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 5. Romania with Step Costs in KmRomania with Step Costs in Km • hSLD = straight-line distance heuristic • hSLD cannot be computed from the problem description itself • In greedy best-first search f(n)=h(n) – Expand node that is closest to goal 5Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 6. Greedy Search: ExampleGreedy Search: Example 6Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 7. Greedy Search: ExampleGreedy Search: Example 7Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 8. Greedy Search: ExampleGreedy Search: Example 8Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 9. Greedy Search: ExampleGreedy Search: Example • Goal reached – For this example no node is expanded that is not on the solution path – But not optimal (see Arad, Sibiu, Rimnicu Vilcea, Pitesti) 9Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 10. Greedy Search: EvaluationGreedy Search: Evaluation • Complete or optimal: no – Minimizing h(n) can result in false starts, e.g. Iasi to Fagaras – Check on repeated states 10Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 11. Greedy Search: EvaluationGreedy Search: Evaluation • Time and space complexity: – In the worst case all the nodes in the search tree are generated: O(bm ) (m is maximum depth of search tree and b is branching factor) – But: choice of a good heuristic can give dramatic improvement 11Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 12. A* SearchA* Search • Best-known form of best-first search • Idea: avoid expanding paths that are already expensive • Evaluation function f(n)= g(n) + h(n) – g(n): the cost (so far) to reach the node – h(n): estimated cost to get from the node to the goal – f(n): estimated total cost of path through n to goal • A* search is both complete and optimal if h(n) satisfies certain conditions 12Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 13. A* SearchA* Search • A* search is optimal if h(n) is an admissible heuristic • A heuristic is admissible if it never overestimates the cost to reach the goal – h(n) ≤ h*(n) where h*(n) is the true cost from n • Admissible heuristics are optimistic about the cost of solving the problem • e.g. hSLD(n) never overestimates the actual road distance 13Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 14. Romania ExampleRomania Example 14Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 15. A* Search: ExampleA* Search: Example 15Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 16. A* Search: ExampleA* Search: Example 16Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 17. A* Search: ExampleA* Search: Example 17Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 18. A* Search: ExampleA* Search: Example 18Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 19. A* Search: ExampleA* Search: Example 19Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 20. A* Search: ExampleA* Search: Example 20Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 21. Optimality of A*Optimality of A* • Suppose a suboptimal goal node G2 appears on the fringe and let the cost of the optimal solution be C*. • Since G2 is suboptimal and h(G2) = 0 (true for any goal node), we know that f(G2) = g(G2) + h(G2) = g(G2) > C* • Now consider a fringe node n that is on an optimal solution path. • If h(n) does not overestimate the cost of completing the solution path, then we know that f(n) = g(n) + h(n) ≤ C* • Since f(n) ≤ C* < f(G2), G2 will not be expanded and A* search must return an optimal solution. 21Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 22. A* Search: EvaluationA* Search: Evaluation • Complete: yes – Unless there are infinitely many nodes with f < f(G) • Optimal: yes – A* is also optimally efficient for any given h(n). That is, no other optimal algorithm is guaranteed to expand fewer nodes than A*. 22Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 23. A* Search: EvaluationA* Search: Evaluation • Time complexity: – number of nodes expanded is still exponential in length of solution • Space complexity: – All generated nodes are kept in memory – A* usually runs out of space before running out of time 23Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 24. Heuristic FunctionsHeuristic Functions • Let us see two heuristics for a problem. 24Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 25. Example: 8-puzzleExample: 8-puzzle • States: location of each tile plus blank • Initial state: Any state can be initial • Actions: Move blank {Left, Right, Up, Down} • Goal test: Check whether goal configuration is reached • Path cost: Number of actions to reach goal 25Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 26. Example: 8-puzzleExample: 8-puzzle • For 8-puzzle problem: – h1 = number of tiles out of place. In the example h1= 8 – h2 = total Manhattan distance of errant pieces. In the example h2 = 3+1+2+2+2+3+3+2 = 18 26Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 27. Local Search Algorithms andLocal Search Algorithms and Optimization ProblemsOptimization Problems • Previously: systematic exploration of search space – Path to goal is solution to problem • for some problem classes, it is sufficient to find a solution – the path to the solution is not relevant, e.g. 8-queens • Different algorithms can be used – LocalLocal search • memory requirements can be dramatically relaxed by modifying the current state – all previous states can be discarded – since only information about the current state is kept, such methods are called local 27Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 28. • Local search = use single current state and move to neighboring states. • Advantages: – Use very little memory – Find often reasonable solutions in large or infinite state spaces. • Are also useful for pure optimization problems. – Find best state according to some objective function. – e.g. survival of the fittest as a metaphor for optimization. Local Search Algorithms andLocal Search Algorithms and Optimization ProblemsOptimization Problems 28Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 29. Local Search Algorithms andLocal Search Algorithms and Optimization ProblemsOptimization Problems 29Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 30. Hill-Climbing SearchHill-Climbing Search • continually moves uphill – increasing value of the evaluation function – gradient descent search is a variation that moves downhill • is a loop that continuously moves in the direction of increasing value - that is, uphill. – It terminates when a peak is reached. 30Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 31. Hill-Climbing SearchHill-Climbing Search • Hill-climbing does not look ahead of the immediate neighbors of the current state. • Hill-climbing chooses randomly among the set of best successors, if there is more than one. • Hill-climbing is also called greedy local search • Hill-climbing is a very simple strategy with low space requirements – stores only the state and its evaluation, no search tree • 31Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 32. Hill-Climbing ExampleHill-Climbing Example • 8-queens problem (complete-state formulation). • Successor function: move a single queen to another square in the same column. • Heuristic function h(n): the number of pairs of queens that are attacking each other (directly or indirectly). 32Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 33. Hill-Climbing ExampleHill-Climbing Example (a)(a) An 8-queens state with heuristic cost estimate h = 17, showing the value of h for each possible successor obtained by moving a queen within its column. The best moves are marked. (b)(b) A local minimum in the 8-queens state space; the state has h = 1 but every successor has a higher cost. (a)(a) (b)(b) 33Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 34. 34Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 35. DrawbacksDrawbacks • Ridge = sequence of local maxima difficult for greedy algorithms to navigate • Plateaux = an area of the state space where the evaluation function is flat. • Gets stuck 86% of the time. 35Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 36. Hill-Climbing SearchHill-Climbing Search • problems – local maxima • algorithm can’t go higher, but is not at a satisfactory solution – plateau • area where the evaluation function is flat – ridges • search may oscillate slowly 36Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 37. Escaping Local OptimaEscaping Local Optima  HC gets stuck at local maxima limiting the quality of the solution found. • Two ways to modify HC: 1. choice of neighbor 2. criteria for accepting neighbor for current • For example: 1. choose neighbor randomly 2. accept neighbor if it is better or if it isn't, accept with some fixed probability p 37Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 38. Escaping Local OptimaEscaping Local Optima • Modified HC can escape local maxima but: – chance of making a bad move is the same at the beginning of the search as at the end – magnitude of improvement or lack of is ignored How can HC address these concerns? – fixed probability p that bad move is accepted can be replaced with a probability that decreases as the search proceeds – now as the search progresses, the chances of taking a bad move reduces 38Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 39. Hill-Climbing SearchHill-Climbing Search function HILL-CLIMBING( problem) return a state that is a local maximum input: problem, a problem local variables: current, a node. neighbor, a node. current ← MAKE-NODE(INITIAL-STATE[problem]) loop do neighbor ← a highest valued successor of current if VALUE [neighbor] ≤ VALUE[current] then return STATE[current] current ← neighbor 39Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 40. Hill-Climbing VariationsHill-Climbing Variations • Stochastic hill-climbing – Random selection among the uphill moves. – The selection probability can vary with the steepness of the uphill move. • First-choice hill-climbing – implements stochastic hill climbing by generating successors randomly until a better one is found. • Random-restart hill-climbing – Tries to avoid getting stuck in local maxima. 40Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 41. Simulated AnnealingSimulated Annealing • Escape local maxima by allowing “bad” moves. – Idea: but gradually decrease their size and frequency. • Origin; metallurgical annealing • Bouncing ball analogy: – Shaking hard (= high temperature). – Shaking less (= lower the temperature). • If T decreases slowly enough, best state is reached. • Applied for VLSI layout, airline scheduling, etc. 41Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 42. function SIMULATED-ANNEALING( problem, schedule) return a solution state input: problem, a problem schedule, a mapping from time to temperature local variables: current, a node. next, a node. T, a “temperature” controlling the probability of downward steps current ← MAKE-NODE(INITIAL-STATE[problem]) for t ← 1 to ∞ do T ← schedule[t] if T = 0 then return current next ← a randomly selected successor of current ∆E ← VALUE[next] - VALUE[current] if ∆E > 0 then current ← next else current ← next only with probability e∆E /T Simulated AnnealingSimulated Annealing 42Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 43. Local Beam SearchLocal Beam Search • Keep track of k states instead of one – Initially: k random states – Next: determine all successors of k states – If any of successors is goal → finished – Else select k best from successors and repeat. • Major difference with random-restart search – Information is shared among k search threads. • Can suffer from lack of diversity. – Stochastic variant: choose k successors at proportionally to state success. 43Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 44. Genetic AlgorithmsGenetic Algorithms • Variant of local beam search with sexual recombination. 44Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 45. Genetic AlgorithmsGenetic Algorithms • GAs begin with a set of k randomly generated states, called the population. • Each state, or individual, is represented as a string over a finite alphabet—most commonly, a string of 0s and 1s. • For example, an 8-queens state must specify the positions of 8 queens, each in a column of 8 squares, and so requires 8 x log2 8 = 24 bits. • Alternatively, the state could be represented as 8 digits, each in the range from 1 to 8. • Figure 4.6(a) shows a population of four 8-digit strings representing 8-queens states. 45Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 46. Figure 4.6: The three major operations in genetic algorithm. The initial population in (a) is ranked by the fitness function in (b), resulting in pairs for mating in (c). They produce offspring in (d), which are subject to mutation in (e). 46 Genetic AlgorithmsGenetic Algorithms Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 47. Genetic AlgorithmsGenetic Algorithms • The 8-queens states involved in this reproduction step are shown in Figure 4.7. 47 Figure 4.7: The 8-queens states corresponding to the first two parents in Figure 4.6(c) and the first offspring in Figure 4.6(d). Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 48. Genetic AlgorithmsGenetic Algorithms • The production of the next generation of states is shown in Figure 4.6(b)–(e). • In (b), each state is rated by the objective function, or (in GA terminology) the fitness function. • A fitness function should return higher values for better states, so, for the 8-queens problem we use the number of nonattacking pairs of queens, which has a value of 28 for a solution. • The values of the four states are 24, 23, 20, and 11. • In this particular variant of the genetic algorithm, the probability of being chosen for reproducing is directly proportional to the fitness score, and the percentages are shown next to the raw scores. 48Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 49. Genetic AlgorithmsGenetic Algorithms • In (c), two pairs are selected at random for reproduction, in accordance with the probabilities in (b). • Notice that one individual is selected twice and one not at all. • For each pair to be mated, a crossover point is chosen randomly from the positions in the string. • In Figure 4.6, the crossover points are after the third digit in the first pair and after the fifth digit in the second pair. • In (d), the offspring themselves are created by crossing over the parent strings at the crossover point. • For example, the first child of the first pair gets the first three digits from the first parent and the remaining digits from the second parent, whereas the second child gets the first three digits from the second parent and the rest from the first parent. 49Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 50. Genetic AlgorithmsGenetic Algorithms • The 8-queens states involved in this reproduction step are shown in Figure 4.7. 50 Figure 4.7: The 8-queens states corresponding to the first two parents in Figure 4.6(c) and the first offspring in Figure 4.6(d). Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 51. Genetic AlgorithmsGenetic Algorithms • The example shows that when two parent states are quite different, the crossover operation can produce a state that is a long way from either parent state. • It is often the case that the population is quite diverse early on in the process, so crossover (like simulated annealing) frequently takes large steps in the state space early in the search process and smaller steps later on when must individuals are quite similar. 51Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 52. Genetic AlgorithmsGenetic Algorithms • Finally, in (e), each location is subject to random mutation with a small independent probability. • One digit was mutated in the first, third, and fourth offspring. • In the 8-queens problem, this corresponds to choosing a queen at random and moving it to a random square in its column. 52Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 53. 53 Genetic AlgorithmsGenetic Algorithms Figure: A genetic algorithm. The algorithm is the same as the one diagrammed in the figure in slide no. 45, with one variation: in this more popular version, each mating of two parents produces only one offspring, not two. Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 54. function GENETIC_ALGORITHM( population, FITNESS-FN) return an individual input: population, a set of individuals FITNESS-FN, a function which determines the quality of the individual repeat new_population ← empty set loop for i from 1 to SIZE(population) do x ← RANDOM_SELECTION(population, FITNESS_FN) y ← RANDOM_SELECTION(population, FITNESS_FN) child ← REPRODUCE(x,y) if (small random probability) then child ← MUTATE(child ) add child to new_population population ← new_population until some individual is fit enough or enough time has elapsed return the best individual 54 Genetic AlgorithmsGenetic Algorithms Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund
  • 55. ********** ********** If You Need Me ********** ********** Mail: tajim.cse@diu.edu.bd Website: https://www.tajimiitju.blogspot.com ORCID: https://orcid.org/0000-0002-2834-1507 LinkedIn: https://www.linkedin.com/in/tajimiitju ResearchGate: https://www.researchgate.net/profile/Tajim_Md_Niamat_Ullah_Akhund YouTube: https://www.youtube.com/tajimiitju?sub_confirmation=1 SlideShare: https://www.slideshare.net/TajimMdNiamatUllahAk Facebook: https://www.facebook.com/tajim.mohammad GitHub: https://github.com/tajimiitju Google+: https://plus.google.com/+tajimiitju Gmail: tajim.mohammad.3@gmail.com Twitter: https://twitter.com/Tajim53 Thank you Tajim Md. Niamat Ullah AkhundTajim Md. Niamat Ullah Akhund 55