MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
AgentRandom.cpp
Go to the documentation of this file.
1
28
#include "
AgentRandom.h
"
29
#include <float.h>
30
#include "
PlanningUnitDecPOMDPDiscrete.h
"
31
32
using namespace
std;
33
34
#define DEBUG_AgentRandom 0
35
36
AgentRandom::AgentRandom
(
const
PlanningUnitDecPOMDPDiscrete
&pu,
Index
id
) :
37
AgentDecPOMDPDiscrete
(pu,id)
38
{
39
}
40
41
AgentRandom::AgentRandom
(
const
AgentRandom
& a) :
42
AgentDecPOMDPDiscrete
(a)
43
{
44
}
45
46
//Destructor
47
AgentRandom::~AgentRandom
()
48
{
49
}
50
51
Index
AgentRandom::Act
()
52
{
53
vector<size_t> nrAis=
GetPU
()->
GetNrActions
();
54
Index
aI=
static_cast<
Index
>
(nrAis[
GetIndex
()]*
55
(rand() / (RAND_MAX + 1.0)));
56
return
(aI);
57
}
58
59
void
AgentRandom::ResetEpisode
()
60
{
61
}
src
planning
AgentRandom.cpp
Generated on Mon Sep 23 2013 14:50:05 for MultiAgentDecisionProcess by
1.8.1.2