Stories recently tagged with 'immutable'

A* pathfinding search in C# - Part 3(leniel.net)

submitted by lenielleniel(504) 2 years, 5 months ago

This is the last installment in the series about A* search. The C# source code implemented is available in the final part of this post. As promised in the last words of A* pathfinding search in C# - Part 2 today we’re gonna run a test case using the Romania map. This post shows a test case in which the application outputs the shortest path from Arad to Bucharest. I used the ViewOtherPaths method to show the different possible routes. This way we can have a look at why the A* algorithm has chosen such shortest path. read more...

add a comment |category: |Views: 59

tags: another

A* pathfinding search in C# - Part 2(leniel.net)

submitted by lenielleniel(504) 2 years, 5 months ago

This post describes step by step the methods used to implement the A* search algorithm. To illustrate the path finding problem and how it can be solved using A* I decided to use the Romania map (with the same Cities I used in Breadth and depth first search series of posts). Now I modified it adding more connections between the cities so that we have more fun while debugging the code. This time I decided to get the real values of latitude and longitude for the cities shown in the Romania map. See how a graph of cities is assembled using the real geocode values for latitude and longitude using Google Maps service. read more...

add a comment |category: |Views: 57

tags: another

A* pathfinding search in C# - Part 1(leniel.net)

submitted by lenielleniel(504) 2 years, 11 months ago

Standing on the shoulders of giants just like Eric Lippert, this is my try to create a running sample of the code he has presented in his magnific series of posts titled Path Finding Using A* in C# 3.0. Eric wrote the base structure of the A* pathfinding algorithm but didn’t provide a complete running sample. I basically added some code I had already posted on the series of posts titled Breadth and depth first search and created some properties here and there to get the whole thing running. It’s nothing more than code reuse. In this implementation you'll find interesting data structures as a priority queue and and immutable stack. read more...

add a comment |category: |Views: 170

tags: another