mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 00:52:40 +00:00
Equalize co-op gift magnitudes to kill 'always leave' dominant strategy
Old values (open ±7, leave ±4) had matching EV but asymmetric variance; risk-averse parties had a strict preference to always leave gifts, which collapsed the dilemma. New values (all ±6) keep EV=0 for both strategies AND equalize variance. Choice now depends entirely on inferring sender intent. Adds TestCoopGiftVarianceSymmetric — fails loud if anyone reintroduces asymmetric magnitudes. EV test was already in place but only checked the mean; missed this on first pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -293,6 +293,31 @@ func TestCoopGiftEVSymmetric(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCoopGiftVarianceSymmetric(t *testing.T) {
|
||||
t.Parallel()
|
||||
// Equal EV is not enough — if open and leave have different variance, a
|
||||
// risk-averse party always picks the lower-variance side and the
|
||||
// dilemma collapses. Magnitudes must be equal across all four outcomes.
|
||||
abs := func(x int) int {
|
||||
if x < 0 {
|
||||
return -x
|
||||
}
|
||||
return x
|
||||
}
|
||||
mags := []int{
|
||||
abs(coopGiftBasketOpened),
|
||||
abs(coopGiftBasketUnopened),
|
||||
abs(coopGiftMimicOpened),
|
||||
abs(coopGiftMimicUnopened),
|
||||
}
|
||||
for i := 1; i < len(mags); i++ {
|
||||
if mags[i] != mags[0] {
|
||||
t.Errorf("gift magnitudes must be equal across all four outcomes; got %v", mags)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestCoopParimutuelNoWinners(t *testing.T) {
|
||||
t.Parallel()
|
||||
bets := []CoopBet{
|
||||
|
||||
Reference in New Issue
Block a user