Loading [MathJax]/extensions/tex2jax.js
AIToolbox
A library that offers tools for AI problem solving.
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
d
e
h
i
l
n
q
Typedefs
a
b
c
d
f
h
m
p
q
r
s
t
u
v
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
i
k
m
n
o
p
q
r
s
t
v
w
Typedefs
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
v
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
Functions
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
EpsilonPolicy.hpp
Go to the documentation of this file.
1
#ifndef AI_TOOLBOX_MDP_EPSILON_POLICY_HEADER_FILE
2
#define AI_TOOLBOX_MDP_EPSILON_POLICY_HEADER_FILE
3
4
#include <
AIToolbox/MDP/Policies/PolicyInterface.hpp
>
5
#include <
AIToolbox/EpsilonPolicyInterface.hpp
>
6
7
namespace
AIToolbox::MDP
{
8
class
EpsilonPolicy
:
public
PolicyInterface
,
public
EpsilonPolicyInterface
<size_t, size_t, size_t> {
9
public
:
10
using
EpsilonBase
=
EpsilonPolicyInterface<size_t, size_t, size_t>
;
11
24
EpsilonPolicy
(
const
PolicyInterface
& p,
double
epsilon = 0.1);
25
37
virtual
Matrix2D
getPolicy
()
const override
;
38
39
protected
:
45
virtual
size_t
sampleRandomAction
()
const override
;
46
52
virtual
double
getRandomActionProbability
()
const override
;
53
54
// Used to sampled random actions
55
mutable
std::uniform_int_distribution<size_t>
randomDistribution_
;
56
};
57
}
58
59
#endif
PolicyInterface.hpp
AIToolbox::Matrix2D
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor|Eigen::AutoAlign > Matrix2D
Definition:
Types.hpp:18
AIToolbox::MDP::EpsilonPolicy
Definition:
EpsilonPolicy.hpp:8
AIToolbox::MDP
Definition:
DoubleQLearning.hpp:10
AIToolbox::MDP::EpsilonPolicy::EpsilonPolicy
EpsilonPolicy(const PolicyInterface &p, double epsilon=0.1)
Basic constructor.
AIToolbox::MDP::EpsilonPolicy::getPolicy
virtual Matrix2D getPolicy() const override
This function returns a matrix containing all probabilities of the policy.
AIToolbox::EpsilonPolicyInterface
This class is a policy wrapper for epsilon action choice.
Definition:
EpsilonPolicyInterface.hpp:29
AIToolbox::MDP::EpsilonPolicy::getRandomActionProbability
virtual double getRandomActionProbability() const override
This function returns the probability of picking a random action.
AIToolbox::MDP::EpsilonPolicy::randomDistribution_
std::uniform_int_distribution< size_t > randomDistribution_
Definition:
EpsilonPolicy.hpp:55
AIToolbox::MDP::PolicyInterface
Simple typedef for most of MDP's policy needs.
Definition:
PolicyInterface.hpp:11
AIToolbox::MDP::EpsilonPolicy::sampleRandomAction
virtual size_t sampleRandomAction() const override
This function returns a random action in the Action space.
EpsilonPolicyInterface.hpp