Prototype icon indicating copy to clipboard operation
Prototype copied to clipboard

Refactor AI unit strategy assignment

Open QuintillusCFC opened this issue 3 years ago • 1 comments

Of the three AI decision-making types we have (unit strategy, city production, and strategic priority), unit strategy is currently the least sophisticated. It's essentially a deterministic if-else chain, which is not going to be very maintainable as it grows, and doesn't allow for any element of chance.

City production has a more sophisticated process of weighing each possibility and then deciding among the options, and strategic priorities have that plus an architecture that is at least in theory pluggable. They've both been worked on more recently.

QuintillusCFC avatar Sep 20 '22 03:09 QuintillusCFC

Either as part of this or spun off, we should also use the path and moveAlongPath property/methods on Unit/UnitExtensions, rather than duplicating that logic in various AI behavior classes.

QuintillusCFC avatar Sep 20 '22 03:09 QuintillusCFC