Skip to content

Conversation

@antoniogois
Copy link

@antoniogois antoniogois commented Jan 6, 2026

Problem

Currently it is not possible to use the PayoffMatrix component to model simultaneous-move games (e.g. Prisoner’s Dilemma), since this component does not support players that act in parallel. (PayoffMatrix requires EventResolution, which in turn calls get_currently_active_player(), which is incompatible with the Simultaneous engine)

When using the Sequential engine, PlayerB observes whether PlayerA cooperated before it has to choose its action, changing the nature of the game.


Solution

This pull request adds explicit support for simultaneous actions with PayoffMatrix:

  • Implements a new component NextActingAllEntitiesFromSceneSpec
  • Main change: Provides PayoffMatrix with a new parameter acting_order . Default behaviour remains unchanged, but if set to simultaneous it processes multiple actions in the same round (without calling EventResolution)
  • Adapt game_theoretic_and_dramaturgic game master to have a new parameter acting_order. Use parallel actions if acting_order== simultaneous.
  • Add new notebook with example usage examples/iterated_prisoners_dilemma.ipynb

@google-cla
Copy link

google-cla bot commented Jan 6, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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