Skip to content

Instantly share code, notes, and snippets.

@bmorphism
Created April 17, 2023 00:44
Show Gist options
  • Save bmorphism/0042f4e4ec0f28f3a81edc96f2fbe96d to your computer and use it in GitHub Desktop.
Save bmorphism/0042f4e4ec0f28f3a81edc96f2fbe96d to your computer and use it in GitHub Desktop.
nexus
correlatedEquilibrium :: [[Double]] -> [[Double]] -> OpenGame
correlatedEquilibrium payoffs1 payoffs2 mediator = [opengame|
inputs : (i, j, m) ;
feedback : () ;
operation : mediatorAdvice "mediator" mediator ;
outputs : advice ;
returns : () ;
inputs : (i, j, advice) ;
feedback : () ;
operation : correlatedDecision "player1" [0, 1] advice ;
outputs : a1 ;
returns : payoffs1 !! i !! j ;
inputs : (i, j, advice) ;
feedback : () ;
operation : correlatedDecision "player2" [0, 1] advice ;
outputs : a2 ;
returns : payoffs2 !! i !! j ;
|]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment