SlideShare a Scribd company logo
Artificial Intelligence Tutorial
A* Search Algorithm
Our website:-
pywix.blogspot.com
Rahul Gupta Sir Video By Digital Classes
Introduction
• A* search is the most commonly known form of
best-first search. It uses heuristic function h(n),
and cost to reach the node n from the start state
g(n).
• A* search algorithm finds the shortest path
through the search space using the heuristic
function.
• This search algorithm expands less search tree
and provides optimal result faster. it uses
g(n)+h(n)
Our website:-
pywix.blogspot.com
Rahul Gupta Sir Video by Digital classes
Introduction
Our website:-
pywix.blogspot.com
Rahul Gupta Sir Video by Digital classes
Algorithm
• Algorithm of A* search:
• Step1: Place the starting node in the OPEN list.
• Step 2: Check if the OPEN list is empty or not, if the list is empty
then return failure and stops.
• Step 3: Select the node from the OPEN list which has the smallest
value of evaluation function (g+h), if node n is goal node then
return success and stop, otherwise
• Step 4: Expand node n and generate all of its successors, and put n
into the closed list. For each successor n', check whether n' is
already in the OPEN or CLOSED list, if not then compute evaluation
function for n' and place into Open list.
• Step 5: Else if node n' is already in OPEN and CLOSED, then it should
be attached to the back pointer which reflects the lowest g(n')
value.
• Step 6: Return to Step 2.
Our website:-
pywix.blogspot.com
Rahul Gupta Sir Video by Digital classes
Example:
• {(S, 5)}
• {(S--> A, 4), (S-->G, 10)}
• {(S--> A-->C, 4), (S--> A-->B, 7), (S-->G, 10)}
• {(S--> A-->C--->G, 6), (S--> A-->C--->D, 11), (S--> A-->B, 7), (S-->G, 10)}
• as S--->A--->C--->G it provides the optimal path with cost 6.
Our website:-
pywix.blogspot.com
Rahul Gupta Sir Video by Digital classes
Our website:-
pywix.blogspot.com
Rahul Gupta Sir Video by Digital classes

More Related Content

PDF
SAP Inside Track Vienna 2018 #sitVIE - Back to the Future by adopting OO in A...
PDF
Chevron Depropanizer Project
DOCX
Programming-I assignment for BSCS students , NCBA&e
PPTX
Critical Path Method
PDF
Bas Vodde - The story of LEsS
PDF
GIP Intro
DOCX
นางสาว อริยาภรณ์ ภูมิตินทรีย์ ชั้น ม
SAP Inside Track Vienna 2018 #sitVIE - Back to the Future by adopting OO in A...
Chevron Depropanizer Project
Programming-I assignment for BSCS students , NCBA&e
Critical Path Method
Bas Vodde - The story of LEsS
GIP Intro
นางสาว อริยาภรณ์ ภูมิตินทรีย์ ชั้น ม

What's hot (8)

PPTX
Agile processexplained
PDF
Pi Controller
DOCX
5 it awt week 7
PDF
Bhanu Pratap Singh Shekhawat, BCA Third Year
PDF
Grid based distributed in memory indexing for moving objects
PPTX
Insertion & Selection Sort - using Priority Queues
PPTX
halstead software science measures
PDF
GuyWire4
Agile processexplained
Pi Controller
5 it awt week 7
Bhanu Pratap Singh Shekhawat, BCA Third Year
Grid based distributed in memory indexing for moving objects
Insertion & Selection Sort - using Priority Queues
halstead software science measures
GuyWire4
Ad

Similar to A star algorithm in artificial intelligence (20)

PPTX
A star algorithm with Pseudcode AI.pptx
PPTX
Best first search algorithm in Artificial Intelligence
PPTX
A-Star Search(part-B) in artificial intelligence.pptx
PPTX
A Star Algorithm in Artificial intelligence
PDF
A* Search Algorithm
PDF
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
PPTX
informed search.pptx
PPTX
AI_Session 8 A searching algorithm .pptx
PPTX
AI3391 Session 10 A searching algorithm.pptx
PPTX
A-star Algorithm in artificial intelligence.pptx
PDF
UNIT 2 - Artificial intelligence merged.pdf
PPTX
Dstar Lite
PPTX
Artificial Intelligence and Machine Learning.pptx
PPTX
Heuristic Searching Algorithms Artificial Intelligence.pptx
PPTX
AstarAlgorithm_v5_TeamFlash
PPTX
Astar algorithm
PPTX
Unit 3 Informed Search Strategies.pptx
PPTX
AI_CSE5005_M2_ASearch.pptx for the algorithm for machine
PPTX
A* algorithm
PPTX
heuristic technique.pptx...............................
A star algorithm with Pseudcode AI.pptx
Best first search algorithm in Artificial Intelligence
A-Star Search(part-B) in artificial intelligence.pptx
A Star Algorithm in Artificial intelligence
A* Search Algorithm
AI3391 ARTIFICIAL INTELLIGENCE UNIT II notes.pdf
informed search.pptx
AI_Session 8 A searching algorithm .pptx
AI3391 Session 10 A searching algorithm.pptx
A-star Algorithm in artificial intelligence.pptx
UNIT 2 - Artificial intelligence merged.pdf
Dstar Lite
Artificial Intelligence and Machine Learning.pptx
Heuristic Searching Algorithms Artificial Intelligence.pptx
AstarAlgorithm_v5_TeamFlash
Astar algorithm
Unit 3 Informed Search Strategies.pptx
AI_CSE5005_M2_ASearch.pptx for the algorithm for machine
A* algorithm
heuristic technique.pptx...............................
Ad

More from Rahul Gupta (8)

PPTX
LINKED LIST.pptx
PPTX
TAUTOLOGY.pptx
PDF
COMPUTER VOCATIONAL PHP THIRD YEAR MGSU PREVIOUS YEAR PAPER2020
PDF
Queue in data structure
PDF
Class 8th Formula Sheet | CBSE | NCERT
PDF
Class 10th maths formula sheet
DOCX
Expert system
PDF
hill climbing algorithm in artificial intelligence
LINKED LIST.pptx
TAUTOLOGY.pptx
COMPUTER VOCATIONAL PHP THIRD YEAR MGSU PREVIOUS YEAR PAPER2020
Queue in data structure
Class 8th Formula Sheet | CBSE | NCERT
Class 10th maths formula sheet
Expert system
hill climbing algorithm in artificial intelligence

Recently uploaded (20)

PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
master seminar digital applications in india
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Cell Structure & Organelles in detailed.
PDF
Computing-Curriculum for Schools in Ghana
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
Insiders guide to clinical Medicine.pdf
Microbial disease of the cardiovascular and lymphatic systems
VCE English Exam - Section C Student Revision Booklet
PPH.pptx obstetrics and gynecology in nursing
01-Introduction-to-Information-Management.pdf
Cell Types and Its function , kingdom of life
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Anesthesia in Laparoscopic Surgery in India
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
master seminar digital applications in india
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Cell Structure & Organelles in detailed.
Computing-Curriculum for Schools in Ghana
O5-L3 Freight Transport Ops (International) V1.pdf
RMMM.pdf make it easy to upload and study
Module 4: Burden of Disease Tutorial Slides S2 2025
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Complications of Minimal Access Surgery at WLH
Insiders guide to clinical Medicine.pdf

A star algorithm in artificial intelligence

  • 1. Artificial Intelligence Tutorial A* Search Algorithm Our website:- pywix.blogspot.com Rahul Gupta Sir Video By Digital Classes
  • 2. Introduction • A* search is the most commonly known form of best-first search. It uses heuristic function h(n), and cost to reach the node n from the start state g(n). • A* search algorithm finds the shortest path through the search space using the heuristic function. • This search algorithm expands less search tree and provides optimal result faster. it uses g(n)+h(n) Our website:- pywix.blogspot.com Rahul Gupta Sir Video by Digital classes
  • 4. Algorithm • Algorithm of A* search: • Step1: Place the starting node in the OPEN list. • Step 2: Check if the OPEN list is empty or not, if the list is empty then return failure and stops. • Step 3: Select the node from the OPEN list which has the smallest value of evaluation function (g+h), if node n is goal node then return success and stop, otherwise • Step 4: Expand node n and generate all of its successors, and put n into the closed list. For each successor n', check whether n' is already in the OPEN or CLOSED list, if not then compute evaluation function for n' and place into Open list. • Step 5: Else if node n' is already in OPEN and CLOSED, then it should be attached to the back pointer which reflects the lowest g(n') value. • Step 6: Return to Step 2. Our website:- pywix.blogspot.com Rahul Gupta Sir Video by Digital classes
  • 5. Example: • {(S, 5)} • {(S--> A, 4), (S-->G, 10)} • {(S--> A-->C, 4), (S--> A-->B, 7), (S-->G, 10)} • {(S--> A-->C--->G, 6), (S--> A-->C--->D, 11), (S--> A-->B, 7), (S-->G, 10)} • as S--->A--->C--->G it provides the optimal path with cost 6. Our website:- pywix.blogspot.com Rahul Gupta Sir Video by Digital classes
  • 6. Our website:- pywix.blogspot.com Rahul Gupta Sir Video by Digital classes