Companion film
A stable match with proof
Toggle one preference and watch the matching reorganize while stability, proposer optimality, and complete assignment remain certified.
47 secGrid 0.63.2
Open film page →Canonical Grid model
Graphical, imperfect-information, Bayesian, stochastic, cooperative, matching, congestion, and general VCG models through declarative games and mechanisms.
What this model gives you
40 min to study · Source reviewed 2026-08-26
Continue with guided practiceExpected checkpoint
With all eight small authored specifications loaded independently. Treat each output as a separate solver-backed evidence object; the current contract certifies the catalog’s compilation, not the internal fields of any solver result.
Choose GAME.GRAPHICAL when each player has a compact local factor scope and you need pure equilibria without building the global payoff product. Choose GAME.IMPERFECT when players act in an explicit perfect-recall information-set tree.
Choose GAME.BAYESIAN for a complete joint type prior and type-contingent payoffs. Choose GAME.STOCHASTIC for explicit discounted states, action-pair rewards, transitions, and stationary policies.
Choose GAME.COOPERATIVE for a complete characteristic function, GAME.STABLE_MATCH for strict possibly incomplete two-sided preferences, or GAME.CONGESTION for strategies defined by shared resources and load-dependent costs.
Choose MECHANISM.VCG only when the model enumerates feasible outcomes and every agent’s value for each one. It solves allocation plus Clarke-pivot payments; it is not a generic equilibrium substitute.
All families fail closed when validation or bounded complete search cannot finish. Publish the result’s honesty status, certificate, residuals or counterexamples, and work counts before projecting a decision field.
MODEL "Certified Strategic Families"
DESCRIPTION "Graphical, imperfect-information, Bayesian, stochastic, cooperative, matching, congestion, and general VCG models through declarative games and mechanisms."
VERSION "1.0.0"
TAGS "game-theory", "graphical-games", "imperfect-information", "bayesian", "stochastic", "cooperative", "matching", "congestion", "vcg"
LocalInteractionSpecification = {
players: [
{id: "row", strategies: ["preferred", "other"]},
{id: "column", strategies: ["preferred", "other"]}
],
factors: [
{id: "row-payoff", owner: 0, scope: [0], entries: [
{actions: [0], payoff: 1},
{actions: [1], payoff: 0}
]},
{id: "column-payoff", owner: 1, scope: [1], entries: [
{actions: [0], payoff: 1},
{actions: [1], payoff: 0}
]}
]
}
game LocalInteraction { graphical = LocalInteractionSpecification }
output LocalEquilibria = GAME.GRAPHICAL(LocalInteraction)
HiddenMatchingPennies = {
players: ["row", "column"],
root: "row",
nodes: [
{
kind: "decision", id: "row", player: 0, informationSet: "row-choice",
actions: [{id: "heads", next: "column-h"}, {id: "tails", next: "column-t"}]
},
{
kind: "decision", id: "column-h", player: 1, informationSet: "column-choice",
actions: [{id: "heads", next: "hh"}, {id: "tails", next: "ht"}]
},
{
kind: "decision", id: "column-t", player: 1, informationSet: "column-choice",
actions: [{id: "heads", next: "th"}, {id: "tails", next: "tt"}]
},
{kind: "terminal", id: "hh", payoffs: [1, -1]},
{kind: "terminal", id: "ht", payoffs: [-1, 1]},
{kind: "terminal", id: "th", payoffs: [-1, 1]},
{kind: "terminal", id: "tt", payoffs: [1, -1]}
]
}
game HiddenGame { imperfect = HiddenMatchingPennies }
output HiddenEquilibrium = GAME.IMPERFECT(HiddenGame)
BayesianSpecification = {
players: [
{id: "row", types: ["known"], actions: ["heads", "tails"]},
{id: "column", types: ["known"], actions: ["heads", "tails"]}
],
prior: [{types: [0, 0], probability: 1}],
payoffs: [
{types: [0, 0], actions: [0, 0], payoffs: [1, -1]},
{types: [0, 0], actions: [0, 1], payoffs: [-1, 1]},
{types: [0, 0], actions: [1, 0], payoffs: [-1, 1]},
{types: [0, 0], actions: [1, 1], payoffs: [1, -1]}
]
}
game BayesianStage { bayesian = BayesianSpecification }
output BayesianEquilibrium = GAME.BAYESIAN(BayesianStage)
StochasticSpecification = {
players: ["row", "column"],
discount: 0.9,
states: [{
id: "play",
rowActions: ["heads", "tails"],
columnActions: ["heads", "tails"],
outcomes: [
{rowAction: 0, columnAction: 0, reward: 1, transitions: [{nextState: "play", probability: 1}]},
{rowAction: 0, columnAction: 1, reward: -1, transitions: [{nextState: "play", probability: 1}]},
{rowAction: 1, columnAction: 0, reward: -1, transitions: [{nextState: "play", probability: 1}]},
{rowAction: 1, columnAction: 1, reward: 1, transitions: [{nextState: "play", probability: 1}]}
]
}]
}
game RepeatedContest { stochastic = StochasticSpecification }
output StationaryEquilibrium = GAME.STOCHASTIC(RepeatedContest)
CharacteristicFunction = {
players: ["a", "b"],
coalitions: [
{members: [], value: 0},
{members: ["a"], value: 0},
{members: ["b"], value: 0},
{members: ["a", "b"], value: 10}
]
}
game Consortium { cooperative = CharacteristicFunction }
output CooperativeAnalysis = GAME.COOPERATIVE(Consortium)
PreferenceMarket = {
proposers: [
{id: "alice", preferences: ["x", "y"]},
{id: "bob", preferences: ["x", "y"]}
],
receivers: [
{id: "x", preferences: ["bob", "alice"]},
{id: "y", preferences: ["alice", "bob"]}
]
}
game Residency { matching = PreferenceMarket }
output StablePlacement = GAME.STABLE_MATCH(Residency)
RouteGame = {
players: [
{id: "driver-a", strategies: [
{id: "left", resources: ["left-road"]},
{id: "right", resources: ["right-road"]}
]},
{id: "driver-b", strategies: [
{id: "left", resources: ["left-road"]},
{id: "right", resources: ["right-road"]}
]}
],
resources: [
{id: "left-road", costs: [1, 3]},
{id: "right-road", costs: [1, 3]}
]
}
game Traffic { congestion = RouteGame }
output RouteEquilibrium = GAME.CONGESTION(Traffic)
FeasibleOutcomeValues = {
agents: ["alice", "bob"],
outcomes: [
{id: "none", values: [0, 0]},
{id: "alice-wins", values: [10, 0]},
{id: "bob-wins", values: [0, 7]}
]
}
mechanism Allocation { vcg = FeasibleOutcomeValues }
output EfficientOutcome = MECHANISM.VCG(Allocation)
END MODEL