SGSolve
|
Class to generate random games. More...
#include <sgrandom.hpp>
Public Member Functions | |
SGRandomGame (int numPlayers, int numStates, int numactions) | |
![]() | |
SGGame () | |
Default constructor. | |
SGGame (const SGAbstractGame &game) | |
Converts an SGAbstractGame into a SGGame. More... | |
SGGame (double _delta, int _numStates, const vector< vector< int > > &_numActions, const vector< vector< vector< double > > > &_payoffs, const vector< vector< vector< double > > > &_probabilities) | |
Constructor excluding eqActions. More... | |
SGGame (double _delta, int _numStates, const vector< vector< int > > &_numActions, const vector< vector< vector< double > > > &_payoffs, const vector< vector< vector< double > > > &_probabilities, const vector< bool > &_unconstrained) | |
Constructor customizing unconstrained. | |
SGGame (double _delta, int _numStates, const vector< vector< int > > &_numActions, const vector< vector< vector< double > > > &_payoffs, const vector< vector< vector< double > > > &_probabilities, const vector< vector< bool > > &_eqActions, const vector< bool > &_unconstrained) | |
Constructor customizing equilibrium actions. More... | |
SGGame (int _numPlayers, double _delta, int _numStates, const vector< vector< int > > &_numActions, const vector< vector< vector< double > > > &_payoffs, const vector< vector< vector< double > > > &_probabilities, const vector< vector< bool > > &_eqActions, const vector< bool > &_unconstrained) | |
Constructor with custom numPlayers. More... | |
double | getDelta () const |
Returns SGGame::delta, the discount factor. | |
int | getNumPlayers () const |
Returns SGGame::numPlayers, the number of players. | |
int | getNumStates () const |
Returns the number of states. | |
const vector< vector< int > > & | getNumActions () const |
Sets the argument _numActions equal to SGGame::numActions. | |
const vector< int > & | getNumActions_total () const |
const vector< vector< vector< double > > > & | getProbabilities () const |
Returns a const reference to probabilities. | |
const vector< vector< SGPoint > > & | getPayoffs () const |
Returns a const reference to the payoffs. | |
const vector< vector< bool > > & | getEquilibriumActions () const |
Returns a const reference to the equilibrium actions. | |
void | getPayoffBounds (SGPoint &UB, SGPoint &LB) const |
const vector< bool > & | getConstrained () const |
Returns the unconstrained vector. | |
bool | setDiscountFactor (double newDelta) |
Set discount factor. More... | |
bool | setPayoff (int state, int action, int player, double payoff) |
Set payoffs. More... | |
bool | setProbability (int state, int action, int newState, double prob) |
Set probability. More... | |
bool | setConstrained (const vector< bool > &_unconstrained) |
Sets whether or not players are incentive constrained. | |
bool | addAction (int state, int player, int position) |
Adds a new action. More... | |
bool | removeAction (int state, int player, int action) |
Removes the given action. | |
bool | addState (int position) |
Adds a new state. More... | |
bool | removeState (int state) |
Removes the given state. | |
bool | transitionProbsSumToOne (double tolerance=1e-3) const |
Check if transition probabilities sum to one. | |
bool | profitableDeviation (vector< int > &input, SGGame game) |
Check if there exists a profitable deviation. | |
Private Attributes | |
int | numactions |
Additional Inherited Members | |
![]() | |
static void | save (const SGGame &game, const char *filename) |
Static method for saving an SGGame object to the file filename. | |
static void | load (SGGame &game, const char *filename) |
Static method for loading an SGGame object from the file filename. | |
![]() | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Serializes the game using boost. | |
![]() | |
double | delta |
int | numPlayers |
int | numStates |
vector< vector< int > > | numActions |
vector< int > | numActions_total |
vector< vector< SGPoint > > | payoffs |
vector< vector< vector< double > > > | probabilities |
vector< vector< bool > > | eqActions |
vector< bool > | unconstrained |
Class to generate random games.