© All Rights Reserved

33 views

© All Rights Reserved

- JCG Global
- OPM Batch API's Working Code
- Artificial Intelligence- Midterm Exam
- AI.docx
- Human Intelligence
- Java in Easy Ways
- Planning-Planning algorithm-I
- 2009 09 Ben Cohen SBPL
- AI793C Lab Notes
- AI
- Algorithims Labmanual 5 Solve
- Code Assignment
- mid-key
- cs344-lect2-3-Astar-2012-1-3-5
- AIAli
- Documentation
- Assign5 Final
- Guia Practica n
- Script Submit Bank Statement Loader
- Emulating Sensor Networks and the Internet With Affret

You are on page 1of 2

What is pathfinding? Pathfinding is the operation of calculating and creating a path for AI to follow. Whether it be movement paths, story paths, or even behavior paths. All it entails is the calculation from one point to another by an algorithm, usually A*, to create the most optimal path to your destination. This operation is calculated before the execution of its results, making it a preprocessed operation, where obstacle avoidance is real-time.

What is a path? A path is any sequence of steps that once followed will lead an AI to its final destination. Usually, very straight forward in the idea of the movement from one world point to another according to the path found by the algorithm. However, more complicated AIs could use a path for interacting with the player in dialogue or even the narrative in the story like the Mass Effect series.

What is a node? A node is point along the path. Most literally a point in world space, but can be more abstract like plot points or decision points. But in its most simplistic form, it's a point that a path can follow towards its destination. There are many different characteristics that can be added to nodes like travel weight, navigability, or even distance from the start and finish points of any particular path.

How Does Dijkstra's Algorithm work?

Dijkstra’s Algorithm is the predecessor to A* and was a game changer in terms of making

pathfinding more efficient. The two ways that it made more efficient paths is by giving a value to nodes

and the advancement of checking each neighbor of every child node and gradually spreading out until the end is reached. The algorithm takes the best features of it's predecessors: breadth-first and depth- first. This use of the best from each gives Dijkstra’s a more efficient search pattern as it checks each child node of each sibling and checking the neighbors around each child until the end goal is found.

But that's not all, in addition, Dijkstra’s gives nodes numerical values so that you can help direct

the flow of a path. For example, if you want an AI to travel along a road and not just walk through the swamp, you can give the swamp a higher traversing value so it becomes more costly to walk across, thus insuring that the most efficient path is one that has the lowest traversing value from start to finish. This gives so much more power to pathfinding by using these advancements.

However, Dijkstra’s does have some short comings which lead to the development of A*. The

biggest issue was that, since Dijkstra's does not know where the end of the path is, it just blooms out in all directions from the starting point and once it finds the end, it calculates the lowest travel cost from the start to the end. This is very inefficient when compared to A*, because A* uses the distance from the goal in its calculations to give a more efficient calculation because it knows which direction will close the gap from the start to the finish.

What does “F = G + H” mean?

This is the equation that makes A* more efficient at calculating a path than Dijkstra's. This

equation means: “The travel value of a node is equal to its distance away from the starting point plus its distance way from the ending point.” And that's what makes A* the industry standard, the ability to

know the direction of the end point and use that to direct the focus of the search towards the end point rather than in an ever blooming formation from the start. What is G? G is the distance from the starting point to the node's position. It is calculated by using trigonometry. Because the most common node, geometrically, is a square, you can use the principals of isosceles triangles to calculate distance in any direction. Traveling in the cardinal directions usually cost 10 while diagonal directions cost 14 because of the length of the hypotenuse of isosceles triangles

by using the Pythagorean theorem. This ensures that the distance from any point to another follows the mathematically shortest path because it is the path with the smallest G cost, by using diagonals instead of two cardinal positions in coordination to make a diagonal.

What is H? H is the value that made Dijkstra's not as efficient as A*. Similar to G, it is a value that is calculated by looking at the distance from the end to that particular node. But this is where A* algorithms can differ. Because, there are many ways of calculating the H cost of any particular node. My preferred method is to use the formula “14x + 10(y-x) = H or 14y + 10(x-y) = H”. This allows the algorithm to move diagonally until it reaches the same cardinal line as the end point. This ensures that algorithm knows the most efficient path towards the end point and uses that to calculate the H value of every node when calculating a path. This ensures that the F cost, the combination of G and H, reflects any particular nodes true value when trying to calculate the most efficient path from any two nodes.

