MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
TOIDecMDPDiscrete.cpp
Go to the documentation of this file.
1
28
#include "
TOIDecMDPDiscrete.h
"
29
30
using namespace
std;
31
32
//Default constructor
33
TOIDecMDPDiscrete::TOIDecMDPDiscrete
(
34
string
name,
string
descr,
string
pf) :
35
TOIDecPOMDPDiscrete
(name, descr, pf)
36
{
37
_m_initialized
=
false
;
38
}
39
40
//Destructor
41
TOIDecMDPDiscrete::~TOIDecMDPDiscrete
()
42
{
43
}
44
45
bool
TOIDecMDPDiscrete::SetInitialized
(
bool
b)
46
{
47
if
(
TOIDecPOMDPDiscrete::SetInitialized
(
true
) )
48
{
49
if
( b ==
true
)
50
{
51
//\todo TODO: check that the Dec-MDP is indeed locally observable
52
}
53
_m_initialized
= b;
54
return
(
true
);
55
}
56
else
57
return
(
false
);
58
}
59
60
void
TOIDecMDPDiscrete::CreateStateObservations
()
61
{
62
for
(
Index
agI=0; agI <
GetNrAgents
(); agI++)
63
{
64
size_t
nrStatesAgent =
GetNrStates
(agI);
65
size_t
nrActionsAgent =
GetNrActions
(agI);
66
SetNrObservations
(agI, nrStatesAgent);
67
MultiAgentDecisionProcessDiscrete
* ind_madp =
GetIndividualMADPD
(agI);
68
ind_madp->
CreateNewObservationModel
();
69
70
for
(
Index
sI=0; sI < nrStatesAgent; sI++)
71
for
(
Index
aI=0; aI < nrActionsAgent; aI++)
72
ind_madp->
SetObservationProbability
(aI, sI, sI, 1.0);
73
}
74
}
src
base
TOIDecMDPDiscrete.cpp
Generated on Mon Sep 23 2013 14:50:05 for MultiAgentDecisionProcess by
1.8.1.2