Improve AI to stop selling everything.
This commit is contained in:
@@ -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 1–5; 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.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user