Players & Strategies
Configuring the decision-makers and their available actions.
Players
Basic Declaration
players Alice, Bob
Meaningful Names
Use names that reflect the domain:
// Economic games
players Firm1, Firm2
players Buyer, Seller
players Incumbent, Entrant
// Political games
players Congress, President
players Country1, Country2
// Social games
players Driver1, Driver2
players Hunter1, Hunter2
Strategies
Basic Declaration
strategies Cooperate, Defect
Multiple Strategies
strategies Rock, Paper, Scissors
strategies Low, Medium, High
strategies Enter, Exit, Wait
Shared Strategy Sets
Currently, all players share the same strategy set. This works for symmetric games like:
- Prisoner's Dilemma
- Stag Hunt
- Rock-Paper-Scissors
Modeling Asymmetric Games
For games where players have different actions, include all strategies and assign payoff 0 to invalid combinations:
game EntryDeterrence {
players Entrant, Incumbent
strategies Enter, StayOut, Fight, Accommodate
// Entrant only uses: Enter, StayOut
// Incumbent only uses: Fight, Accommodate
payoff Entrant {
(Enter, Accommodate): 2 // Valid
(Enter, Fight): -1 // Valid
(StayOut, Accommodate): 0 // Valid (no entry = no payoff)
(StayOut, Fight): 0 // Valid
// Entrant doesn't use Fight or Accommodate
}
payoff Incumbent {
(Enter, Accommodate): 1 // Valid
(Enter, Fight): -1 // Valid
(StayOut, Accommodate): 2 // Valid (monopoly maintained)
(StayOut, Fight): 2 // Valid
}
}
Future: Asymmetric strategy sets (
strategies Alice: X, Y and strategies Bob: A, B) are on the roadmap.
N-Player Games
Games with more than 2 players are partially supported:
players P1, P2, P3
strategies Left, Right
However, payoff rules currently only support 2-strategy profiles. Full N-player syntax is coming in a future release.
Next Steps
- Payoff Matrices → — Complex payoff expressions