Skip to content

10: the coin and flu-advertising games, and the entry that removes a saddle point - #5

Merged
yamierick merged 1 commit into
mainfrom
games/saddle-points
Oct 27, 2026
Merged

yamierick merged 1 commit into
mainfrom
games/saddle-points

Conversation

@yamierick

Copy link
Copy Markdown
Contributor

Stacked on #4. Its base is standards/gaps, because the new notebook needs #4's setup cell and data-path changes. Merge #4 first; GitHub will then retarget this PR to main.

Adds notebooks/10_game_theory/saddle_points.ipynb: the three games that IE 3315 and IE 5301 teach this term. It's built step by step and checked against orteach.games, which needed no changes.

  • Coin game: value 0, each player 50/50.
  • Flu-medicine advertising game (Taha): a saddle point at TV against TV, value 5.
  • The same game with that one entry changed from 5 to 2: the saddle point disappears; value 42/17.

Every optimal strategy is unique, so the final check compares the full strategy vectors, not just the values. The commit message has the details.

🤖 Generated with Claude Code

…s a saddle point

IE 3315 and IE 5301 both teach zero-sum games in 2026 from
04_Zero_Sum_Game_LP.ipynb (each course's code folder): the coin game, the
flu-medicine advertising game from Taha with its saddle point, and the same
game with the TV-against-TV entry changed from 5 to 2. The library had only
a 2x4 game the courses no longer use. That notebook also defines its
solvers in helper functions before any narration, the inversion Part 3
says to check for first.

saddle_points.ipynb builds each row LP by hand (one constraint per column,
coefficients read from the table), checks maximin against minimax before
solving, and changes the one entry with chgCoeff on the model already in
memory, so the student sees one coefficient change and the saddle point
go. It asks rather than tells: which cell the LP picked, where between 2
and 4 the value lands, and why B mixes over exactly the two zero-slack
columns.

Results, recomputed when written: coin value 0 at (1/2, 1/2); advertising
value 5, pure at (A2, B2); changed value 42/17, p = (0, 13/17, 4/17),
q = (0, 15/17, 2/17, 0). Every optimum is unique (each probability
maximised and minimised over the optimal set), so the agreement assertion
compares whole strategy vectors: 20 comparisons plus the three
saddle-point verdicts, against orteach.games, which needed no change.

Tables coin_2x2.csv and flu_advertising_3x4.csv; tests pin all three
games, the 42/17 as a fraction. Folder 10's README no longer says the
notebook "is not migrated"; the counts in README, CLAUDE.md and
CITATION.cff go from seventeen notebooks to eighteen.

Gate: 194 passed; 18 notebooks and 12 seeds clean; ruff clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yamierick
yamierick changed the base branch from standards/gaps to main October 27, 2026 14:31
@yamierick
yamierick merged commit 5311d15 into main Oct 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant