SlideShare a Scribd company logo
Topic To Be Covered:
A* Search Algorithm
Jagdamba Education Society's
SND College of Engineering & Research Centre
Department of Computer Engineering
SUBJECT: Artificial Intelligence & Robotics
Lecture No-9(ii)
Prof.Dhakane Vikas N
A* Search Algorithm
 This is informed search technique also called as HEURISTIC search.
 This algo. Works using heuristic value.
 A* uses h(n)->Heuristic function & g(n)->Cost to reach the node ‘n’ from
start state.
 Find shortest path though search spaces.
 Estimated Cost f(n)=g(n)+h(n)
 A* gives Fast & Optimal result as compared with previous algorithms.
 Space & Time Complexity of BFS is also O(V+E) where V is vertices and E
is edges.
 Also Written as:-O(b) ^d Where, b->Branching factor d->depth
A* Search Algorithm
 A* Algorithm extends the path that minimizes the following function-
f(n) = g(n) + h(n)
Here,
 ‘n’ is the last node on the path
 g(n) is the cost of the path from start node to node ‘n’
 h(n) is a heuristic function that estimates cost of the cheapest path from
node ‘n’ to the goal node
Algorithm-
 The implementation of A* Algorithm involves maintaining two lists-
OPEN and CLOSED.
 OPEN contains those nodes that have been evaluated by the heuristic
function but have not been expanded into successors yet.
 CLOSED contains those nodes that have already been visited.
The algorithm is as follows-
A* Search Algorithm
The algorithm is as follows-
Step-01:
 Define a list OPEN.
 Initially, OPEN consists solely of a single node, the start node S.
Step-02:
If the list is empty, return failure and exit.
Step-03:
 Remove node n with the smallest value of f(n) from OPEN and move it
to list CLOSED.
 If node n is a goal state, return success and exit.
Step-04:
Expand node n.
A* Search Algorithm
Step-05:
 If any successor to n is the goal node, return success and the solution by
tracing the path from goal node to S.
 Otherwise, go to Step-06.
Step-06:
For each successor node,
 Apply the evaluation function f to the node.
 If the node has not been in either list, add it to OPEN.
Step-07:
Go back to Step-02.
A* Search Algorithm
Example with Solution:
Consider the following graph-
 The numbers written on edges
represent the distance between
the nodes.
 The numbers written on nodes
represent the heuristic value.
 Find the most cost-effective path
to reach from start state A to
final state J using A* Algorithm.
A* Search Algorithm
Example with Solution:
Solution-
Step-01:
We start with node A.
Node B and Node F can be reached from
node A.
A* Algorithm calculates f(B) and f(F).
Estimated Cost f(n)=g(n)+h(n)
f(B) = 6 + 8 = 14
f(F) = 3 + 6 = 9
Since f(F) < f(B), so it decides to go to
node F.
->Closed list(F)
Path- A → F
A* Search Algorithm
Example with Solution:
Solution-
Step-02:
Node G and Node H can be reached from
node F.
A* Algorithm calculates f(G) and f(H).
f(G) = (3+1) + 5 = 9
f(H) = (3+7) + 3 = 13
Since f(G) < f(H), so it decides to go to
node G.
->Closed list(G)
Path- A → F → G
A* Search Algorithm
Example with Solution:
Solution-
Step-03:
Node I can be reached from node G.
A* Algorithm calculates f(I).
f(I) = (3+1+3) + 1 = 8
It decides to go to node I.
->Closed list(I)
Path- A → F → G → I
A* Search Algorithm
Example with Solution:
Solution-
Step-04:
Node E, Node H and Node J can be reached
from node I.
A* Algorithm calculates f(E), f(H) and f(J).
f(E) = (3+1+3+5) + 3 = 15
f(H) = (3+1+3+2) + 3 = 12
f(J) = (3+1+3+3) + 0 = 10
Since f(J) is least, so it decides to go to
node J.
->Closed list(J)
Shortest Path- A → F → G → I → J
A* Search Algorithm
EXAMPLE-02
A* Search Algorithm
Advantages of BFS:
A* Algorithm is one of the best path finding algorithms.
It is Complete & Optimal
Used to solve complex problems.
Disadvantages of BFS:
Requires more memory
A* Search Algorithm
A* Search Algorithm
Ad

