Pathfinding test please
Blitz3D Forums/Blitz3D Programming/Pathfinding test please
| ||
http://www.rosscrooks.pwp.blueyonder.co.uk/pathfinding.zip Run "pathfinding.bb" I don't quite use the A* pathfinding idea, I just generate a list of paths. Then choose the quickest predicted path (distance travelled + distance remaining). If a complete path exists, then only new paths are generated if they are shorter than the generated ones. I'm sure this will be slower than other methods, but just curious how much slower. I also would appreciate if you stuck down your CPU too :D And i understand that results depends on CPU speed too. Try making a path from 1 to 24. Choose Start as 1. Choose Finish as 24. It should give you a time. If you put it on debug mode, it will dump the path in the debuglog. I recommend running in NOT in debug mode, to attain highest speeds. Thanks! |
| ||
Intel Core 2 Duo 2Ghz Non Debug: 228 Debug Log: *******----------------- Goal path found! -------------PATHS destroyed--------- 2962 ------------------ Path taken to goal Node - 1 Node - 6 Node - 11 Node - 16 Node - 20 Node - 21 Node - 22 Node - 24 |
| ||
Thanks man :o) Round about the same as my time. Still waaaaaaaaaay too slow. |
| ||
Intel Core 2 Duo 2.4 Ghz Non Debug: 187 |
| ||
Athlon 1Ghz Debug off: 818 |
| ||
debug on 1375 athlon 64 dual core 6000 |
| ||
Thanks guys :o) I'm such an idiot!!! I was using INSERT, to insert my new path, based on distance, into the path list. Now, because of the way the pointer is, i was inserting before the number i compare to, and it was causing a massive build up of paths to occur. Upon testing that path i gave you's to test, it was generating 2217 paths... Anyway, the above path now takes 3 millisecs, so that's alot better :o) |