Why does this mean A* solves the problem of pathfinding? Pathfinding is the process of finding the shortest path between two points. If you know where you are starting from and where you are going to finish, then all you have to do is calculate the shortest

path. You don't have to worry about if you are “hopefully” moving towards the end point because you

know where you are heading. But this does not mean that A* is perfect. Like how I use a particular formula to calculate H, there are many other methods and formulas to calculate for H or the addition of travel costs and so forth that can be used to complicate and be improved with different methods.

- JCG GlobalUploaded byLohith
- OPM Batch API's Working CodeUploaded byRama Brahma Reddy
- Artificial Intelligence- Midterm ExamUploaded byMemo Almaliky
- AI.docxUploaded byDrilon Avdiu
- Human IntelligenceUploaded byawesome_cool
- Java in Easy WaysUploaded byRandjith
- Planning-Planning algorithm-IUploaded byAsim Arunava Sahoo
- 2009 09 Ben Cohen SBPLUploaded byWillow Garage
- AI793C Lab NotesUploaded byNilanjan Mondal
- AIUploaded byhk_sonu
- Algorithims Labmanual 5 SolveUploaded byirfan_chand_mian
- Code AssignmentUploaded byKoustav Sandy Naha
- mid-keyUploaded byVou Sou Pou
- cs344-lect2-3-Astar-2012-1-3-5Uploaded byashu345
- AIAliUploaded byrobindiv
- DocumentationUploaded bySorin Mateescu
- Assign5 FinalUploaded byjethrow_away
- Guia Practica nUploaded byHaydee Hilasaca
- Script Submit Bank Statement LoaderUploaded byCeomail001
- Emulating Sensor Networks and the Internet With AffretUploaded byJ Christian Odehnal
- search algorithm essayUploaded byapi-297074626
- A1-S1-2012-8-PuzzleUploaded byAnonymous rWLvaNQ
- Javascript 1Uploaded byJessica Jap
- Implementation DijkstraUploaded byJoseBetancourt
- Main FormUploaded byShreyash Pandey
- C++ SAMPLE CODINGUploaded byjohannavillar18
- CubeUploaded byBrian Wierenga
- 06Uploaded byjimuso
- f(7).txtUploaded byAnthony
- mas_lect4 (1).pdfUploaded byAvs Pavan

- Oracle 11g New Features - 4AA1-5662ENWUploaded bydevisbal
- FringUploaded bykalya01
- ch13Uploaded byKaio Carvalho
- How To Apply AP Mahesh Bank Recruitment 2015, Guidelines PDFUploaded byPriya Jain
- ucst_ugUploaded byT A
- Award LTE Radio Network Planning and DesignUploaded bySunil Rs
- Fundamentals of DCSUploaded bySRINKAL1999
- Mobitoken User ManualUploaded byKrishna Manandhar
- Scripting LanguagesUploaded byMasterbrain Brain
- Ayra Oso 1612 Dmx Operator User ManualUploaded byGuido Dijkstra
- MobideskUploaded bySibaprasad Moharana
- Social Media Marketing in the Film IndustryUploaded byAnshuman Pandey
- N-BaIoT Network-based Detection.pdfUploaded byMohammed Tawfik
- A Secure Authorized Deduplication Scheme in Cloud Storage EnvironmentUploaded byInternational Journal for Scientific Research and Development - IJSRD
- 07163529Uploaded bySambit Kumar Ghosh
- CloudUploaded byBern Igoche
- Mvi69 Mnet User ManualUploaded byLuis Torres
- Alcatel BSSUploaded byshahzadhasan
- HT1300 JUPITER System Router Multi-band.pdfUploaded byCristobal Carrillo
- OS concepts in nutshellUploaded byankittripathi18
- 2600: The Hacker Quarterly (Volume 4, Number 10, October 1987)Uploaded byRanko Kohime
- Quantech Network ModelsUploaded byCha cha
- Atom e6xx Series DatasheetUploaded byKishore DM
- New Mixer Behringer X18 P0AWZUploaded bySalvatore Noto
- English on the InternetUploaded byPaulina Murmyło
- Paper IndustryUploaded byBitan Banerjee
- faulttoleranceindistributedsystems-140702080630-phpapp02Uploaded bySofiene Guedri
- RST SIMBOX Installation RevC EnUploaded bySteve Fotso
- HelpNDoc User Manual.pdfUploaded byDragos Cirstea
- Pass4sure 200-101 DumpsUploaded byjake