More Related Content

What's hot (20)

Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
FellowBuddy.com
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
Dr. C.V. Suresh Babu
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
hodcsencet
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
Muhammad Amjad Rana
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
sandeep54552
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentationDijkstra's algorithm presentation
Dijkstra's algorithm presentation
Subid Biswas
 
Hill climbing
Hill climbingHill climbing
Hill climbing
Mohammad Faizan
 
Graph coloring using backtracking
Graph coloring using backtrackingGraph coloring using backtracking
Graph coloring using backtracking
shashidharPapishetty
 
LISP: Introduction to lisp
LISP: Introduction to lispLISP: Introduction to lisp
LISP: Introduction to lisp
DataminingTools Inc
 
Problems, Problem spaces and Search
Problems, Problem spaces and SearchProblems, Problem spaces and Search
Problems, Problem spaces and Search
BMS Institute of Technology and Management
 
Artificial Intelligence - Hill climbing.
Artificial Intelligence - Hill climbing.Artificial Intelligence - Hill climbing.
Artificial Intelligence - Hill climbing.
StephenTec
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.ppt
karthikaparthasarath
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
Megha Sharma
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
Vishal Singh
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingLeaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shaping
Vimal Dewangan
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.ppt
arunsingh660
 
Example of iterative deepening search &amp; bidirectional search
Example of iterative deepening search &amp; bidirectional searchExample of iterative deepening search &amp; bidirectional search
Example of iterative deepening search &amp; bidirectional search
Abhijeet Agarwal
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
Tech_MX
 
Artificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gameArtificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe game
manika kumari
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
FellowBuddy.com
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
hodcsencet
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
sandeep54552
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentationDijkstra's algorithm presentation
Dijkstra's algorithm presentation
Subid Biswas
 
Artificial Intelligence - Hill climbing.
Artificial Intelligence - Hill climbing.Artificial Intelligence - Hill climbing.
Artificial Intelligence - Hill climbing.
StephenTec
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.ppt
karthikaparthasarath
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
Megha Sharma
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
Vishal Singh
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingLeaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shaping
Vimal Dewangan
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.ppt
arunsingh660
 
Example of iterative deepening search &amp; bidirectional search
Example of iterative deepening search &amp; bidirectional searchExample of iterative deepening search &amp; bidirectional search
Example of iterative deepening search &amp; bidirectional search
Abhijeet Agarwal
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
Tech_MX
 
Artificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gameArtificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe game
manika kumari
 

Similar to A* Search Algorithm (20)

A Star Algorithm in Artificial intelligence
A Star Algorithm in Artificial intelligenceA Star Algorithm in Artificial intelligence
A Star Algorithm in Artificial intelligence
vipulkondekar
 
UNIT 2 - Artificial intelligence merged.pdf
UNIT 2 - Artificial intelligence merged.pdfUNIT 2 - Artificial intelligence merged.pdf
UNIT 2 - Artificial intelligence merged.pdf
SwarnaMugi2
 
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdfAI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
Guru Nanak Technical Institutions
 
Unit 3 Informed Search Strategies.pptx
Unit  3 Informed Search Strategies.pptxUnit  3 Informed Search Strategies.pptx
Unit 3 Informed Search Strategies.pptx
DrYogeshDeshmukh1
 
AI BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
AI BEST FIRST,A-STAR,AO-STAR SEARCH.pptxAI BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
AI BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
KALPANAC20
 
A* algorithm
A* algorithmA* algorithm
A* algorithm
Komal Samdariya
 
AI3391 Session 10 A searching algorithm.pptx
AI3391 Session 10 A searching algorithm.pptxAI3391 Session 10 A searching algorithm.pptx
AI3391 Session 10 A searching algorithm.pptx
Guru Nanak Technical Institutions
 
Heuristic Searching: A* Search
Heuristic Searching: A* SearchHeuristic Searching: A* Search
Heuristic Searching: A* Search
IOSR Journals
 
AI_Session 8 A searching algorithm .pptx
AI_Session 8 A searching algorithm .pptxAI_Session 8 A searching algorithm .pptx
AI_Session 8 A searching algorithm .pptx
Guru Nanak Technical Institutions
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic search
Tianlu Wang
 
