← All examples
20

Canonical Grid model

Certified Strategic Families

Graphical, imperfect-information, Bayesian, stochastic, cooperative, matching, congestion, and general VCG models through declarative games and mechanisms.

Scale
Large
Source
20-strategic-families.grid
Length
147 lines
Collection
Advanced language
Level
Advanced
Runtime
Portable
Version
1.0.0

Watch it in Grid

See this model in motion.

Watch the model respond in the product, then inspect the exact source and checkpoints on this page.

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

What this model gives you

A chooser for eight strategic families, helping authors select the smallest certified game or mechanism representation that preserves their domain structure.

40 min to study · Source reviewed 2026-08-26

Continue with guided practice

What to notice

  • Choose a solver lane by information structure
  • Preserve compact local and dynamic representations
  • Use specialized cooperative, matching, and congestion kernels
  • Distinguish game analysis from VCG mechanism design

Requirements

  • Runtime with the complete GAME.* and MECHANISM.* certified family kernels
  • Finite complete specifications within authored work limits
  • No connector or network

Expected checkpoint

A known state for this walkthrough.

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.

Local or hidden interaction
LocalEquilibria or HiddenEquilibriumChoose graphical for local factors; imperfect for information sets
Types or repeated state
BayesianEquilibrium or StationaryEquilibriumChoose Bayesian for private types; stochastic for discounted transitions
Joint surplus
CooperativeAnalysisComplete finite characteristic function
Preferences or shared resources
StablePlacement or RouteEquilibriumStable matching versus congestion
Transfers and externalities
EfficientOutcomeFinite feasible-outcome VCG mechanism
01 · Chooser 1

Are payoffs local, or is action hidden?

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.

02 · Chooser 2

Are types private, or does state evolve?

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.

03 · Chooser 3

Is the domain a coalition, preference market, or resource game?

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.

04 · Chooser 4

Do payments internalize externalities?

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.

05 · Verify

Retain the complete evidence object from the chosen lane

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.

20-strategic-families.grid
Get Grid
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