JonathanSafer / screeps

Screeps AI
MIT License
25 stars 7 forks source link

quad path caching #125

Open JonathanSafer opened 4 years ago

JonathanSafer commented 4 years ago

quad should cache its path to save some cpu. The amount of time that each path is cached for should be determined by the minimum time it would take for a disruption to occur.

JonathanSafer commented 4 years ago

minimum disruption time should be determined by labelling each path segment with the associated tick of its use. We then loop thru the path, and find the first path that could be intersected by its associated tick. That tick would mark the end of the cache

JonathanSafer commented 4 years ago

of course, a cached path should only be used if the quad's destination remains unchanged