17 #include <core/darwin.h> 18 #include <core/properties.h> 24 PROPERTY(
gravity,
float, 9.8f,
"Gravitational acceleration");
25 PROPERTY(
max_distance,
float, 2.4f,
"Maximum distance from the center");
26 PROPERTY(
max_angle,
float, 60.0f,
"Maximum angle from vertical");
34 PROPERTY(
max_force,
float, 10.0f,
"Maximum force which can be applied to the cart");
41 PROPERTY(
test_worlds,
int, 5,
"Number of test worlds per generation");
42 PROPERTY(
max_steps,
int, 1000,
"Maximum number of steps per episode");
47 "Force the actuator force to fixed +/-discrete_force_magnitude");
52 "The fixed force magnitude used if discrete_controls is true");
96 size_t inputs()
const override;
97 size_t outputs()
const override;
101 const Config& config()
const {
return config_; }
103 float randomInitialAngle()
const;
106 void validateConfiguration();
ComplexityHint
A generic hint for the initial population & domain setup.
Definition: darwin.h:47
A population implementation encapsulates the fixed-size set of genotypes, together with the rules for...
Definition: darwin.h:161
float discrete_force_magnitude
"The fixed force magnitude used if discrete_controls is true"
Definition: double_cart_pole.h:52
float gravity
"Gravitational acceleration"
Definition: double_cart_pole.h:24
Registry * registry()
Accessor to the Registry singleton.
Definition: darwin.h:295
Double-Cart-Pole domain configuration.
Definition: double_cart_pole.h:23
bool input_angular_velocity
"Use the angular velocity as input"
Definition: double_cart_pole.h:37
float max_distance
"Maximum distance from the center"
Definition: double_cart_pole.h:25
float pole_2_density
"Second pole density"
Definition: double_cart_pole.h:31
float max_initial_angle
"Maximum starting angle from vertical"
Definition: double_cart_pole.h:27
Domain: Double-Cart-Pole.
Definition: double_cart_pole.h:92
float max_angle
"Maximum angle from vertical"
Definition: double_cart_pole.h:26
bool discrete_controls
"Force the actuator force to fixed +/-discrete_force_magnitude"
Definition: double_cart_pole.h:47
size_t outputs() const override
Number of outputs from a Brain.
Definition: double_cart_pole.cpp:38
float cart_friction
"Cart friction"
Definition: double_cart_pole.h:33
int test_worlds
"Number of test worlds per generation"
Definition: double_cart_pole.h:41
Interface to the domain factory.
Definition: darwin.h:263
float max_force
"Maximum force which can be applied to the cart"
Definition: double_cart_pole.h:34
bool input_pole_angle
"Use the pole angle as input"
Definition: double_cart_pole.h:36
bool evaluatePopulation(darwin::Population *population) const override
Assigns fitness values to every genotype.
Definition: double_cart_pole.cpp:42
float pole_1_length
"First pole length"
Definition: double_cart_pole.h:28
size_t inputs() const override
Number of inputs to a Brain.
Definition: double_cart_pole.cpp:34
bool input_cart_velocity
"Use the cart velocity as input"
Definition: double_cart_pole.h:39
float pole_2_length
"Second pole length"
Definition: double_cart_pole.h:30
bool input_cart_distance
"Use the cart distance as input"
Definition: double_cart_pole.h:38
float pole_1_density
"First pole density"
Definition: double_cart_pole.h:29
The foundation for data structures supporting runtime reflection.
Definition: properties.h:388
core::ImplementationsSet< DomainFactory > domains
Registered domains.
Definition: darwin.h:288
Interface to a domain implementation.
Definition: darwin.h:229
float cart_density
"Cart density"
Definition: double_cart_pole.h:32
int max_steps
"Maximum number of steps per episode"
Definition: double_cart_pole.h:42