AI : A* AND RANDOMIZED SEARCH METHOD​.pptx
AI : A* AND RANDOMIZED SEARCH METHOD​.pptxAI : A* AND RANDOMIZED SEARCH METHOD​.pptx
AI : A* AND RANDOMIZED SEARCH METHOD​.pptx
Ananthi Palanisamy
 
Unit 2 Topic 4 Informed search strategies AO.ppt
Unit 2 Topic 4 Informed search strategies AO.pptUnit 2 Topic 4 Informed search strategies AO.ppt
Unit 2 Topic 4 Informed search strategies AO.ppt
ssuser470a6d1
 
A* and Min-Max Searching Algorithms in AI , DSA.pdf
A* and Min-Max Searching Algorithms in AI , DSA.pdfA* and Min-Max Searching Algorithms in AI , DSA.pdf
A* and Min-Max Searching Algorithms in AI , DSA.pdf
CS With Logic
 
Heuristic search for AI CSE EVE dsfdsf sdfdsfsdf sdfdsfdsfsd sdfsdfds
Heuristic search for AI CSE EVE dsfdsf sdfdsfsdf sdfdsfdsfsd sdfsdfdsHeuristic search for AI CSE EVE dsfdsf sdfdsfsdf sdfdsfdsfsd sdfsdfds
Heuristic search for AI CSE EVE dsfdsf sdfdsfsdf sdfdsfdsfsd sdfsdfds
cselabrtmaktu
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithm
Hema Kashyap
 
A star
A starA star
A star
minhaz uddin
 
A star algorithms
A star algorithmsA star algorithms
A star algorithms
sandeep54552
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
PalGov
 
Route-Planning other sesion for Universal
Route-Planning other sesion for UniversalRoute-Planning other sesion for Universal
Route-Planning other sesion for Universal
Didik56
 
AO star algorithm -Adv-Ltms-comp AI.pptx
AO star algorithm -Adv-Ltms-comp AI.pptxAO star algorithm -Adv-Ltms-comp AI.pptx
AO star algorithm -Adv-Ltms-comp AI.pptx
karthikaparthasarath
 
A Star Algorithm in Artificial intelligence
A Star Algorithm in Artificial intelligenceA Star Algorithm in Artificial intelligence
A Star Algorithm in Artificial intelligence
vipulkondekar
 
UNIT 2 - Artificial intelligence merged.pdf
UNIT 2 - Artificial intelligence merged.pdfUNIT 2 - Artificial intelligence merged.pdf
UNIT 2 - Artificial intelligence merged.pdf
SwarnaMugi2
 
Unit 3 Informed Search Strategies.pptx
Unit  3 Informed Search Strategies.pptxUnit  3 Informed Search Strategies.pptx
Unit 3 Informed Search Strategies.pptx
DrYogeshDeshmukh1
 
AI BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
AI BEST FIRST,A-STAR,AO-STAR SEARCH.pptxAI BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
AI BEST FIRST,A-STAR,AO-STAR SEARCH.pptx
KALPANAC20
 
Heuristic Searching: A* Search
Heuristic Searching: A* SearchHeuristic Searching: A* Search
Heuristic Searching: A* Search
IOSR Journals
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic search
Tianlu Wang
 
AI : A* AND RANDOMIZED SEARCH METHOD​.pptx
AI : A* AND RANDOMIZED SEARCH METHOD​.pptxAI : A* AND RANDOMIZED SEARCH METHOD​.pptx
AI : A* AND RANDOMIZED SEARCH METHOD​.pptx
Ananthi Palanisamy
 
Unit 2 Topic 4 Informed search strategies AO.ppt
Unit 2 Topic 4 Informed search strategies AO.pptUnit 2 Topic 4 Informed search strategies AO.ppt
Unit 2 Topic 4 Informed search strategies AO.ppt
ssuser470a6d1
 
A* and Min-Max Searching Algorithms in AI , DSA.pdf
A* and Min-Max Searching Algorithms in AI , DSA.pdfA* and Min-Max Searching Algorithms in AI , DSA.pdf
A* and Min-Max Searching Algorithms in AI , DSA.pdf
CS With Logic
 
