Skip to content

Kuhn Poker#3

Merged
folkengine merged 2 commits into
mainfrom
kuhn
Apr 6, 2026
Merged

Kuhn Poker#3
folkengine merged 2 commits into
mainfrom
kuhn

Conversation

@folkengine
Copy link
Copy Markdown
Contributor

The following 7 types are now exposed from pkpy:

  ┌──────────────┬──────────────────────────────────────────────────────────────────┐
  │ Python class │                            What it is                            │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnCard     │ Enum-like: .JACK, .QUEEN, .KING with ordering                    │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnAction   │ Enum-like: .CHECK, .BET, .CALL, .FOLD                            │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnHistory  │ Immutable action sequence; push() returns a new history          │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnInfoSet  │ Card + history visible to one player; .card, .history props      │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnState    │ Full game state; apply(), payoff(), legal_actions(), info_set()  │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnStrategy │ Nash strategy; KuhnStrategy.gto(alpha) or KuhnStrategy.default() │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnCfr      │ CFR trainer; train(n), exploitability(), average_strategy()      │
  └──────────────┴──────────────────────────────────────────────────────────────────┘

  ┌──────────────┬──────────────────────────────────────────────────────────────────┐
  │ Python class │                            What it is                            │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnCard     │ Enum-like: .JACK, .QUEEN, .KING with ordering                    │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnAction   │ Enum-like: .CHECK, .BET, .CALL, .FOLD                            │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnHistory  │ Immutable action sequence; push() returns a new history          │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnInfoSet  │ Card + history visible to one player; .card, .history props      │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnState    │ Full game state; apply(), payoff(), legal_actions(), info_set()  │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnStrategy │ Nash strategy; KuhnStrategy.gto(alpha) or KuhnStrategy.default() │
  ├──────────────┼──────────────────────────────────────────────────────────────────┤
  │ KuhnCfr      │ CFR trainer; train(n), exploitability(), average_strategy()      │
  └──────────────┴──────────────────────────────────────────────────────────────────┘
@folkengine folkengine merged commit d6de171 into main Apr 6, 2026
1 check passed
@folkengine folkengine deleted the kuhn branch April 6, 2026 12:46
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