The Challenge

You are given 2 random, valid points (start, end) and a random terrain map. You must find the shortest distance between the two starting points without going through any out-of-bounds terrain.

This is a path finding algorithm challenge. The success of your efforts will be based upon how fast your algorithm can discover the quickest path.

The terrain map will be a 2d array measuring 256×256. For testing, we will all be given the same 3 .bmp files (below) representing the terrain. Each bitmap will measure 256×256 pixels in dimensions with white being marked as valid and black being marked as a “wall” or invalid.

When we test our solutions, new .bmp's will be generated to do our benchmarking.

This is a path finding routine, so when showing your solution working, we need a graphical representation, not a console or text based represention.

Bonus points are given for:

maze.bmp random.bmp text.bmp