Impossible things happening, think I'm going crazy

WOW AGAIN!!!

That is truly epic. You, sir, are a master debugger. I just didn’t have the chops to go after this code like you have.

Well done and a massive thank you!

Also, I think you should post this on the code exchange as there’s likely a lot of people whom will find this very useful.

Thank you so much :slight_smile:

M






Epic! [import]uid: 8271 topic_id: 24492 reply_id: 101791[/import]

Thanks for the nice words. I like all your examples.

Uh oh, another small bug:
On line 321, change the logical condition from “and” to “or” as so:

From: if not printed or printed.x ~= point.x and printed.y ~= point.y then
To: if not printed or printed.x ~= point.x or printed.y ~= point.y then

Lets post this on the code exchange together. Email me: support@martinapps.com. [import]uid: 23636 topic_id: 24492 reply_id: 101947[/import]

Still impressed:

[import]uid: 8271 topic_id: 24492 reply_id: 102054[/import]

Hi guys, thought id join in on this thread. Well that’s Dijkstra’s algorithm done. When’s A* coming with some heuristic?

Nice stuff so far. :slight_smile:
quote from something:

  1. Dijkstra’s Algorithm: While A* is generally considered to be the best pathfinding algorithm (see rant above), there is at least one other algorithm that has its uses - Dijkstra’s algorithm. Dijkstra’s is essentially the same as A*, except there is no heuristic (H is always 0). Because it has no heuristic, it searches by expanding out equally in every direction. As you might imagine, because of this Dijkstra’s usually ends up exploring a much larger area before the target is found. This generally makes it slower than A*.
    [import]uid: 118379 topic_id: 24492 reply_id: 108478[/import]

A Corona developer named Lerg has contributed some great A* stuff:

http://blog.anscamobile.com/2011/11/guest-post-the-a-algorithm/
http://developer.anscamobile.com/code/pathfinding-module
http://developer.anscamobile.com/code/pathfinding-demo [import]uid: 23636 topic_id: 24492 reply_id: 108479[/import]