24#ifndef BCEABSTRACTGAME_HPP
25#define BCEABSTRACTGAME_HPP
28#include "bcecommon.hpp"
29#include "bceexception.hpp"
30#include <boost/archive/text_iarchive.hpp>
31#include <boost/archive/text_oarchive.hpp>
32#include <boost/serialization/vector.hpp>
94 int numObjectivesArg);
99 const vector<int> & numActionsArg,
100 const vector<int> & numTypesArg,
101 int numObjectivesArg);
116 virtual double prior(
int state,
const vector<int> &types)
const = 0;
119 double prior(
const vector<int> & states,
const vector<int> &types)
const
135 double prior(
int state,
int type,
int player)
const;
143 virtual double objective(
int state,
const vector<int> &actions,
148 const vector<int> &actions,
164 virtual bool dominated(
int action,
int type,
int player)
const
171 bool dominated(
const vector<int> &actions,
const vector<int> &types)
const;
179 int type,
int player)
const
192 if (_numPrivateStates[0] == 0
193 && _numPrivateStates[1] == 0)
200 int player, product=1;
202 product*=_numPrivateStates[player];
The base class for games of incomplete information.
Definition: bceabstractgame.hpp:52
int numObjectives
The number of objective functions. Must be >= 2.
Definition: bceabstractgame.hpp:69
bool hasProductStructure() const
Returns whether or not the state has a product structure.
Definition: bceabstractgame.hpp:239
virtual bool feasibleDeviation(int action, int dev, int type, int player) const
Check if deviation is feasible.
Definition: bceabstractgame.hpp:178
virtual bool dominated(int action, int type, int player) const
Indicates if a combination of actions and types is dominated.
Definition: bceabstractgame.hpp:164
bool setNumPrivateStates(const vector< int > &_numPrivateStates)
Definition: bceabstractgame.hpp:187
double objective(const vector< int > &states, const vector< int > &actions, int obj) const
Overloaded objective if the game has a product structure.
Definition: bceabstractgame.hpp:147
int getNumObjectives() const
Returns the number of objectives.
Definition: bceabstractgame.hpp:245
const vector< int > & getNumPrivateStates() const
Returns the numbers of private states.
Definition: bceabstractgame.hpp:242
vector< int > numTypes
The number of private types for each player.
Definition: bceabstractgame.hpp:67
int numStates
The number of payoff relevant states.
Definition: bceabstractgame.hpp:65
virtual double objective(int state, const vector< int > &actions, int obj) const =0
Objective function.
vector< int > numActions
The number of action profiles for each player.
Definition: bceabstractgame.hpp:63
string getObjLabels(int obj)
Gets an entry from objective label vector.
Definition: bceabstractgame.hpp:213
int numPlayers
The number of players, always 2.
Definition: bceabstractgame.hpp:61
vector< string > & getObjLabels()
Gets all of the objective labels.
Definition: bceabstractgame.hpp:218
const vector< int > & getNumActions() const
Returns a vector of the numbers of actions.
Definition: bceabstractgame.hpp:249
const vector< int > & getNumTypes() const
Returns a vector of the numbers of types.
Definition: bceabstractgame.hpp:251
double prior(const vector< int > &states, const vector< int > &types) const
Overloaded prior if the game has a product structure.
Definition: bceabstractgame.hpp:119
void findLabelRedundancies(int obj)
Finds if a specific label matches any existing labels.
Definition: bceabstractgame.cpp:178
bool hasProductStructureData
Indicates if the state has a product structure.
Definition: bceabstractgame.hpp:74
int getNumPlayers() const
Returns the number of players (always 2)
Definition: bceabstractgame.hpp:253
void setHasProductStructureData(bool hasProductStructure)
Allows user to specify if the game has a product structure.
Definition: bceabstractgame.hpp:108
void setObjLabel(int obj, string label)
Sets a label in the objectiveLabels vector.
Definition: bceabstractgame.hpp:223
vector< int > numPrivateStates
Number of states for each player.
Definition: bceabstractgame.hpp:80
vector< string > objectiveLabels
Labels for the objectives.
Definition: bceabstractgame.hpp:82
void nameEmptyLabels()
Names objectives according to defaults if given label is empty.
Definition: bceabstractgame.cpp:150
~BCEAbstractGame()
Destructor.
Definition: bceabstractgame.hpp:104
int getNumStates() const
Returns the number of states.
Definition: bceabstractgame.hpp:247
virtual double prior(int state, const vector< int > &types) const =0
Prior over state and types.
BCEAbstractGame()
Default constructor.
Definition: bceabstractgame.cpp:25
Exception class for BCESolve.
Definition: bceexception.hpp:33
@ BadArgument
Definition: bceexception.hpp:51