MultiAgentDecisionProcess
|
SimulationTOIDecPOMDPDiscrete simulates policies in TOIDecPOMDPDiscrete's. More...
#include <SimulationTOIDecPOMDPDiscrete.h>
Public Member Functions | |
template<class A > | |
SimulationResult | RunSimulations (const std::vector< A * > &agents) const |
Run simulations using a vector of SimulationAgent. More... | |
SimulationTOIDecPOMDPDiscrete (const PlanningUnitTOIDecPOMDPDiscrete &pu, int nrRuns, int seed=illegalRandomSeed) | |
Constructor specifying the number of runs and the random seed. More... | |
SimulationTOIDecPOMDPDiscrete (const PlanningUnitTOIDecPOMDPDiscrete &pu, const ArgumentHandlers::Arguments &args) | |
Constructor which parses the command-line arguments. More... | |
~SimulationTOIDecPOMDPDiscrete () | |
Destructor. More... | |
Public Member Functions inherited from SimulationDecPOMDPDiscrete | |
SimulationResult | RunSimulations (const JointPolicyDiscrete *jp) const |
Run simulations using a particular discrete joint policy. More... | |
SimulationResult | RunSimulations (const boost::shared_ptr< JointPolicyDiscrete > &jp) const |
Run simulations using a particular discrete joint policy. More... | |
template<class A > | |
SimulationResult | RunSimulations (const std::vector< A * > &agents) const |
Run simulations using a vector of SimulationAgent. More... | |
void | SaveIntermediateResults (std::string filename) |
Indicate that intermediate should be stored to file named filename. More... | |
SimulationDecPOMDPDiscrete (const PlanningUnitDecPOMDPDiscrete &pu, int nrRuns, int seed=illegalRandomSeed, bool verbose=false) | |
Constructor specifying the number of runs and the random seed. More... | |
SimulationDecPOMDPDiscrete (const PlanningUnitDecPOMDPDiscrete &pu, const ArgumentHandlers::Arguments &args) | |
Constructor which parses the command-line arguments. More... | |
~SimulationDecPOMDPDiscrete () | |
Destructor. More... | |
Public Member Functions inherited from Simulation | |
int | GetNrRuns () const |
int | GetRandomSeed () const |
bool | GetVerbose () const |
void | SetRandomSeed (int s) |
void | SetVerbose (bool verbose) |
Simulation (int nrRuns, int seed=illegalRandomSeed) | |
Constructor that specifies the number of runs and the random seed. More... | |
virtual | ~Simulation () |
Destructor. More... | |
Private Member Functions | |
Index | GetAction (const std::vector< AgentTOIFullyObservableSynced * > &agents, Index i, const std::vector< Index > &aIs, const std::vector< Index > &oIs, double r, const std::vector< Index > &prevoIs, const std::vector< Index > &sIs, const std::vector< Index > &prevaIs, double &specialR) const |
Index | GetAction (const std::vector< AgentTOIFullyObservableSyncedSpecialReward * > &agents, Index i, const std::vector< Index > &aIs, const std::vector< Index > &oIs, double r, const std::vector< Index > &prevoIs, const std::vector< Index > &sIs, const std::vector< Index > &prevaIs, double &specialR) const |
void | Initialize () |
void | PreActHook (const std::vector< AgentTOIFullyObservableSynced * > &agents, const std::vector< Index > &aIs, const std::vector< Index > &oIs, double r, const std::vector< Index > &prevoIs, const std::vector< Index > &sIs, const std::vector< Index > &prevaIs, Index ts) const |
void | PreActHook (const std::vector< AgentTOIFullyObservableSyncedSpecialReward * > &agents, const std::vector< Index > &aIs, const std::vector< Index > &oIs, double r, const std::vector< Index > &prevoIs, const std::vector< Index > &sIs, const std::vector< Index > &prevaIs, Index ts) const |
void | Step (const std::vector< Index > &aIs, unsigned int t, std::vector< Index > &sIs, std::vector< Index > &oIs, double &r, double &sumR, double specialR) const |
Perform one step of the simulation. More... | |
Private Attributes | |
const PlanningUnitTOIDecPOMDPDiscrete * | _m_puTOI |
Pointer to the planning unit that generated the policy. More... | |
Additional Inherited Members | |
Protected Attributes inherited from SimulationDecPOMDPDiscrete | |
size_t | _m_horizon |
std::string | _m_intermediateResultsFilename |
bool | _m_saveIntermediateResults |
Static Protected Attributes inherited from Simulation | |
static const int | illegalRandomSeed =INT_MAX |
SimulationTOIDecPOMDPDiscrete simulates policies in TOIDecPOMDPDiscrete's.
SimulationTOIDecPOMDPDiscrete::SimulationTOIDecPOMDPDiscrete | ( | const PlanningUnitTOIDecPOMDPDiscrete & | pu, |
int | nrRuns, | ||
int | seed = illegalRandomSeed |
||
) |
Constructor specifying the number of runs and the random seed.
SimulationTOIDecPOMDPDiscrete::SimulationTOIDecPOMDPDiscrete | ( | const PlanningUnitTOIDecPOMDPDiscrete & | pu, |
const ArgumentHandlers::Arguments & | args | ||
) |
Constructor which parses the command-line arguments.
SimulationTOIDecPOMDPDiscrete::~SimulationTOIDecPOMDPDiscrete | ( | ) |
Destructor.
|
private |
Referenced by RunSimulations().
|
private |
|
private |
|
private |
Referenced by RunSimulations().
|
private |
|
inline |
Run simulations using a vector of SimulationAgent.
References SimulationDecPOMDPDiscrete::_m_horizon, SimulationDecPOMDPDiscrete::_m_intermediateResultsFilename, SimulationDecPOMDPDiscrete::_m_saveIntermediateResults, SimulationResult::AddReward(), GetAction(), SimulationResult::GetAvgReward(), Simulation::GetNrRuns(), Simulation::GetRandomSeed(), PlanningUnitTOIDecPOMDPDiscrete::GetReferred(), TransitionObservationIndependentMADPDiscrete::GetState(), Simulation::GetVerbose(), PreActHook(), TransitionObservationIndependentMADPDiscrete::SampleInitialStates(), SimulationResult::Save(), PrintTools::SoftPrintVector(), and Step().
|
private |
Perform one step of the simulation.
References _m_puTOI, PlanningUnitDecPOMDPDiscrete::GetDiscount(), PlanningUnitMADPDiscrete::GetJointAction(), PlanningUnitMADPDiscrete::GetJointObservation(), PlanningUnitTOIDecPOMDPDiscrete::GetReferred(), TOIDecPOMDPDiscrete::GetReward(), TransitionObservationIndependentMADPDiscrete::GetState(), Simulation::GetVerbose(), PlanningUnitMADPDiscrete::IndividualToJointActionIndices(), PlanningUnitMADPDiscrete::IndividualToJointObservationIndices(), TransitionObservationIndependentMADPDiscrete::SampleJointObservation(), NamedDescribedEntity::SoftPrintBrief(), and PrintTools::SoftPrintVector().
Referenced by RunSimulations().
|
private |
Pointer to the planning unit that generated the policy.
Referenced by Step().