Toady Posted June 6, 2007 Author Posted June 6, 2007 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
Toady Posted June 7, 2007 Author Posted June 7, 2007 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! www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding
CoderDunn Posted June 7, 2007 Posted June 7, 2007 (edited) 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 READGUI 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 June 7, 2007 by Hallman
Toady Posted June 7, 2007 Author Posted June 7, 2007 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 HallmanNo 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
Toady Posted June 7, 2007 Author Posted June 7, 2007 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
ConsultingJoe Posted June 7, 2007 Posted June 7, 2007 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 manhattanCan you please do one more update so that it doesnt keep shutting off.Thanks Check out ConsultingJoe.com
Toady Posted June 7, 2007 Author Posted June 7, 2007 Can you please do one more update so that it doesnt keep shutting off.ThanksFIXEDNow does not close after simulation. You can now pick up where you left off. www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding
Automan Empire Posted June 7, 2007 Posted June 7, 2007 Nice work! Suggestion: Save and Load paths. "I've seen your work in the past, and it's novice at best..." SmOke_N
Toady Posted June 7, 2007 Author Posted June 7, 2007 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
ConsultingJoe Posted June 7, 2007 Posted June 7, 2007 Thanks, Now I understand the methods better and how it acts. Check out ConsultingJoe.com
james3mg Posted June 7, 2007 Posted June 7, 2007 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
James Posted June 8, 2007 Posted June 8, 2007 I just made the most difficult maze I could think of, and it did it! This really rocks. I know I posted but I didnt run it You might want a "Clear" button, so you can clear the maze and re-do it. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
gamepin126 Posted June 8, 2007 Posted June 8, 2007 http://www.mazeworks.com/mazegen/index.htmOn a maze-related note (didn't really feel like making another thread) anyone try doing the reverse? Automatically creating a maze, then solving it?
Toady Posted June 8, 2007 Author Posted June 8, 2007 Updated -Added a reset button -Added a colored trail for the path -Fixed a few other bugs www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding
James Posted June 8, 2007 Posted June 8, 2007 That's better. Nice. When will 3D support be added? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Toady Posted June 8, 2007 Author Posted June 8, 2007 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
James Posted June 8, 2007 Posted June 8, 2007 Well I am no good with the OpenGL stuff etc and my AutoIt skills lack any skill Cyber is starting the 3D project and I am sure he would need help. I can do some things if asked but my skills are, well.. crap. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
ConsultingJoe Posted June 8, 2007 Posted June 8, 2007 Nice. I was wondering. could you rearrange and simplify this into a UDF so I can do the 3D thing? thanks Check out ConsultingJoe.com
Toady Posted June 8, 2007 Author Posted June 8, 2007 Nice.I was wondering. could you rearrange and simplify this into a UDF so I can do the 3D thing?thanksEvery 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
ConsultingJoe Posted June 8, 2007 Posted June 8, 2007 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. Check out ConsultingJoe.com
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now