Toady Posted June 17, 2007 Author Share Posted June 17, 2007 Some pointers:Overestimating Heuristic Cost: Using a heuristic that routinely overestimates (the distance cost) by a little usually results in faster searches with reasonable paths.If making the world bigger you could decouple the path finding data from the search space. This would reduce memory consumption.#)Yes I know about this. Yet this would violate the shortest path rule. I may add an option to overestimate the heuristic in the future. www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 17, 2007 Share Posted June 17, 2007 Toady, you are insane. How much time do you spend a day on this? Link to comment Share on other sites More sharing options...
Toady Posted June 18, 2007 Author Share Posted June 18, 2007 UPDATE Added option to overestimate the searching heuristic. Doing this is a lot faster though it does not guarantee the shortest path. www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 18, 2007 Share Posted June 18, 2007 (edited) hey could you possible add a spot in the script where we can put in our own little character to follow the path instead of a blue square? or mention the line number this is on Edited June 18, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Toady Posted June 18, 2007 Author Share Posted June 18, 2007 hey could you possible add a spot in the script where we can put in our own little character to follow the path instead of a blue square? or mention the line number this is onThe GUI is just to see whats happening. Adding a character is out of scope. However, you can easily take this script and turn it into something you like. www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 18, 2007 Share Posted June 18, 2007 im no where near being able to implement this into anything i can do lol. i just think being able to add a character would make it almost a game in it self. My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
James Posted June 18, 2007 Share Posted June 18, 2007 When running the latest version, I get this error:C:\Programming\toady.au3(127,63) : WARNING: $closedList_data: possibly used before declaration. Dim $searchedNodes[UBound($closedList_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^The program runs, but doing this:Doesn't work?? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Toady Posted June 18, 2007 Author Share Posted June 18, 2007 When running the latest version, I get this error: C:\Programming\toady.au3(127,63) : WARNING: $closedList_data: possibly used before declaration. Dim $searchedNodes[UBound($closedList_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ The program runs, but doing this: Doesn't work?? It does work, try actually making something. Dont pay attention to that warning its something in the gui. www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
James Posted June 18, 2007 Share Posted June 18, 2007 I did make something! As you can see! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Toady Posted June 18, 2007 Author Share Posted June 18, 2007 UPDATE Fixed a very minor bug in the gui. Also does not show a warning anymore. Happy searching! www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
James Posted June 18, 2007 Share Posted June 18, 2007 Thats better! I love this program! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Toady Posted June 20, 2007 Author Share Posted June 20, 2007 Thats better! I love this program!thanks www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 20, 2007 Share Posted June 20, 2007 (edited) hey is there coordinates for the top left corner of the user selected start area in a variable? EDIT: i found $start_handel[1] and [2] but they dont seem to do what im looking for Edited June 20, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Toady Posted June 20, 2007 Author Share Posted June 20, 2007 hey is there coordinates for the top left corner of the user selected start area in a variable?Yes each square has its own (array type) with its coordinate in index 0. In the GUI example the top left corner is "1,1".Does this answer your question? www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 20, 2007 Share Posted June 20, 2007 (edited) not quite. like when i select the start button and click on a square it turns it green and sets that area as the start area. i need to know the coordinates for the start area. Like here $start_handel[0] = $msg $start_handel[1] = $sel_X $start_handel[2] = $sel_Y GUICtrlSetBkColor($msg,0x00ff00) $data[$sel_X - 1][$sel_Y - 1] = "s" is this what i need to use? Edited June 20, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Toady Posted June 20, 2007 Author Share Posted June 20, 2007 Yes www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 20, 2007 Share Posted June 20, 2007 (edited) i used index 1 and 2 for the x and y coordinates and it placed the object at 1,1. should i use index 0 for both coordinates? EDIT: Oo wait a minute, the coordinates arent set as pixels they are set as grid boxes arent they. Edited June 20, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Toady Posted June 20, 2007 Author Share Posted June 20, 2007 i used index 1 and 2 for the x and y coordinates and it placed the object at 1,1. should i use index 0 for both coordinates?EDIT: Oo wait a minute, the coordinates arent set as pixels they are set as grid boxes arent they.lol yes. Each box is a label. www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 20, 2007 Share Posted June 20, 2007 (edited) ok and this is what moves it? GUICtrlSetPos($label,$temp[2] * 25,$temp[1] * 25) GUICtrlSetBkColor(-1,0xccffff) EDIT: The heck with it. i was trying to add a character but it wont move right and when it did it made the program slow and didnt delete the image from where it was before. Edited June 20, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Toady Posted June 27, 2007 Author Share Posted June 27, 2007 (edited) update: ~ 40% faster for each node searched. Therefor, previous version had ~470 ms to search all nodes in a 15x15 open grid. This version had ~170 ms!... A large difference, 300 ms! Now if autoit had pointers.. hmmm. Edited June 27, 2007 by Toady www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
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