Heuristic search for AI CSE EVE dsfdsf sdfdsfsdf sdfdsfdsfsd sdfsdfds
Heuristic search for AI CSE EVE dsfdsf sdfdsfsdf sdfdsfdsfsd sdfsdfdsHeuristic search for AI CSE EVE dsfdsf sdfdsfsdf sdfdsfdsfsd sdfsdfds
Heuristic search for AI CSE EVE dsfdsf sdfdsfsdf sdfdsfdsfsd sdfsdfds
cselabrtmaktu
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithm
Hema Kashyap
 
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearchJarrar.lecture notes.aai.2011s.ch4.informedsearch
Jarrar.lecture notes.aai.2011s.ch4.informedsearch
PalGov
 
Route-Planning other sesion for Universal
Route-Planning other sesion for UniversalRoute-Planning other sesion for Universal
Route-Planning other sesion for Universal
Didik56
 
AO star algorithm -Adv-Ltms-comp AI.pptx
AO star algorithm -Adv-Ltms-comp AI.pptxAO star algorithm -Adv-Ltms-comp AI.pptx
AO star algorithm -Adv-Ltms-comp AI.pptx
karthikaparthasarath
 
Ad

More from vikas dhakane (20)

Ai lecture 14(unit03)
Ai lecture  14(unit03)Ai lecture  14(unit03)
Ai lecture 14(unit03)
vikas dhakane
 
Ai lecture 13(unit03)
Ai lecture  13(unit03)Ai lecture  13(unit03)
Ai lecture 13(unit03)
vikas dhakane
 
Ai lecture 13(unit03)
Ai lecture  13(unit03)Ai lecture  13(unit03)
Ai lecture 13(unit03)
vikas dhakane
 
Ai lecture 12(unit03)
Ai lecture  12(unit03)Ai lecture  12(unit03)
Ai lecture 12(unit03)
vikas dhakane
 
Ai lecture 12(unit03)
Ai lecture  12(unit03)Ai lecture  12(unit03)
Ai lecture 12(unit03)
vikas dhakane
 
Ai lecture 11(unit03)
Ai lecture  11(unit03)Ai lecture  11(unit03)
Ai lecture 11(unit03)
vikas dhakane
 
Ai lecture 11(unit03)
Ai lecture  11(unit03)Ai lecture  11(unit03)
Ai lecture 11(unit03)
vikas dhakane
 
Ai lecture 10(unit03)
Ai lecture  10(unit03)Ai lecture  10(unit03)
Ai lecture 10(unit03)
vikas dhakane
 
Ai lecture 10(unit03)
Ai lecture  10(unit03)Ai lecture  10(unit03)
Ai lecture 10(unit03)
vikas dhakane
 
Ai lecture 09(unit03)
Ai lecture  09(unit03)Ai lecture  09(unit03)
Ai lecture 09(unit03)
vikas dhakane
 
Ai lecture 07(unit03)
Ai lecture  07(unit03)Ai lecture  07(unit03)
Ai lecture 07(unit03)
vikas dhakane
 
Ai lecture 05(unit03)
Ai lecture  05(unit03)Ai lecture  05(unit03)
Ai lecture 05(unit03)
vikas dhakane
 
Ai lecture 05(unit03)
Ai lecture  05(unit03)Ai lecture  05(unit03)
Ai lecture 05(unit03)
vikas dhakane
 
Ai lecture 04(unit03)
Ai lecture  04(unit03)Ai lecture  04(unit03)
Ai lecture 04(unit03)
vikas dhakane
 
Ai lecture 04(unit03)
Ai lecture  04(unit03)Ai lecture  04(unit03)
Ai lecture 04(unit03)
vikas dhakane
 
Ai lecture 03(unit03)
Ai lecture  03(unit03)Ai lecture  03(unit03)
Ai lecture 03(unit03)
vikas dhakane
 
Ai lecture 03(unit03)
Ai lecture  03(unit03)Ai lecture  03(unit03)
Ai lecture 03(unit03)
vikas dhakane
 
