Jump to content

Artificial Intelligence - Bot path finding


Toady
 Share

Recommended Posts

Hallman, I'm having some trouble with your script. When I clear every wall square and and press "Go!" then SciTe gives me this error:

C:\Pathing_GUI_TEST.au3 (358) : ==> Array variable subscript badly formatted.: 
If DllStructGetData($data[$x][$y-1],"value") <> "x" And Not _IsInClosedList($closedlist,$data[$x][$y-1]) And Not _IsInOpenList($openlist,$data[$x][$y-1]) Then 
If DllStructGetData($data[$x][^ ERROR
->22:56:15 AutoIT3.exe ended.rc:1

Am I doing something wrong?

EDIT: Just tested it, this error comes every time, when I make only one path for it to find or delete every wall square.

Your using old code, please get the newest one that is posted.

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

Yes they are in a bad place, I will update the gui to fix this. This badly formatted array is caused from the searching going out of bounds. Ease fix.

please note that I made the example very quick and dirty and wasn't expecting it to be used as the "official" example. Otherwise I would have done more work :)

PLEASE READ

GUI is fixed now, you can now place things on outer parameter. There is error checking so you should not see anymore errors. Also added a timer to see how long it takes bot to find the path. ENJOY!

Thats cool. Much better. Now it's more ... user friendly which is something I tend to overlook :)

Hallman

Edited by Hallman
Link to comment
Share on other sites

please note that I made the example very quick and dirty and wasn't expecting it to be used as the "official" example. Otherwise I would have done more work :)

Thats cool. Much better. Now it's more ... user friendly which is something I tend to overlook :)

Hallman

No prob, you made my job easier, I scrapped the gui that I was making and thought yours will do the job nicely.

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

UPDATE:

Added the option to select the searching heuristic. You can choose between Manhattan distance or Euclidean distance. I apologize for all these updates.

Manhattan - make bot move in an L shape, fast.

Euclidean - make bot move in a diagonal fashion towards goal, a little slower than manhattan

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

UPDATE:

Added the option to select the searching heuristic. You can choose between Manhattan distance or Euclidean distance. I apologize for all these updates.

Manhattan - make bot move in an L shape, fast.

Euclidean - make bot move in a diagonal fashion towards goal, a little slower than manhattan

Can you please do one more update so that it doesnt keep shutting off.

Thanks

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Nice work!

Suggestion: Save and Load paths.

lol I just wanted to show everyone the A * searching algorithm and how it works. Its supposed to inspire other people to use it in any fashion they choose. No point in saving paths and such, the gui is just an example to explain the algorithm, its not supposed to be a full blown app. :)

Thanks, Im glad you like it!

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

Thanks, Now I understand the methods better and how it acts.

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Nice job, Toady (and Hallman)! I'd been wondering what the best method would be in AutoIt to search out a path around barriers, this is quite timely! It's even a nice-looking example now for people like me to enjoy tinkering with...thanks :)

"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

That's better.

Nice. When will 3D support be added?

Your welcome. Im leaving the 3D stuff to anyone else who wants to do it. The point of this thread is to show how using A * Searching can be used in the real world. The GUI is just to help understand how it works. Would you be willing in creating a 3D version? I lack the interest in it.

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

Nice.

I was wondering. could you rearrange and simplify this into a UDF so I can do the 3D thing?

thanks

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Nice.

I was wondering. could you rearrange and simplify this into a UDF so I can do the 3D thing?

thanks

Every thing below the gui stuff in my code is all you need. I have commented this very well. This cant be simply made into a UDF, a lot of changes need to be made to account for 3D space.

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

Every thing below the gui stuff in my code is all you need. I have commented this very well. This cant be simply made into a UDF, a lot of changes need to be made to account for 3D space.

lol, well I have a lot to do then. Thanks.

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...