-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
GDS-games specifies game structure (players, actions, payoffs, composition) but doesn't compute equilibria. The TerminalCondition metadata in the PD DSL example already declares outcomes (including "Mutual Defection" as Nash equilibrium) but this is hand-annotated, not computed. Adding Nashpy/pygambit integration would bridge the gap from structural specification to computational game theory — making GDS-games actionable.
Motivation
The existing PatternIR already contains the data needed for solver input:
action_spaces→ player action setsterminal_conditions→ outcome annotations (currently manual)- Game composition structure → information sets
With a solver backend, we could:
- Compute Nash equilibria from the structural specification
- Verify hand-annotated terminal conditions against computed results
- Analyze dominance, Pareto optimality, and equilibrium characterization
Proposed Approach
Phase 1: Nashpy integration (2-player normal-form games)
- Add
nashpyas optional dependency togds-gamesorgds-examples - Build payoff matrices from
PatternIRmetadata (action_spaces+terminal_conditions) - Support enumeration algorithm for Nash equilibrium computation
- Cross-reference computed equilibria against declared
TerminalConditions
Phase 2: pygambit integration (n-player extensive-form games)
- Add
pygambitas optional dependency for richer game representations - Map OGS composition trees to extensive-form game trees
- Support mixed-strategy equilibria and refinements
- Leverage
HierarchyNodeIRfor information set construction
Phase 3: Solver-backed verification
- New OGS verification check: "declared equilibria match computed equilibria"
- Automated Pareto optimality classification of terminal conditions
- Dominance analysis as a verification finding
Key Files
ogs/dsl/pattern.py—TerminalCondition,ActionSpacemodels (solver inputs)ogs/ir/models.py—PatternIRwithaction_spacesandterminal_conditionspackages/gds-examples/games/prisoners_dilemma_nash/— Phase 1 proof-of-concept
Prior Art
- Nashpy — 2-player game solver (support enumeration, vertex enumeration, Lemke-Howson)
- pygambit — n-player game solver (extensive + strategic form)
Labels
enhancement, gds-games
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request