This is supplementary material to our paper (Hall-Andersen and Schwartzbach, 2021).
This small widget computes reverse Stackelberg equilibria in finite games with perfect information. This corresponds to two players able to deploy smart contracts to constrain their moves. The leader (player 1) deploys a smart contract and announces it, after which the follower (player 2) deploys their contract, and then the game is played. The leader's contract is allowed to reason about the contract deployed by the follower. When there is not perfect information the problem can be shown to be Σ2P-complete. As of present, it only supports two players.
The game tree is inputted as raw JS code and parsed using eval(...).
To make a leaf, use the syntax ["leaf",u1,u2] where ui is the payoff of player i.
To make a branch, use the syntax ["node",i,c1,c2,...,cn] where i is the index of the player to whom the node belongs, and cj is the jth child.
Mathias Hall-Andersen and Nikolaj I. Schwartzbach. Game theory on the blockchain: a model for games with smart contracts. In 14th International Symposium on Algorithmic Game Theory, 2021.
Department of Computer Science. Aarhus University.