Ai lecture 003(unit03)
Ai lecture  003(unit03)Ai lecture  003(unit03)
Ai lecture 003(unit03)
vikas dhakane
 
Ai lecture 003(unit03)
Ai lecture  003(unit03)Ai lecture  003(unit03)
Ai lecture 003(unit03)
vikas dhakane
 
Ai lecture 02(unit03)
Ai lecture  02(unit03)Ai lecture  02(unit03)
Ai lecture 02(unit03)
vikas dhakane
 
Ai lecture 14(unit03)
Ai lecture  14(unit03)Ai lecture  14(unit03)
Ai lecture 14(unit03)
vikas dhakane
 
Ai lecture 13(unit03)
Ai lecture  13(unit03)Ai lecture  13(unit03)
Ai lecture 13(unit03)
vikas dhakane
 
Ai lecture 13(unit03)
Ai lecture  13(unit03)Ai lecture  13(unit03)
Ai lecture 13(unit03)
vikas dhakane
 
Ai lecture 12(unit03)
Ai lecture  12(unit03)Ai lecture  12(unit03)
Ai lecture 12(unit03)
vikas dhakane
 
Ai lecture 12(unit03)
Ai lecture  12(unit03)Ai lecture  12(unit03)
Ai lecture 12(unit03)
vikas dhakane
 
Ai lecture 11(unit03)
Ai lecture  11(unit03)Ai lecture  11(unit03)
Ai lecture 11(unit03)
vikas dhakane
 
Ai lecture 11(unit03)
Ai lecture  11(unit03)Ai lecture  11(unit03)
Ai lecture 11(unit03)
vikas dhakane
 
Ai lecture 10(unit03)
Ai lecture  10(unit03)Ai lecture  10(unit03)
Ai lecture 10(unit03)
vikas dhakane
 
Ai lecture 10(unit03)
Ai lecture  10(unit03)Ai lecture  10(unit03)
Ai lecture 10(unit03)
vikas dhakane
 
Ai lecture 09(unit03)
Ai lecture  09(unit03)Ai lecture  09(unit03)
Ai lecture 09(unit03)
vikas dhakane
 
Ai lecture 07(unit03)
Ai lecture  07(unit03)Ai lecture  07(unit03)
Ai lecture 07(unit03)
vikas dhakane
 
Ai lecture 05(unit03)
Ai lecture  05(unit03)Ai lecture  05(unit03)
Ai lecture 05(unit03)
vikas dhakane
 
Ai lecture 05(unit03)
Ai lecture  05(unit03)Ai lecture  05(unit03)
Ai lecture 05(unit03)
vikas dhakane
 
Ai lecture 04(unit03)
Ai lecture  04(unit03)Ai lecture  04(unit03)
Ai lecture 04(unit03)
vikas dhakane
 
Ai lecture 04(unit03)
Ai lecture  04(unit03)Ai lecture  04(unit03)
Ai lecture 04(unit03)
vikas dhakane
 
Ai lecture 03(unit03)
Ai lecture  03(unit03)Ai lecture  03(unit03)
Ai lecture 03(unit03)
vikas dhakane
 
Ai lecture 03(unit03)
Ai lecture  03(unit03)Ai lecture  03(unit03)
Ai lecture 03(unit03)
vikas dhakane
 
Ai lecture 003(unit03)
Ai lecture  003(unit03)Ai lecture  003(unit03)
Ai lecture 003(unit03)
vikas dhakane
 
Ai lecture 003(unit03)
Ai lecture  003(unit03)Ai lecture  003(unit03)
Ai lecture 003(unit03)
vikas dhakane
 
Ai lecture 02(unit03)
Ai lecture  02(unit03)Ai lecture  02(unit03)
Ai lecture 02(unit03)
vikas dhakane
 
Ad

Recently uploaded (20)

Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
twin tower attack 2001 new york city
twin  tower  attack  2001 new  york citytwin  tower  attack  2001 new  york city
twin tower attack 2001 new york city
harishreemavs
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Journal of Soft Computing in Civil Engineering
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Journal of Soft Computing in Civil Engineering
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
Evonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdfEvonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdf
szhang13
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
twin tower attack 2001 new york city
twin  tower  attack  2001 new  york citytwin  tower  attack  2001 new  york city
twin tower attack 2001 new york city
harishreemavs
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
Evonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdfEvonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdf
szhang13
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 

