Improve AI to stop selling everything.

This commit is contained in:
Greyson Parrelli
2026-07-24 22:34:55 -04:00
parent 95499026d7
commit 5a396e6efe
3 changed files with 91 additions and 0 deletions
+8
View File
@@ -8,6 +8,14 @@ import (
"github.com/greyson/super-auto-pets-board-game/internal/game"
)
// sellPetPenalty converts "persistent pet value destroyed by a sell" into a
// score penalty (see the sell-candidate logic in shop.go). A pet's keepValue
// is on the order of 15; multiplied by this weight and the future's share of
// the blend, one junk-pet sell drops a candidate by roughly a tenth of a
// win-probability point — enough to make keeping a body the default, while
// still letting a strongly positive rollout justify a genuine reshape.
const sellPetPenalty = 0.20
// winScore converts a simulated battle outcome to a utility for mySeat:
// win 1, draw 0.5 (nobody gains ground), loss 0, plus a small margin term.
//