Files
sor/Server
16521b47b9 fix: add proximity gradient to positional score to prevent AI stalemate
The old scoring only gave +15 when a unit was already adjacent to the enemy
ArchSpirit — no reward for closing distance from further away. This caused
both AIs to settle into a static local optimum far from each other and never
advance (observed at turn 171 with armies on opposite sides of the board).

Adds a continuous gradient: +20×(1-dist/maxDist) per unit toward enemy
ArchSpirit and +8×(1-dist/maxDist) toward nearest enemy unit. Each step
forward now gives a small positive score improvement, so the greedy engine
always has a reason to advance when no better action exists.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-04-13 17:07:34 -04:00
..