22 #ifndef _SGSOLVER_MAXMINMAX_HPP
23 #define _SGSOLVER_MAXMINMAX_HPP
25 #include "sgcommon.hpp"
29 #include "sgaction_maxminmax.hpp"
30 #include "sgexception.hpp"
31 #include "sgsolution_maxminmax.hpp"
65 const vector< vector<SGPoint> > &
payoffs;
73 vector< list<SGAction_MaxMinMax> >
actions;
116 const list<vector<double> > & newLevels)
const;
121 std::string progressString()
const;
125 vector<double> & penalties,
126 vector<SGActionIter> & actionTuple,
127 vector<SG::Regime> & regimeTuple,
128 vector<bool> & bestAPSNotBinding,
131 const vector<list<SGAction_MaxMinMax> > &
actions)
const;
136 const vector<double> & penalties,
137 const vector<SGActionIter> & actionTuple,
138 const vector<SG::Regime> & regimeTuple,
140 const vector<list<SGAction_MaxMinMax> > &
actions)
const;
144 const vector<SGActionIter> & actionTuple,
145 const vector<SG::Regime> & regimeTuple)
const;
150 const vector<SGActionIter> & actionTuple,
151 const vector<SG::Regime> & regimeTuple)
const;
158 const double aPenalty,
160 const double bPenalty,
165 int & bestBindingPlayer,
166 int & bestBindingPoint,
171 const vector<SG::Regime> & regimeTuple,
174 vector<bool> & bestAPSNotBinding)
const;
178 vector<double> & penalties,
179 const vector<SGActionIter> & actionTuple,
180 vector<SG::Regime> & regimeTuple,
182 const SGTuple & bestBindingPayoffs,
183 const vector<bool> & bestAPSNotBinding)
const;
const SGSolution_MaxMinMax & getSolution() const
Definition: sgsolver_maxminmax.hpp:191
bool computeBestBindingPayoff(const SGActionIter ait, int &bestBindingPlayer, int &bestBindingPoint, const SGPoint &dir) const
Computes the best binding payoff for an action.
Definition: sgsolver_maxminmax.cpp:749
SGTuple threatTuple
Definition: sgsolver_maxminmax.hpp:72
double pseudoHausdorff(const list< SGPoint > &newDirections, const list< vector< double > > &newLevels) const
Compute approximate Hausdorff distance.
Definition: sgsolver_maxminmax.cpp:435
void updateBestBinding(const vector< SGActionIter > &actionTuple, const vector< SG::Regime > ®imeTuple, const SGPoint &dir, SGTuple &bestBindingPayoffs, vector< bool > &bestAPSNotBinding) const
Update best binding payoffs and check if best APS is binding.
Definition: sgsolver_maxminmax.cpp:698
Describes a stochastic game.
Definition: sggame.hpp:40
const SGPoint dueEast
Definition: sgsolver_maxminmax.hpp:75
list< vector< double > > levels
Definition: sgsolver_maxminmax.hpp:71
bool lexAbove(const SGPoint &a, const SGPoint &b) const
Lexicographic comparison of directions.
Definition: sgsolver_maxminmax.cpp:736
const int numStates
Definition: sgsolver_maxminmax.hpp:58
const vector< vector< int > > numActions
Definition: sgsolver_maxminmax.hpp:67
SGSolution_MaxMinMax soln
SGSolution object used by SGApprox to store data.
Definition: sgsolver_maxminmax.hpp:52
double iterate()
One iteration of the endogenous algorith.
Definition: sgsolver_maxminmax.cpp:270
const vector< vector< vector< double > > > & probabilities
Definition: sgsolver_maxminmax.hpp:66
void solve_fixed()
Solve routine.
Definition: sgsolver_maxminmax.cpp:41
list< SGPoint > directions
Definition: sgsolver_maxminmax.hpp:70
void robustOptimizePolicy(SGTuple &pivot, vector< double > &penalties, vector< SGActionIter > &actionTuple, vector< SG::Regime > ®imeTuple, vector< bool > &bestAPSNotBinding, SGTuple &bestBindingPayoffs, const SGPoint currDir, const vector< list< SGAction_MaxMinMax > > &actions) const
Optimizes the policy for the given direction.
Definition: sgsolver_maxminmax.cpp:541
SGSolver_MaxMinMax()
Default constructor.
bool lexComp(const SGPoint &a, const double aPenalty, const SGPoint &b, const double bPenalty, const SGPoint &dir) const
Lexicographic comparison of points.
Definition: sgsolver_maxminmax.cpp:718
Class for solving stochastic games.
Definition: sgsolver_maxminmax.hpp:43
vector< list< SGAction_MaxMinMax > > actions
Definition: sgsolver_maxminmax.hpp:73
void policyToPenalties(vector< double > &penalties, const vector< SGActionIter > &actionTuple, const vector< SG::Regime > ®imeTuple) const
Definition: sgsolver_maxminmax.cpp:1008
Records the progress of SGSolver_MaxMinMax::solve().
Definition: sgsolution_maxminmax.hpp:40
Manages parameters for algorithm behavior.
Definition: sgenv.hpp:35
const vector< vector< SGPoint > > & payoffs
Definition: sgsolver_maxminmax.hpp:65
A vector in .
Definition: sgpoint.hpp:35
int numIter
Definition: sgsolver_maxminmax.hpp:78
~SGSolver_MaxMinMax()
Destructor.
Definition: sgsolver_maxminmax.hpp:92
const vector< int > numActions_totalByState
Definition: sgsolver_maxminmax.hpp:68
const SGPoint dueNorth
Definition: sgsolver_maxminmax.hpp:76
const vector< vector< bool > > & eqActions
Definition: sgsolver_maxminmax.hpp:61
void minimizeRegimes(SGTuple &pivot, vector< double > &penalties, const vector< SGActionIter > &actionTuple, vector< SG::Regime > ®imeTuple, const SGPoint &dir, const SGTuple &bestBindingPayoffs, const vector< bool > &bestAPSNotBinding) const
Switches regimes from binding to non-binding to minimize levels.
Definition: sgsolver_maxminmax.cpp:780
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.cpp:978
const SGEnv & env
SGEnv object to hold parameters.
Definition: sgsolver_maxminmax.hpp:48
void solve()
Solve routine.
Definition: sgsolver_maxminmax.cpp:231
double sensitivity(const SGTuple &pivot, const vector< double > &penalties, const vector< SGActionIter > &actionTuple, const vector< SG::Regime > ®imeTuple, const SGPoint currDir, const vector< list< SGAction_MaxMinMax > > &actions) const
Definition: sgsolver_maxminmax.cpp:843
const int numPlayers
Definition: sgsolver_maxminmax.hpp:57
void initialize()
Initializes the solve routines.
Definition: sgsolver_maxminmax.cpp:470
double errorLevel
Definition: sgsolver_maxminmax.hpp:79
Definition: sgtuple.hpp:52
const SGGame & game
Constant reference to the game to be solved.
Definition: sgsolver_maxminmax.hpp:50
const double delta
Definition: sgsolver_maxminmax.hpp:55