Implements the iterSemiNFG class
Part of: PyNFG - a Python package for modeling and solving Network Form Games
Created on Mon Feb 18 10:37:29 2013
Copyright (C) 2013 James Bono (jwbono@gmail.com)
GNU Affero General Public License
Implements the iterated semi-NFG formalism created by D. Wolpert
For an example, see PyNFG/bin/hideandseek.py
Parameters: |
|
---|
An iterated semi-NFG is a semi-NFG created from iteratively gluing a kernel to a base. It is a Markov iterated semi-NFG if the t’th copy of the kernel is conditionally independent of all nodes in the t-2’th copy and earlier. Instead of utility functions, iterated semi-NFGs use reward functions.
Note
This class is a subclass of seminfg.SemiNFG. It inherits all of the SemiNFG functionality except seminfg.SemiNFG.utiity() is replaced by seminfg.iterSemiNFG.reward().
Note
An object that consists of all of these elements except the reward functions is called a iterated semi-Bayes net. When initialized with r_functions=None, the result is an iterated semi-Bayes net.
Note
For a node in nodes, the parent attribute, e.g. nodes.ChanceNode.parents, must not have parents that are not in the set of nodes passed to seminfg.SemiNFG.
Some useful methods:
Upon initialization, the following private methods are called:
Retrieve the values of the nodes comprising the SemiNFG.
Parameters: | nodenames (set or list) – (Optional) The names of the nodes whose values should be returned. If no names are specified, all node values are returned. |
---|---|
Returns: | dict where keys are node names and values are node values |
Return the npv of rewards from start using delta discount factor
Parameters: |
---|
Evaluate the reward of the specified player in the specified time.
Parameters: |
|
---|
Sample the nodes from a starting time through a stopping time.
Parameters: |
|
---|---|
Returns: | a dict keyed by base names in basenames input. Values are time series of values from start to stop of nodes that share that basename. |
Warning
The decision nodes must have CPTs before using this function.