MultiAgentDecisionProcess
|
AlphaVector represent an alpha vector used in POMDP solving. More...
#include <AlphaVector.h>
Public Types | |
typedef long long int | BGPolicyIndex |
Public Member Functions | |
AlphaVector | Add (const AlphaVector &B) const |
Add B to this and return as a new vector. More... | |
AlphaVector () | |
Default constructor. More... | |
AlphaVector (size_t nrS) | |
Constructor that reserves memory for nrS values. More... | |
AlphaVector (size_t nrS, double val) | |
Constructor that reserves memory for nrS values, and sets every value to val. More... | |
bool | Equal (const AlphaVector &alpha) const |
Compare whether this alpha vector is equal to alpha. More... | |
bool | EqualValues (const AlphaVector &alpha) const |
Compare whether this alpha vector's values are equal to those of alpha. More... | |
Index | GetAction () const |
Get the action index of this alpha vector. More... | |
BGPolicyIndex | GetBetaI () const |
Get the Bayesian-Game-policy index of this alpha vector. More... | |
unsigned int | GetNrValues () const |
Get the number of values represented by this alpha vector (state space size). More... | |
double | GetValue (Index i) const |
Get the value for a particular state index i. More... | |
const std::vector< double > & | GetValues () const |
Get a reference to the values this alpha vector contains. More... | |
void | IAdd (const AlphaVector &B) |
Add B to this (in place Add) More... | |
AlphaVector & | operator= (const AlphaVector &o) |
Copy assignment operator. More... | |
void | Print () const |
Print out a textual representation of this alpha vector. More... | |
void | SetAction (Index a) |
Set the action index this alpha vector represents to a. More... | |
void | SetBetaI (BGPolicyIndex betaI) |
Set the Bayesian-Game-policy index to betaI. More... | |
void | SetValue (double v, Index i) |
Set the value for state i to value v. More... | |
void | SetValues (const std::vector< double > &vs) |
Set the values over the state-space this alpha vector represents to vs. More... | |
std::string | SoftPrint () const |
Get a textual representation of this alpha vector. More... | |
~AlphaVector () | |
Destructor. More... | |
Private Attributes | |
Index | _m_action |
BGPolicyIndex | _m_betaI |
std::vector< double > | _m_values |
Friends | |
std::ostream & | operator<< (std::ostream &o, const AlphaVector &v) |
AlphaVector represent an alpha vector used in POMDP solving.
It's basically a vector of values and an action index.
typedef long long int AlphaVector::BGPolicyIndex |
AlphaVector::AlphaVector | ( | ) |
Default constructor.
AlphaVector::AlphaVector | ( | size_t | nrS | ) |
Constructor that reserves memory for nrS values.
AlphaVector::AlphaVector | ( | size_t | nrS, |
double | val | ||
) |
Constructor that reserves memory for nrS values, and sets every value to val.
AlphaVector::~AlphaVector | ( | ) |
Destructor.
AlphaVector AlphaVector::Add | ( | const AlphaVector & | B | ) | const |
Add B to this and return as a new vector.
References IAdd().
bool AlphaVector::Equal | ( | const AlphaVector & | alpha | ) | const |
Compare whether this alpha vector is equal to alpha.
References GetAction(), and GetBetaI().
Referenced by AlphaVectorBG::BeliefBackup(), AlphaVectorPruning::Contains(), and AlphaVectorPruning::RemoveFirstOccurrence().
bool AlphaVector::EqualValues | ( | const AlphaVector & | alpha | ) | const |
Compare whether this alpha vector's values are equal to those of alpha.
References GetNrValues(), and GetValues().
|
inline |
Get the action index of this alpha vector.
Referenced by QBGPlanner_TreeIncPruneBnB::BackupStage(), Equal(), and AlphaVectorPlanning::VectorIsInValueFunction().
|
inline |
Get the Bayesian-Game-policy index of this alpha vector.
Referenced by AlphaVectorWeighted::BeliefBackup(), Equal(), and AlphaVectorPlanning::ImportValueFunction().
|
inline |
Get the number of values represented by this alpha vector (state space size).
Referenced by AlphaVectorWeighted::BeliefBackup(), EqualValues(), AlphaVectorPruning::FindBeliefAccelerated(), AlphaVectorPruning::FindBeliefNormal(), AlphaVectorPruning::GetNormalObj(), AlphaVectorPruning::GetVectorIndex(), IAdd(), AlphaVectorPruning::InnerProduct(), AlphaVectorPruning::LexGreater(), AlphaVectorPruning::ParetoDominates(), AlphaVectorPlanning::VectorIsDominated(), and AlphaVectorPlanning::VectorIsInValueFunction().
|
inline |
Get the value for a particular state index i.
Referenced by AlphaVectorWeighted::BeliefBackup(), QBGPlanner_TreeIncPruneBnB::CheckDominationPointWise(), AlphaVectorPruning::FindBeliefAccelerated(), AlphaVectorPruning::FindBeliefNormal(), AlphaVectorPruning::GetNormalObj(), AlphaVectorPruning::GetVectorIndex(), AlphaVectorPruning::InnerProduct(), AlphaVectorPruning::LexGreater(), AlphaVectorPruning::ParetoDominates(), AlphaVectorPlanning::VectorIsDominated(), and AlphaVectorPlanning::VectorIsInValueFunction().
|
inline |
Get a reference to the values this alpha vector contains.
Referenced by PerseusPOMDPPlanner::BackupStage(), PerseusConstrainedPOMDPPlanner::BackupStage(), PerseusBGNSPlanner::BackupStageSampling(), EqualValues(), AlphaVectorPruning::FindBeliefNormal(), BeliefValue::GetValue(), and AlphaVectorPruning::Prune().
void AlphaVector::IAdd | ( | const AlphaVector & | B | ) |
Add B to this (in place Add)
Add B to this and return as a new vector.
References _m_values, and GetNrValues().
Referenced by Add().
AlphaVector & AlphaVector::operator= | ( | const AlphaVector & | o | ) |
|
inline |
Print out a textual representation of this alpha vector.
References SoftPrint().
Referenced by PerseusPOMDPPlanner::BackupStage().
|
inline |
Set the action index this alpha vector represents to a.
Referenced by PerseusConstrainedPOMDPPlanner::BackupStage(), QBGPlanner_TreeIncPruneBnB::BackupStage(), AlphaVectorPOMDP::BeliefBackup(), AlphaVectorConstrainedPOMDP::BeliefBackup(), AlphaVectorBG::BeliefBackupBGIP_Solver(), AlphaVectorBG::BeliefBackupExhaustiveOnlyKeepMax(), AlphaVectorBG::BeliefBackupExhaustiveStoreAll(), AlphaVectorPlanning::GetImmediateRewardValueFunction(), Perseus::GetInitialQFunctions(), Perseus::GetInitialValueFunction(), BeliefValue::GetMaximizingVector(), AlphaVectorPlanning::ImportValueFunction(), QAlphaVector::Initialize(), MonahanPOMDPPlanner::MonahanCrossSum(), MonahanBGPlanner::MonahanCrossSum(), AlphaVectorPlanning::ValueFunctionToQ(), and AlphaVectorPlanning::VectorSetToValueFunction().
|
inline |
Set the Bayesian-Game-policy index to betaI.
Referenced by AlphaVectorBG::BeliefBackupBGIP_Solver(), AlphaVectorBG::BeliefBackupExhaustiveOnlyKeepMax(), AlphaVectorBG::BeliefBackupExhaustiveStoreAll(), AlphaVectorPlanning::ImportValueFunction(), and MonahanBGPlanner::MonahanCrossSum().
|
inline |
Set the value for state i to value v.
Referenced by PerseusConstrainedPOMDPPlanner::BackupStage(), AlphaVectorPOMDP::BeliefBackup(), AlphaVectorConstrainedPOMDP::BeliefBackup(), AlphaVectorBG::BeliefBackupBGIP_Solver(), AlphaVectorBG::BeliefBackupExhaustiveOnlyKeepMax(), AlphaVectorBG::BeliefBackupExhaustiveStoreAll(), AlphaVectorPlanning::GetImmediateRewardValueFunction(), Perseus::GetInitialQFunctions(), Perseus::GetInitialValueFunction(), QAlphaVector::Initialize(), MonahanPOMDPPlanner::MonahanCrossSum(), and MonahanBGPlanner::MonahanCrossSum().
void AlphaVector::SetValues | ( | const std::vector< double > & | vs | ) |
Set the values over the state-space this alpha vector represents to vs.
Referenced by QBGPlanner_TreeIncPruneBnB::BackupStage(), AlphaVectorWeighted::BeliefBackup(), and AlphaVectorPlanning::ImportValueFunction().
string AlphaVector::SoftPrint | ( | void | ) | const |
Get a textual representation of this alpha vector.
Referenced by QAlphaVector::Initialize(), operator<<(), and Print().
|
friend |
|
private |
Referenced by operator=().
|
private |
Referenced by operator=().
|
private |
Referenced by IAdd(), and operator=().