-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
executable file
·66 lines (58 loc) · 1.96 KB
/
main.cpp
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include <sferes/eval/parallel.hpp>
// Rastrigin
#ifdef RASTRIGIN
#define BEST 1 // Add analysis of the best indiv of each cells for all algo using a depth
#include "tasks/standard_functions_stochastic.hpp"
tbb::task_scheduler_init init(8);
#endif
// Hexa circle
#ifdef HEXA_OMNI
#define POLAR_COORD 1 // Use polar coordinate archive instead of cartesian coordinate one
#define BEST 1 // Add analysis of the best indiv of each cells for all algo using a depth
#include "tasks/hexapod_omnidirectional_stochastic.hpp"
tbb::task_scheduler_init init(32);
#endif
// Arm var
#ifdef ARM_VAR
#define POLAR_COORD 1 // Use polar coordinate archive instead of cartesian coordinate one
#define BEST 1 // Add analysis of the best indiv of each cells for all algo using a depth
#include "tasks/redundant_arm_stochastic.hpp"
tbb::task_scheduler_init init(8);
#endif
// Main
#include "deep_grid/algos.hpp"
#include "modifier/modifier.hpp"
#include "stat/stat_stochastic.hpp"
#include "run_utils/read_input.hpp"
#include "run_utils/run.hpp"
int main(int argc, char **argv)
{
using namespace sferes;
fit_stochastic::task::load_and_init_robot();
// Process inputs
using Params = fit_stochastic::params_stochastic::Params;
typedef eval::Parallel<Params> eval_t;
if (argc>1)
read_input<Params>(argc, argv);
print_task<Params>();
// Run baseline (ie compute only baseline-relevant stats)
if (Params::algos::Truth)
{
run_baseline<
fit_stochastic::baseline_max::phen_t<Params>,
eval_t,
stat_list::stat_baseline_t<Params, fit_stochastic::baseline_max::phen_t<Params> >,
modifier_list::modifier_t<Params>,
Params> ("Baseline_noise_free");
Params::algos::Truth = false;
}
// Run the task
run_experiments<
fit_stochastic::task::phen_t<Params>,
eval_t,
stat_list::stat_t<Params, fit_stochastic::task::phen_t<Params> >,
modifier_list::modifier_t<Params>,
Params> ();
fit_stochastic::task::reset_robot();
return 0;
};