Search for a placement of buildingId near ideal that scores better than
its current spot, by trying candidates on a clone of the village and
re-validating each move through the aggregate. The returned position is
therefore guaranteed legal (in-bounds, non-overlapping) and measurably
better — this is what makes the AI's "move X" suggestions trustworthy rather
than hand-wavy.
Search for a placement of
buildingIdnearidealthat scores better than its current spot, by trying candidates on a clone of the village and re-validating each move through the aggregate. The returned position is therefore guaranteed legal (in-bounds, non-overlapping) and measurably better — this is what makes the AI's "move X" suggestions trustworthy rather than hand-wavy.