GEGELATI

Loading...
Searching...
No Matches
adversarialJob.h
1
37#ifndef ADVERSARIAL_JOB_H
38#define ADVERSARIAL_JOB_H
39
40#include <cstddef>
41#include <cstdint>
42#include <vector>
43
44#include "learn/job.h"
45
46 namespace Learn {
55 class AdversarialJob : public Job
56 {
57 protected:
62 std::vector<const TPG::TPGVertex*> roots;
63
76 const int16_t posOfStudiedRoot;
77
78 public:
80 AdversarialJob() = delete;
81
93 AdversarialJob(std::initializer_list<const TPG::TPGVertex*> roots,
94 uint64_t archiveSeed = 0, uint64_t idx = 0,
95 int16_t posOfStudiedRoot = -1)
96 : roots(roots), Job(nullptr, archiveSeed, idx),
97 posOfStudiedRoot(posOfStudiedRoot)
98 {
99 }
100
106 void addRoot(const TPG::TPGVertex* root);
107
113 size_t getSize() const;
114
120 std::vector<const TPG::TPGVertex*> getRoots() const;
121
127 const TPG::TPGVertex* getRoot() const override;
128
136 const TPG::TPGVertex* operator[](int i) const;
137
143 virtual const int16_t getPosOfStudiedRoot() const;
144 };
145} // namespace Learn
146
147#endif
Learn::AdversarialJob
This class embeds roots for the simulations.
Definition adversarialJob.h:56
Learn::AdversarialJob::AdversarialJob
AdversarialJob()=delete
Deleted default constructor.
Learn::AdversarialJob::getRoots
std::vector< const TPG::TPGVertex * > getRoots() const
Getter of the roots.
Definition adversarialJob.cpp:48
Learn::AdversarialJob::operator[]
const TPG::TPGVertex * operator[](int i) const
Getter of a single root in the list.
Definition adversarialJob.cpp:58
Learn::AdversarialJob::roots
std::vector< const TPG::TPGVertex * > roots
Definition adversarialJob.h:62
Learn::AdversarialJob::getRoot
const TPG::TPGVertex * getRoot() const override
Getter of the first root.
Definition adversarialJob.cpp:53
Learn::AdversarialJob::addRoot
void addRoot(const TPG::TPGVertex *root)
Adds a root to this job and updates the size of the job.
Definition adversarialJob.cpp:39
Learn::AdversarialJob::getPosOfStudiedRoot
virtual const int16_t getPosOfStudiedRoot() const
Getter of the posOfStudiedRoot.
Definition adversarialJob.cpp:63
Learn::AdversarialJob::posOfStudiedRoot
const int16_t posOfStudiedRoot
Definition adversarialJob.h:76
Learn::AdversarialJob::getSize
size_t getSize() const
Getter of the number of roots.
Definition adversarialJob.cpp:44
Learn::AdversarialJob::AdversarialJob
AdversarialJob(std::initializer_list< const TPG::TPGVertex * > roots, uint64_t archiveSeed=0, uint64_t idx=0, int16_t posOfStudiedRoot=-1)
Constructor enabling storing elements in the job so that the Learning Agents will be able to use them...
Definition adversarialJob.h:93
Learn::Job
This class embeds roots for the simulations.
Definition job.h:53
Learn::Job::idx
const uint64_t idx
Definition job.h:63
Learn::Job::root
const TPG::TPGVertex * root
Definition job.h:58
Learn::Job::archiveSeed
const uint64_t archiveSeed
Definition job.h:68
TPG::TPGVertex
Abstract class representing the vertices of a TPGGraph.
Definition tpgVertex.h:55
Learn
Definition adversarialEvaluationResult.h:45