MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
ProblemFireFighting.h
Go to the documentation of this file.
1
28
/* Only include this header file once. */
29
#ifndef _PROBLEMFIREFIGHTING_H_
30
#define _PROBLEMFIREFIGHTING_H_ 1
31
32
/* the include directives */
33
#include "
Globals.h
"
34
#include "
DecPOMDPDiscrete.h
"
35
#include "
IndexTools.h
"
36
40
class
ProblemFireFighting
:
public
DecPOMDPDiscrete
41
{
42
private
:
43
enum
observation_t
{
FLAMES
,
NOFLAMES
};
44
size_t
_m_nrAgents
;
45
size_t
_m_nrHouses
;
46
size_t
_m_nrFireLevels
;
47
bool
_m_includePositions
;
48
49
size_t
_m_nrStateFeatures
;
50
//vector that stores the number of values per state feature.
51
std::vector<size_t>
_m_nrPerStateFeatureVec
;
52
53
size_t
_m_nrJointFirelevels
;
54
//vector that stores the number of values per state feature.
55
std::vector<size_t>
_m_nrFLs_vec
;
56
58
void
ConstructActions
();
60
void
ConstructObservations
();
62
void
FillTransitionModel
();
64
void
FillObservationModel
();
66
void
FillRewardModel
();
67
68
size_t
NumberOfContainedStartPositions
(
const
69
std::vector<Index>& state)
const
;
70
protected
:
71
static
std::string
SoftPrintBriefDescription
(
72
size_t
nrAgents,
size_t
nrHouses,
size_t
nrFLs);
73
static
std::string
SoftPrintDescription
(
size_t
nrAgents,
74
size_t
nrHouses,
size_t
nrFLs);
75
std::vector< Index>
GetStateVector
(
Index
sI)
const
76
{
77
return
IndexTools::JointToIndividualIndices
78
(sI,
_m_nrPerStateFeatureVec
);
79
}
80
double
ComputeTransitionProb
(
81
const
std::vector< Index>& s1,
82
const
std::vector< Index>& ja,
83
const
std::vector< Index>& s2
84
)
const
;
85
double
ComputeObservationProb
(
86
const
std::vector< Index>& ja,
87
const
std::vector< Index>& s1,
88
const
std::vector< Index>& jo
89
)
const
;
90
double
ComputeReward
(
Index
sI)
const
;
91
//is a neighbor of house hI burning?
92
static
bool
isNeighborBurning
(
const
std::vector< Index>& s1,
93
Index
hI) ;
94
95
96
public
:
97
// Constructor, destructor and copy assignment.
99
ProblemFireFighting
(
size_t
nrAgents,
size_t
nrHouses,
size_t
nrFLs,
100
double
costOfMove=0.0,
bool
forcePositionRepres =
false
);
101
};
102
103
104
#endif
/* !_PROBLEMFIREFIGHTING_H_ */
105
106
// Local Variables: ***
107
// mode:c++ ***
108
// End: ***
src
support
ProblemFireFighting.h
Generated on Mon Sep 23 2013 14:50:06 for MultiAgentDecisionProcess by
1.8.1.2