GEGELATI
Loading...
Searching...
No Matches
tpgExecutionEngine.h
1
38#ifndef TPG_EXECUTION_ENGINE_H
39#define TPG_EXECUTION_ENGINE_H
40
41#include <set>
42#include <vector>
43
44#include "archive.h"
45#include "program/programExecutionEngine.h"
46
47#include "tpg/tpgGraph.h"
48
49namespace TPG {
57 {
58 protected:
63
68
76
77 public:
90
92 virtual ~TPGExecutionEngine() = default;
93
99 void setArchive(Archive* newArchive);
100
107 std::vector<double>& actionsTaken);
108
123 virtual double evaluateEdge(const TPGEdge& edge);
124
140 virtual const TPG::TPGEdge& evaluateTeam(const TPGTeam& team);
141
155 virtual const std::pair<std::vector<const TPG::TPGVertex*>,
156 std::vector<double>>
157 executeFromRoot(const TPGVertex& root,
158 const std::vector<uint64_t>& initActions = {0});
159 };
160}; // namespace TPG
161
162#endif
Definition archive.h:80
The Environment class contains all information needed to execute a Program.
Definition environment.h:86
Class in charge of executing a Program within its Environment.
Definition programExecutionEngine.h:53
Class representing edges of the Tangled Program Graphs.
Definition tpgEdge.h:54
Definition tpgExecutionEngine.h:57
virtual const TPG::TPGEdge & evaluateTeam(const TPGTeam &team)
Evaluate all the Program of the outgoing TPGEdge of the TPGTeam.
Definition tpgExecutionEngine.cpp:108
void applyActivationFunctionOnActions(std::vector< double > &actionsTaken)
Apply a sigmoid function on all the actions.
Definition tpgExecutionEngine.cpp:52
virtual ~TPGExecutionEngine()=default
Default virtual destructor.
const Environment & env
Environment used.
Definition tpgExecutionEngine.h:67
virtual double evaluateEdge(const TPGEdge &edge)
Execute the Program associated to an Edge and returns the obtained double.
Definition tpgExecutionEngine.cpp:84
TPGExecutionEngine(const Environment &env, Archive *arch=NULL)
Main constructor of the class.
Definition tpgExecutionEngine.h:88
Program::ProgramExecutionEngine progExecutionEngine
ProgramExecutionEngine for executing Programs of edges.
Definition tpgExecutionEngine.h:75
Archive * archive
Archive for recording Program results.
Definition tpgExecutionEngine.h:62
virtual const std::pair< std::vector< const TPG::TPGVertex * >, std::vector< double > > executeFromRoot(const TPGVertex &root, const std::vector< uint64_t > &initActions={0})
Execute the TPGGraph starting from the given TPGVertex.
Definition tpgExecutionEngine.cpp:153
void setArchive(Archive *newArchive)
Set a new Archive for storing Program results.
Definition tpgExecutionEngine.cpp:47
Definition tpgTeam.h:49
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
Definition executionStats.h:44