-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpecimen.h
More file actions
45 lines (32 loc) · 994 Bytes
/
Specimen.h
File metadata and controls
45 lines (32 loc) · 994 Bytes
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
//
// Created by jan on 15.09.17.
//
#ifndef SIMPLEEVOLUTION_SPECIMEN_H
#define SIMPLEEVOLUTION_SPECIMEN_H
#include <vector>
#include "World.h"
class Specimen {
public:
Specimen(std::vector<float>& input_neuron, std::vector<float>& output_neuron, World& world);
void random_initialise();
void simulate_frame();
void die();
float get_x_pos() const;
float get_y_pos() const;
float get_orientation() const;
float get_species() const;
float get_food_feeler_angle() const;
float get_specimen_feeler_angle() const;
float get_food_level() const;
float get_life_time_equivalent() const;
bool is_active() const;
private:
float x_pos, y_pos, orientation, species;
float food_feeler_angle, specimen_feeler_angle, energy, life_time_equivalent;
float world_size_x, world_size_y;
bool active;
World& world;
std::vector <float> input_neuron;
std::vector <float> output_neuron;
};
#endif //SIMPLEEVOLUTION_SPECIMEN_H