screeps / driver

ISC License
26 stars 36 forks source link

HeuristicWeight should be allowed to be higher than 9 #52

Open GDennis opened 8 months ago

GDennis commented 8 months ago

https://github.com/screeps/driver/blob/12ae1245487c3a274a88d77c242036cecd2355a6/lib/path-finder.js#L92 There is no reason for the heuristicWeight to be limited to only 9. Actually this has lead to some unexpected results: https://screeps.com/forum/topic/2768/pathfinder-using-heuristicweight-to-implement-fractional-costs

I propose to remove that upper limit or choose a very high limit. The user that sets a heuristicWeight that high knows what (s)he's doing and would just be surprised of the high cpu costs that happen because it's actually capped to 9 (undocumented as well).