A Star: Fundamentals and Applications
By Fouad Sabry
()
About this ebook
What Is A Star
Because of its completeness, optimality, and optimal efficiency, the A* method, which is employed for graph traversal and path search, is utilized in a variety of subfields within the discipline of computer science. Because it saves all of the created nodes in memory, its space complexity is a significant disadvantage in practical terms. Consequently, in practical travel-routing systems, it is often outperformed by algorithms that can pre-process the graph to achieve higher speed, as well as by approaches that are memory-bounded; despite this, A* is still the best answer in many different scenarios.
How You Will Benefit
(I) Insights, and validations about the following topics:
Chapter 1: A* Search Algorithm
Chapter 2: Graph Theory
Chapter 3: Heuristic in Computer Science
Chapter 4: Best-First Search
Chapter 5: Dijkstra's Algorithm
Chapter 6: Any-Angle Path Planning
Chapter 7: Admissible Heuristic
Chapter 8: Consistent Heuristic
Chapter 9: Memory-Bound Function
Chapter 10: Pathfinding
(II) Answering the public top questions about a star.
(III) Real world examples for the usage of a star in many fields.
(IV) 17 appendices to explain, briefly, 266 emerging technologies in each industry to have 360-degree full understanding of a star' technologies.
Who This Book Is For
Professionals, undergraduate and graduate students, enthusiasts, hobbyists, and those who want to go beyond basic knowledge or information for any kind of a star.
Read more from Fouad Sabry
Related to A Star
Titles in the series (100)
Radial Basis Networks: Fundamentals and Applications for The Activation Functions of Artificial Neural Networks Rating: 0 out of 5 stars0 ratingsHopfield Networks: Fundamentals and Applications of The Neural Network That Stores Memories Rating: 0 out of 5 stars0 ratingsConvolutional Neural Networks: Fundamentals and Applications for Analyzing Visual Imagery Rating: 0 out of 5 stars0 ratingsArtificial Neural Networks: Fundamentals and Applications for Decoding the Mysteries of Neural Computation Rating: 0 out of 5 stars0 ratingsRestricted Boltzmann Machine: Fundamentals and Applications for Unlocking the Hidden Layers of Artificial Intelligence Rating: 0 out of 5 stars0 ratingsNetworked Control System: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsNouvelle Artificial Intelligence: Fundamentals and Applications for Producing Robots With Intelligence Levels Similar to Insects Rating: 0 out of 5 stars0 ratingsLong Short Term Memory: Fundamentals and Applications for Sequence Prediction Rating: 0 out of 5 stars0 ratingsArtificial Immune Systems: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsSituated Artificial Intelligence: Fundamentals and Applications for Integrating Intelligence With Action Rating: 0 out of 5 stars0 ratingsEmbodied Cognitive Science: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsPerceptrons: Fundamentals and Applications for The Neural Building Block Rating: 0 out of 5 stars0 ratingsStatistical Classification: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsGroup Method of Data Handling: Fundamentals and Applications for Predictive Modeling and Data Analysis Rating: 0 out of 5 stars0 ratingsCompetitive Learning: Fundamentals and Applications for Reinforcement Learning through Competition Rating: 0 out of 5 stars0 ratingsEmbodied Cognition: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsMultilayer Perceptron: Fundamentals and Applications for Decoding Neural Networks Rating: 0 out of 5 stars0 ratingsRecurrent Neural Networks: Fundamentals and Applications from Simple to Gated Architectures Rating: 0 out of 5 stars0 ratingsLearning Intelligent Distribution Agent: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsSupport Vector Machine: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsFeedforward Neural Networks: Fundamentals and Applications for The Architecture of Thinking Machines and Neural Webs Rating: 0 out of 5 stars0 ratingsHybrid Neural Networks: Fundamentals and Applications for Interacting Biological Neural Networks with Artificial Neuronal Models Rating: 0 out of 5 stars0 ratingsHebbian Learning: Fundamentals and Applications for Uniting Memory and Learning Rating: 0 out of 5 stars0 ratingsSubsumption Architecture: Fundamentals and Applications for Behavior Based Robotics and Reactive Control Rating: 0 out of 5 stars0 ratingsFuzzy Systems: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsArtificial Intelligence Systems Integration: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsQualification Problem: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsNeuroevolution: Fundamentals and Applications for Surpassing Human Intelligence with Neuroevolution Rating: 0 out of 5 stars0 ratingsBackpropagation: Fundamentals and Applications for Preparing Data for Training in Deep Learning Rating: 0 out of 5 stars0 ratingsAttractor Networks: Fundamentals and Applications in Computational Neuroscience Rating: 0 out of 5 stars0 ratings
Related ebooks
State Space Search: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsComputer Algebra: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsCausal Calculus: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsMarket Structure: Dancing Through Market Structure, Unveiling the Secrets of Commerce Rating: 0 out of 5 stars0 ratingsMarlowe Kana (Volume 3) Rating: 0 out of 5 stars0 ratingsFinite Theory of the Universe, Dark Matter Disproof and Faster-Than-Light Speed Rating: 0 out of 5 stars0 ratingsPolitics in the Gutters: American Politicians and Elections in Comic Book Media Rating: 0 out of 5 stars0 ratingsConvolutional Neural Networks: Fundamentals and Applications for Analyzing Visual Imagery Rating: 0 out of 5 stars0 ratingsRobotics: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsEmail Spam: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsMultilayer Perceptron: Fundamentals and Applications for Decoding Neural Networks Rating: 0 out of 5 stars0 ratingsBayesian Inference: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsEvolutionary Robotics: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsArtificial Intelligence Humor: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsSocial Science: Unraveling the Tapestry of Society, a Comprehensive Guide to Social Science Rating: 0 out of 5 stars0 ratingsModal Logic: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsThe Many Theories and Conspiracies Relating to Jack the Ripper Rating: 0 out of 5 stars0 ratingsThe Science of Life and Evolution Rating: 0 out of 5 stars0 ratingsAutomated Planning and Scheduling: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsArtificial Intelligence Arms Race: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsClosed World Assumption: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsEnvironmental Finance: A Blueprint for a Sustainable Future Rating: 0 out of 5 stars0 ratingsNatural Monopoly: Mastering the Economics of Essential Services, Navigating Natural Monopoly Rating: 0 out of 5 stars0 ratingsFinancial Yield: Mastering Financial Yield, Your Roadmap to Prosperity Rating: 0 out of 5 stars0 ratingsBrain Reading: How National Security Could Gain Access to Our Brains Rating: 0 out of 5 stars0 ratingsPrice Elasticity of Demand: Mastering the Economics of Consumer Choices, a Comprehensive Guide to Price Elasticity of Demand Rating: 0 out of 5 stars0 ratingsThe Curious Case of H.P. Lovecraft Rating: 0 out of 5 stars0 ratingsWorld Economic History: Discovering Our Global Economic Journey, From Antiquity to the Modern Era Rating: 0 out of 5 stars0 ratingsPolice Robots Rating: 0 out of 5 stars0 ratings
Intelligence (AI) & Semantics For You
Scary Smart: The Future of Artificial Intelligence and How You Can Save Our World Rating: 4 out of 5 stars4/5The Secrets of ChatGPT Prompt Engineering for Non-Developers Rating: 5 out of 5 stars5/5Mastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 4 out of 5 stars4/5Algorithms to Live By: The Computer Science of Human Decisions Rating: 4 out of 5 stars4/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Prompt Engineering ; The Future Of Language Generation Rating: 3 out of 5 stars3/5Python for Beginners: A Crash Course to Learn Python Programming in 1 Week Rating: 0 out of 5 stars0 ratingsDeep Learning with PyTorch Rating: 5 out of 5 stars5/5Advances in Financial Machine Learning Rating: 5 out of 5 stars5/5Artificial Intelligence: A Guide for Thinking Humans Rating: 4 out of 5 stars4/5The Alignment Problem: How Can Machines Learn Human Values? Rating: 4 out of 5 stars4/5The Algorithm: How AI Can Hijack Your Career and Steal Your Future Rating: 0 out of 5 stars0 ratingsGrokking Machine Learning Rating: 0 out of 5 stars0 ratingsChatGPT For Dummies Rating: 4 out of 5 stars4/5Deep Utopia: Life and Meaning in a Solved World Rating: 0 out of 5 stars0 ratingsGrokking Deep Reinforcement Learning Rating: 5 out of 5 stars5/5Midjourney Mastery - The Ultimate Handbook of Prompts Rating: 5 out of 5 stars5/5ChatGPT Rating: 1 out of 5 stars1/5TensorFlow in 1 Day: Make your own Neural Network Rating: 4 out of 5 stars4/5Hands-On System Design: Learn System Design, Scaling Applications, Software Development Design Patterns with Real Use-Cases Rating: 0 out of 5 stars0 ratingsPredictive Analytics and Machine Learning for Managers Rating: 0 out of 5 stars0 ratingsVirtually Human: The Promise—and the Peril—of Digital Immortality Rating: 4 out of 5 stars4/5The Business Case for AI: A Leader's Guide to AI Strategies, Best Practices & Real-World Applications Rating: 0 out of 5 stars0 ratingsChatGPT Rating: 3 out of 5 stars3/5Grokking Artificial Intelligence Algorithms Rating: 0 out of 5 stars0 ratings
Reviews for A Star
0 ratings0 reviews
Book preview
A Star - Fouad Sabry
Chapter 1: A* search algorithm
A* is an algorithm for graph traversal and path search, and its name is pronounced A-star.
, which, due to the fact that it is so comprehensive, is used in a variety of subfields inside computer science, optimality, and utmost operational effectiveness.
One major practical drawback is its O(b^d) space complexity, because it keeps a record of all of the created nodes in memory.
Thus, within the realm of operational travel routing systems, In most cases, it is surpassed by algorithms that are able to pre-process the graph in order to get higher performance, It is possible to think of it as a continuation of Dijkstra's algorithm.
Heuristics are used to direct Asearch, *'s which helps the algorithm attain greater performance.
The A* method, in contrast to Dijkstra's algorithm, only finds the shortest route from a given source to a given goal. It does not discover the shortest-path tree from a given source to all and all potential objectives. Using a heuristic that is aimed toward a certain purpose requires that you make this compromise. Because the whole shortest-path tree is constructed by Dijkstra's method, any node in the tree may be thought of as a goal; hence, there is no specific-goal-directed heuristic that can be used.
A* was developed as a part of the Shakey project, which aimed to produce a mobile robot capable of planning its own activities. A* was one of the robots that came out of that research. The use of the Graph Traverser technique was first suggested by Nils Nilsson.
Because A* is an informed search algorithm, often known as a best-first search, its structure may be described in terms of weighted graphs, as follows: It seeks to locate, beginning from a certain starting node of a graph, a route to the specified target node that incurs the least amount of cost (least distance travelled, shortest time, etc.). It does this by preserving a tree of pathways that originate at the start node and extending those paths one edge at a time until its termination requirement is fulfilled. This continues until the tree is complete.
A* has to make a decision on which of its pathways to expand on each iteration of the main loop. It makes this determination based on the cost of the route itself as well as an estimate of the additional cost necessary to extend the path all the way to the target. To be more specific, A* chooses the route that results in the lowest cost.
f(n)=g(n)+h(n)where n is the next node on the route, g(n) is the cost of the path from the start node to n, and h(n) is a heuristic function that predicts the cost of the cheapest path from n to the objective. g(n) is the cost of the path from the start node to n. A* comes to an end either when the route it chooses to extend is already a path leading from the start to the goal or when there are no more pathways that are qualified to be extended. The heuristic function is tailored to the given issue. If the heuristic function is acceptable, which means that it does not ever underestimate the real cost to reach the objective, A* is guaranteed to produce a route from the starting point to the goal that has the lowest possible cost.
A standard implementation of A* makes use of a priority queue to carry out the repeated selection of nodes with the smallest (estimated) cost at which to grow. The open set, fringe, or frontier is the name often given to this priority queue. At each stage of the method, the queue is advanced by removing the node that has the lowest f(x) value, after which the f and g values of the node's neighbors are adjusted appropriately, and the nodes that were previously neighbors are added to the queue. The process will keep going until a target node is found among the eliminated nodes (that is, the node with the lowest f value among all of the fringe nodes). Since h at the goal in an acceptable heuristic is considered to be zero, the value of that goal's f is likewise considered to be the cost of the shortest route.
Only the length of the route with the fewest steps is returned by the algorithm we have been discussing so far. The method may be readily modified in such a way that every node on the route remembers its predecessor in order to facilitate the process of determining the actual sequence of steps. The last node in the chain will, after this method has been executed, refer to the node that came before it, and so on, until one of the nodes' predecessors is the starting node.
As an example, while looking for the shortest route on a map, h(x) can indicate the distance in a straight line to the destination. This is because the straight-line distance is the physically shortest distance that can exist between any two places. When creating a grid map for a video game, it is best to use either the Manhattan distance or the octile distance depending on the set of moves that are accessible to the player (4-way or 8-way).
If the heuristic h satisfies the additional condition h(x) ≤ d(x, y) + h(y) for every edge (x, y) of the graph (where d denotes the length of that edge), If so, the letter h is said to be monotonous, or consistent.
Using a heuristic that is reliable, A* is guaranteed to identify an optimum route without processing any node more than once, and running A* is identical to running Dijkstra's algorithm with the decreased cost d'(x). A* may be found here, y) = d(x, y) + h(y) − h(x).
The algorithm is described by the pseudocode that is following:
function reconstruct_path(cameFrom, current)
total_path := {current}
while current in cameFrom.Keys:
current := cameFromcurrent
total_path.prepend(current)
return total_path
// A* finds a path from start to goal.
// h is the heuristic function. h(n) estimates the cost to reach goal from node n.
function A_Star(start, goal, h)
// The set of discovered nodes that may need to be (re-)expanded.
// Initially, only the start node is known.
// This is usually implemented as a min-heap or priority queue rather than a hash-set.
openSet := {start}
// For node n, cameFrom[n] is the node immediately preceding it on the cheapest path from the start
// to n currently known.
cameFrom := an empty map
// For node n, gScore[n] is the cost of the cheapest path from start to n currently known.
gScore := map with default value of Infinity
gScorestart := 0
// For node n, fScore[n] := gScore[n] + h(n). fScore[n] represents our current best guess as to
// how cheap a path could be from start to finish if it goes through n.
fScore := map with default value of Infinity
fScorestart := h(start)
while openSet is not empty
// This operation can occur in O(Log(N)) time if openSet is a min-heap or a priority queue
current := the node in openSet having the lowest fScore[] value
if current = goal
return reconstruct_path(cameFrom, current)
openSet.Remove(current)
for each neighbor of current
// d(current,neighbor) is the weight of the edge from current to neighbor
// tentative_gScore is the distance from start to the neighbor through current
tentative_gScore := gScorecurrent + d(current, neighbor)
if tentative_gScore < gScoreneighbor
// This path to neighbor is better than any