Path manager

Started by
0 comments, last by Kylotan 19 years, 3 months ago
Disclamer: Idea only, probably won't get built, but it's a nice thought exersise brout about by reading AI, a modern approach second addition (international version, got it as a late christmas present today) In ts section on path finding (eg. pg 100) I've been thinking, About a path-finding manager. Basically, you give it a map on startup (or a pointer to it), you also send it the paths you want built, and how long it has per call. So, when your sending the paths, you give things like: Start & end points. Priority Amont of nodes of path needed So, now every call (frame), it uses the time it has wisely: What it does first, is calculate the priority index of each path it has to calculate a priority index (which is a metric of calculateablilty. a pi of 1 gets calculated before a pi of 0.9, and so on. it is generated by looking at how long it has been waiting compared to the average weighting time.) It then takes the top 5 paths, and according to their pi, it assignes a portion of the remaining time to calculating its path. It then finishes up, doing things like updating the last-used variable, and other clean up jobs. It stores the open and closed lists of each path in memory, until the path is complete. now, what happens if the calculation takes up to much time (maybe > 1/4 of the time allowed by the program)? What we do is have a giant list of paths, but we only calculate the pi of a select few, say 100 or so. We then resort the bigger list of pi's into a second list. once we have calculated all paths on the current list, we pverrite the first list with the second one, and start over again. Now with the last used variable, instead of having the current itme, it has the amount of times that the lists have swapped. Is this an ok system of handling giant lists oof paths to compute? Also how would you design a system to make path generating faster, by using other calculated paths (w/ trees), to speed up making another path? From, Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Advertisement
Path priorities sound reasonable, but only if you have real reasons to make the calculation of one path faster than another. Otherwise I think you're just overcomplicating the issue. I don't really see any benefit to the below approach, over simply processing a few paths per frame (for example). All that book-keeping probably just consumes time that would be better used by just trying to complete more paths.

This topic is closed to new replies.

Advertisement