SGSolve
SGBaseAction Class Reference

Describes an action in the game. More...

#include <sgbaseaction.hpp>

Inheritance diagram for SGBaseAction:
Collaboration diagram for SGBaseAction:

Public Member Functions

 SGBaseAction ()
 Constructor. More...
 
 SGBaseAction (int _state, int _action)
 Constructor. More...
 
 SGBaseAction (int _numPlayers, int _state, int _action)
 Constructor. More...
 
 ~SGBaseAction ()
 Destructor.
 
bool getIsNull () const
 Returns true if the action is null.
 
int getAction () const
 Returns the action.
 
const vector< SGTuple > & getPoints () const
 Returns the points array.
 
const vector< SGTuple > & getBndryDirs () const
 Get method for bndry dirs.
 
const vector< vector< int > > & getTuples () const
 Returns the tuples array.
 
int getState () const
 Returns the state.
 
bool hasCorner () const
 Returns whether or not the action has a corner.
 
const SGPointgetMinICPayoffs () const
 Returns the minimum IC continuation values.
 
const vector< SGTuple > & getBindingContinuations () const
 Returns the array of binding continuation values.
 
void setMinICPayoffs (const SGPoint &newMinIC)
 Sets the minimum IC continuation values.
 
void setTuples (const vector< vector< int > > &newTuples)
 Sets the tuples array.
 
void setPoints (const vector< SGTuple > &newPoints)
 Sets the points array

 
void setPointsAndTuples (const vector< SGTuple > &newPoints, const vector< vector< int > > &newTuples)
 Sets the points and tuples arrays.
 
void setCorner (bool tf)
 Sets the corner indicator. More...
 
bool isCorner (const int p, const int k) const
 Returns whether or not the minimum IC payoff is feasible.
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 Serializes the action using the boost::serialization library.
 

Protected Attributes

int numPlayers
 
int state
 
int action
 
SGPoint minIC
 
vector< SGTuplepoints
 
vector< SGTuplebndryDirs
 
vector< vector< int > > tuples
 
bool isNull
 
bool corner
 

Friends

class boost::serialization::access
 

Detailed Description

Describes an action in the game.

Stores IC region information for a single action. Stores the action, minimum incentive compatible payoffs, points of intersection between the IC region and the expected feasible set, and indices of the tuples that generate the points of intersection.

Constructor & Destructor Documentation

◆ SGBaseAction() [1/3]

SGBaseAction::SGBaseAction ( )
inline

Constructor.

Constructs a null action associated with the given SGEnv.

◆ SGBaseAction() [2/3]

SGBaseAction::SGBaseAction ( int  _state,
int  _action 
)
inline

Constructor.

Grandfather in two-player code.

◆ SGBaseAction() [3/3]

SGBaseAction::SGBaseAction ( int  _numPlayers,
int  _state,
int  _action 
)
inline

Constructor.

Constructs an action for the given state and action index in the given environment.

Member Function Documentation

◆ setCorner()

void SGBaseAction::setCorner ( bool  tf)
inline

Sets the corner indicator.

< Sets the indicator for whether there is a point at which both players constraints bind, when there are two players.

Member Data Documentation

◆ action

int SGBaseAction::action
protected

The index of the action profile.

◆ bndryDirs

vector<SGTuple> SGBaseAction::bndryDirs
protected

Stores the slope of the frontier at the extreme payoffs.

◆ corner

bool SGBaseAction::corner
protected

Flag that indicates that the minimum IC continuation value is feasible.

◆ isNull

bool SGBaseAction::isNull
protected

Flag to indicate that this is the place holder "null" action.

◆ minIC

SGPoint SGBaseAction::minIC
protected

The minimum continuation value to support incentive compatibility, relative to the current threat tuple. In particular, this is the maximum over all deviations of the expected threat point under the deviation, plus (1-delta)/delta times the static gains from deviating.

◆ numPlayers

int SGBaseAction::numPlayers
protected

Should be two or three in all current implementations.

◆ points

vector< SGTuple > SGBaseAction::points
protected

Extreme points of the set of expected feasible continuation values at which some player's incentive constraint binds. points[i] is an SGTuple consisting of either 0 or 2 SGPoint objects, which are the extreme binding payoffs on player i's incentive constraint. The convention is that the first element of the tuple is the northern or easternmost of the two binding payoffs.

◆ state

int SGBaseAction::state
protected

The state in which this action profile can be played.

◆ tuples

vector< vector< int > > SGBaseAction::tuples
protected

The vector tuples[i][j] points to the element of SGApproximation::extremeTuples whose expectation is just clockwise relative to points[i][j].


The documentation for this class was generated from the following files: