25 #ifndef PAGMO_SPHERES_Q_H
26 #define PAGMO_SPHERES_Q_H
30 #include <gsl/gsl_odeiv2.h>
32 #include "../config.h"
33 #include "../serialization.h"
35 #include "base_stochastic.h"
38 namespace pagmo {
namespace problem {
68 static int ode_func(
double t,
const double y[],
double f[],
void *params );
79 spheres_q(
int n_evaluations = 10,
int n_hidden = 10,
double ode_prec = 1E-3,
unsigned int seed = 0);
103 std::vector<std::vector<double> > post_evaluate(
const decision_vector &x,
int N = 25000,
unsigned int seed = 0)
const;
114 std::vector<std::vector<double> > simulate(
const decision_vector & x,
const std::vector<double> &ic,
int N)
const;
125 ffnn(
const unsigned int,
const unsigned int,
const unsigned int);
126 void eval(
double[],
const double[])
const;
127 void set_weights(
const std::vector<double> &);
129 friend class boost::serialization::access;
130 template <
class Archive>
131 void serialize(Archive &ar,
const unsigned int)
133 ar &
const_cast<unsigned int &
>(m_n_inputs);
134 ar &
const_cast<unsigned int &
>(m_n_hidden);
135 ar &
const_cast<unsigned int &
>(m_n_outputs);
139 const unsigned int m_n_inputs;
140 const unsigned int m_n_hidden;
141 const unsigned int m_n_outputs;
142 std::vector<double> m_weights;
143 mutable std::vector<double> m_hidden;
145 double single_fitness(
const std::vector<double> &,
const ffnn& )
const;
146 friend class boost::serialization::access;
147 template <
class Archive>
148 void serialize(Archive &ar,
const unsigned int)
150 ar & boost::serialization::base_object<base_stochastic>(*this);
152 ar & m_n_evaluations;
153 ar & m_n_hidden_neurons;
154 ar &
const_cast<double &
>(m_numerical_precision);
157 gsl_odeiv2_driver* m_gsl_drv_pntr;
158 gsl_odeiv2_system m_sys;
161 int m_n_hidden_neurons;
162 const double m_numerical_precision;
163 mutable std::vector<double> m_ic;
170 #endif // PAGMO_SPHERES_Q_H
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
std::vector< double > decision_vector
Decision vector type.
std::vector< double > fitness_vector
Fitness vector type.
Base Stochastic Optimization Problem.
Evolutionary Neuro-Controller for the MIT Spheres (perception-action defined in the absolute frame) ...
Evolutionary Neuro-Controller for the MIT Spheres (perception-action defined in the body frame) ...