Path Finding Algorithm with GUI

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
224 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 20, 2011

In computer science class at my university, our professor showed us an algorithm for finding a shortest path between two points on a grid with obstacles. Here is an implementation I made in C with a GUI.

It uses the SDL library for keyboard/mouse input and OpenGL for drawing.

The algorithm behind it is pretty fast; it finds solutions in less than a second, even on a 1000x1000 grid.

It supports reading from/writing to files in an ASCII-based format.

Category:

Film & Animation

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (6)

Sign In or Sign Up now to post a comment!
  • @Kinderlabor Thanks :)

  • @Benedek93 The algorithm is called "breadth-first search".

  • @Danny77uk No, I'm not sure if this algorithm has a name, our professor showed it to us. Actually, now that I looked into it, it's sort of like the "Sample algorithm" shown on the Wikipedia page on Pathfinding (look it up, apparently I cannot post links here).

  • A*?

  • @rinsmaster Yeah, it does only look in 4 directions, but it should always find one of the shortest paths available :-)

  • Awesome! It's not the shortest path is it though? Well in Manhattan-distance it is I guess :) (compared to A* which creates semi diagonal lines)

    But this is quite relevant to me, I was actually doing some research on path finding for my entry to Google's AI Challenge.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more