-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplugin.h
More file actions
49 lines (42 loc) · 1.48 KB
/
Copy pathplugin.h
File metadata and controls
49 lines (42 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* Evoplex <https://evoplex.org>
* Copyright (C) 2016-present
*/
#ifndef MINIMAL_MODEL_H
#define MINIMAL_MODEL_H
#include <plugininterface.h>
namespace evoplex {
class MinimalModel: public AbstractModel
{
public:
// Initializes the model.
// This method is called when the model is created and
// is mainly used to validate inputs and set the environment.
// Return true if successful
bool init() override;
// [OPTIONAL]
// It is executed before the algorithmStep() loop
// The default implementation of this method does nothing.
// void beforeLoop() override;
// It is executed in a loop and must contain all the logic to perform ONE step.
// Return true if algorithm is good for another step or false to stop asap.
bool algorithmStep() override;
// [OPTIONAL]
// It is executed after the algorithmStep() loop ends.
// The default implementation of this method does nothing.
// void afterLoop() override;
// [OPTIONAL]
// It allows implementing custom outputs which can be plotted or stored
// in a file through Evoplex. The "inputs" must be defined in the
// metadata.json file. If an experiment requests some custom output,
// this method will be called once at each time step, receiving the
// requested inputs.
// Values customOutputs(const Values& inputs) const override;
private:
int m_stateAttrId;
int m_rule;
bool m_toroidal;
bool m_edgeCaseValue;
};
} // evoplex
#endif // MINIMAL_MODEL_H