22 #ifndef _SGSOLVER_MAXMINMAX_3PLAYER_HPP
23 #define _SGSOLVER_MAXMINMAX_3PLAYER_HPP
25 #include "sgcommon.hpp"
29 #include "sgaction_maxminmax.hpp"
30 #include "sgexception.hpp"
31 #include "sgsolution_maxminmax.hpp"
32 #include "sgedgepolicy.hpp"
66 const vector< vector<SGPoint> > &
payoffs;
74 list<SGPoint> threatDirections;
76 vector< list<SGAction_MaxMinMax> >
actions;
111 void solve(
const int numDirsApprox = 200,
112 const bool dropRedundant =
true,
113 const bool addEndogenous =
true);
129 double iterate(
const int maxDirections,
130 const bool dropRedundant,
131 const bool addEndogenous);
136 std::string progressString()
const;
140 vector<SGActionIter> & actionTuple,
141 vector<SG::Regime> & regimeTuple,
143 const vector<list<SGAction_MaxMinMax> > &
actions)
const;
151 const vector<list<SGAction_MaxMinMax> > &
actions)
const;
159 const vector<list<SGAction_MaxMinMax> > &
actions)
const;
163 const vector<SGActionIter> & actionTuple,
164 const vector<SG::Regime> & regimeTuple)
const;
const vector< int > numActions_totalByState
Definition: sgsolver_maxminmax_3player.hpp:69
SGTuple threatTuple
Definition: sgsolver_maxminmax_3player.hpp:75
const vector< vector< int > > numActions
Definition: sgsolver_maxminmax_3player.hpp:68
list< SGPoint > directions
Definition: sgsolver_maxminmax_3player.hpp:71
list< vector< double > > levels
Definition: sgsolver_maxminmax_3player.hpp:72
Class for storing product policies.
Definition: sgproductpolicy.hpp:39
const int numStates
Definition: sgsolver_maxminmax_3player.hpp:59
Describes a stochastic game.
Definition: sggame.hpp:40
SGPoint payoffUB
Definition: sgsolver_maxminmax_3player.hpp:85
const SGPoint dueEast
Definition: sgsolver_maxminmax_3player.hpp:78
vector< list< SGAction_MaxMinMax > > actions
Definition: sgsolver_maxminmax_3player.hpp:76
double errorLevel
Definition: sgsolver_maxminmax_3player.hpp:82
double iterate_endogenous()
One iteration of the endogenous algorithm.
Definition: sgsolver_maxminmax_3player.cpp:515
~SGSolver_MaxMinMax_3Player()
Destructor.
Definition: sgsolver_maxminmax_3player.hpp:103
const vector< vector< SGPoint > > & payoffs
Definition: sgsolver_maxminmax_3player.hpp:66
const SGPoint dueNorth
Definition: sgsolver_maxminmax_3player.hpp:79
void optimizePolicy(SGTuple &pivot, vector< SGActionIter > &actionTuple, vector< SG::Regime > ®imeTuple, const SGPoint &currDir, const vector< list< SGAction_MaxMinMax > > &actions) const
Optimizes the policy for the given direction.
Definition: sgsolver_maxminmax_3player.cpp:1010
bool computeOptimalPolicies(SGProductPolicy &optPolicies, const SGTuple &pivot, const SGPoint &currDir, const vector< list< SGAction_MaxMinMax > > &actions) const
Definition: sgsolver_maxminmax_3player.cpp:1204
const int numPlayers
Definition: sgsolver_maxminmax_3player.hpp:58
SGPoint payoffLB
Definition: sgsolver_maxminmax_3player.hpp:84
bool debugMode
Definition: sgsolver_maxminmax_3player.hpp:90
int numEndogDirs
Definition: sgsolver_maxminmax_3player.hpp:88
const SGSolution_MaxMinMax & getSolution() const
Definition: sgsolver_maxminmax_3player.hpp:168
Records the progress of SGSolver_MaxMinMax::solve().
Definition: sgsolution_maxminmax.hpp:40
Manages parameters for algorithm behavior.
Definition: sgenv.hpp:35
int numIter
Definition: sgsolver_maxminmax_3player.hpp:81
const vector< vector< bool > > & eqActions
Definition: sgsolver_maxminmax_3player.hpp:62
Class for solving stochastic games.
Definition: sgsolver_maxminmax_3player.hpp:44
int numRedundDirs
Definition: sgsolver_maxminmax_3player.hpp:87
A vector in .
Definition: sgpoint.hpp:35
void policyToPayoffs(SGTuple &pivot, const vector< SGActionIter > &actionTuple, const vector< SG::Regime > ®imeTuple) const
Converts a policy function to a payoff function using bellman iteration.
Definition: sgsolver_maxminmax_3player.cpp:1459
const SGEnv & env
SGEnv object to hold parameters.
Definition: sgsolver_maxminmax_3player.hpp:49
void solve(const int numDirsApprox=200, const bool dropRedundant=true, const bool addEndogenous=true)
Fixed direction solve routine.
Definition: sgsolver_maxminmax_3player.cpp:44
SGSolution_MaxMinMax soln
SGSolution object used by SGApprox to store data.
Definition: sgsolver_maxminmax_3player.hpp:53
const vector< vector< vector< double > > > & probabilities
Definition: sgsolver_maxminmax_3player.hpp:67
void solve_endogenous()
Endogenous direction solve routine.
Definition: sgsolver_maxminmax_3player.cpp:476
const SGGame & game
Constant reference to the game to be solved.
Definition: sgsolver_maxminmax_3player.hpp:51
double iterate(const int maxDirections, const bool dropRedundant, const bool addEndogenous)
One iteration of the algorithm.
Definition: sgsolver_maxminmax_3player.cpp:120
const double delta
Definition: sgsolver_maxminmax_3player.hpp:56
Definition: sgtuple.hpp:52
void initialize()
Initializes the solve routines.
Definition: sgsolver_maxminmax_3player.cpp:957
SGSolver_MaxMinMax_3Player()
Default constructor.
double sensitivity(SGPoint &optSubDir, const SGTuple &pivot, const SGPoint &currDir, const SGPoint &newDir, const vector< list< SGAction_MaxMinMax > > &actions) const
Definition: sgsolver_maxminmax_3player.cpp:1301
- src
- hpp
- sgsolver_maxminmax_3player.hpp