ai-code-battle/bots/farmer
jedarden d5515e0bca feat(mechanics): reduce flee thresholds and derive aggression from kill rate
## Flee Threshold Changes
- Reduced flee threshold from AttackRadius2+4 to AttackRadius2 (no buffer)
- Modified bots: farmer, gatherer, siege
- Bots now only consider enemies in actual attack range, not preemptively
- Added outnumber logic: only flee when nearbyAllies < nearbyEnemies

## Behavior Vector Changes
- Derive aggression from actual kill rate (not self-reported)
- Formula: behaviorVec[0] = min(killRate, 1.0)
- Preserves existing economy value or defaults to 0.5
- Enhanced logging to show derived aggression value

## Rationale
Aggression must be economically necessary, not just rewarded.
Previous flee logic created a false safe option that discouraged combat.
Now bots only flee when actually outnumbered within combat range.

Related: bf-413 genesis bead tracking mechanics iteration
2026-06-17 03:51:15 -04:00
..
Dockerfile feat(bot): add Farmer bot (Go) — economy-maximizer archetype 2026-04-22 16:30:26 -04:00
go.mod feat(bot): add Farmer bot (Go) — economy-maximizer archetype 2026-04-22 16:30:26 -04:00
grid.go feat(bot): add Farmer bot (Go) — economy-maximizer archetype 2026-04-22 16:30:26 -04:00
main.go fix(bots): remove timestamp from verify_signature signing string 2026-05-02 20:43:44 -04:00
strategy.go feat(mechanics): reduce flee thresholds and derive aggression from kill rate 2026-06-17 03:51:15 -04:00
strategy_test.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00