causalincentives / pycid

Library for graphical models of decision making, based on pgmpy and networkx
Apache License 2.0
96 stars 13 forks source link

Methods for CID subgames #6

Open tom4everitt opened 3 years ago

tom4everitt commented 3 years ago

It would be good to have methods:

where the former extends the given subset to until its closed under r-relevance and directed paths (for MAIM subgames, it’s probably better to enforce that the subset is a subgame base, since the instantiation need to cover the rest of the nodes).

With these methods, it should be pretty convenient to implement the backwards induction for subgame perfect equilibria, by just feeding subsets of decision_nodes to maid_subgame.

tom4everitt commented 3 years ago

Actually, I'm changing my mind a bit here. I think the current version of subgame that just imputes arbitrary mixed decision rules to decisions outside the subgame is much more convenient to work with for many purposes (including for finding subgame perfect NE).

So probably better to define

maim_subgame(node_subset: List[str], instantiation: Dict[str, Any] = None) -> MACID

i.e. make the instantiation optional.

When the instantiation is provided, then the result is a subgraph as in the paper; when the instantiation is not provided, then it just imputes mixed decision rules.