GEGELATI
adversarialJob.h
1
36#ifndef ADVERSARIAL_JOB_H
37#define ADVERSARIAL_JOB_H
38
39#include <cstdint>
40#include <vector>
41
42#include "learn/job.h"
43
44namespace Learn {
53 class AdversarialJob : public Job
54 {
55 protected:
60 std::vector<const TPG::TPGVertex*> roots;
61
74 const int16_t posOfStudiedRoot;
75
76 public:
78 AdversarialJob() = delete;
79
91 AdversarialJob(std::initializer_list<const TPG::TPGVertex*> roots,
92 uint64_t archiveSeed = 0, uint64_t idx = 0,
93 int16_t posOfStudiedRoot = -1)
94 : roots(roots), Job(nullptr, archiveSeed, idx),
96 {
97 }
98
104 void addRoot(const TPG::TPGVertex* root);
105
111 size_t getSize() const;
112
118 std::vector<const TPG::TPGVertex*> getRoots() const;
119
125 const TPG::TPGVertex* getRoot() const override;
126
134 const TPG::TPGVertex* operator[](int i) const;
135
141 virtual const int16_t getPosOfStudiedRoot() const;
142 };
143} // namespace Learn
144
145#endif
This class embeds roots for the simulations.
Definition: adversarialJob.h:54
AdversarialJob()=delete
Deleted default constructor.
std::vector< const TPG::TPGVertex * > getRoots() const
Getter of the roots.
Definition: adversarialJob.cpp:48
const TPG::TPGVertex * operator[](int i) const
Getter of a single root in the list.
Definition: adversarialJob.cpp:58
std::vector< const TPG::TPGVertex * > roots
Definition: adversarialJob.h:60
const TPG::TPGVertex * getRoot() const override
Getter of the first root.
Definition: adversarialJob.cpp:53
void addRoot(const TPG::TPGVertex *root)
Adds a root to this job and updates the size of the job.
Definition: adversarialJob.cpp:39
virtual const int16_t getPosOfStudiedRoot() const
Getter of the posOfStudiedRoot.
Definition: adversarialJob.cpp:63
const int16_t posOfStudiedRoot
Definition: adversarialJob.h:74
size_t getSize() const
Getter of the number of roots.
Definition: adversarialJob.cpp:44
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:91
This class embeds roots for the simulations.
Definition: job.h:53
const uint64_t idx
Definition: job.h:63
const TPG::TPGVertex * root
Definition: job.h:58
const uint64_t archiveSeed
Definition: job.h:68
Abstract class representing the vertices of a TPGGraph.
Definition: tpgVertex.h:49
Definition: adversarialEvaluationResult.h:45