A* Search Algorithm

  • 1. Topic To Be Covered: A* Search Algorithm Jagdamba Education Society's SND College of Engineering & Research Centre Department of Computer Engineering SUBJECT: Artificial Intelligence & Robotics Lecture No-9(ii) Prof.Dhakane Vikas N
  • 2. A* Search Algorithm  This is informed search technique also called as HEURISTIC search.  This algo. Works using heuristic value.  A* uses h(n)->Heuristic function & g(n)->Cost to reach the node ‘n’ from start state.  Find shortest path though search spaces.  Estimated Cost f(n)=g(n)+h(n)  A* gives Fast & Optimal result as compared with previous algorithms.  Space & Time Complexity of BFS is also O(V+E) where V is vertices and E is edges.  Also Written as:-O(b) ^d Where, b->Branching factor d->depth
  • 3. A* Search Algorithm  A* Algorithm extends the path that minimizes the following function- f(n) = g(n) + h(n) Here,  ‘n’ is the last node on the path  g(n) is the cost of the path from start node to node ‘n’  h(n) is a heuristic function that estimates cost of the cheapest path from node ‘n’ to the goal node Algorithm-  The implementation of A* Algorithm involves maintaining two lists- OPEN and CLOSED.  OPEN contains those nodes that have been evaluated by the heuristic function but have not been expanded into successors yet.  CLOSED contains those nodes that have already been visited. The algorithm is as follows-
  • 4. A* Search Algorithm The algorithm is as follows- Step-01:  Define a list OPEN.  Initially, OPEN consists solely of a single node, the start node S. Step-02: If the list is empty, return failure and exit. Step-03:  Remove node n with the smallest value of f(n) from OPEN and move it to list CLOSED.  If node n is a goal state, return success and exit. Step-04: Expand node n.
  • 5. A* Search Algorithm Step-05:  If any successor to n is the goal node, return success and the solution by tracing the path from goal node to S.  Otherwise, go to Step-06. Step-06: For each successor node,  Apply the evaluation function f to the node.  If the node has not been in either list, add it to OPEN. Step-07: Go back to Step-02.
  • 6. A* Search Algorithm Example with Solution: Consider the following graph-  The numbers written on edges represent the distance between the nodes.  The numbers written on nodes represent the heuristic value.  Find the most cost-effective path to reach from start state A to final state J using A* Algorithm.
  • 7. A* Search Algorithm Example with Solution: Solution- Step-01: We start with node A. Node B and Node F can be reached from node A. A* Algorithm calculates f(B) and f(F). Estimated Cost f(n)=g(n)+h(n) f(B) = 6 + 8 = 14 f(F) = 3 + 6 = 9 Since f(F) < f(B), so it decides to go to node F. ->Closed list(F) Path- A → F
  • 8. A* Search Algorithm Example with Solution: Solution- Step-02: Node G and Node H can be reached from node F. A* Algorithm calculates f(G) and f(H). f(G) = (3+1) + 5 = 9 f(H) = (3+7) + 3 = 13 Since f(G) < f(H), so it decides to go to node G. ->Closed list(G) Path- A → F → G
  • 9. A* Search Algorithm Example with Solution: Solution- Step-03: Node I can be reached from node G. A* Algorithm calculates f(I). f(I) = (3+1+3) + 1 = 8 It decides to go to node I. ->Closed list(I) Path- A → F → G → I
  • 10. A* Search Algorithm Example with Solution: Solution- Step-04: Node E, Node H and Node J can be reached from node I. A* Algorithm calculates f(E), f(H) and f(J). f(E) = (3+1+3+5) + 3 = 15 f(H) = (3+1+3+2) + 3 = 12 f(J) = (3+1+3+3) + 0 = 10 Since f(J) is least, so it decides to go to node J. ->Closed list(J) Shortest Path- A → F → G → I → J
  • 12. A* Search Algorithm Advantages of BFS: A* Algorithm is one of the best path finding algorithms. It is Complete & Optimal Used to solve complex problems. Disadvantages of BFS: Requires more memory
  翻译: