|
let heuristicWeight = Math.min(9, Math.max(1, options.heuristicWeight || 1.2)); |
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).
driver/lib/path-finder.js
Line 92 in 12ae124
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).