-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexperiments.sh
executable file
·146 lines (114 loc) · 8.14 KB
/
experiments.sh
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/bin/bash
TIMESTAMP=$(date +%s)
SEED=8141516
#################################
#################################
###########SYNTH1################
#################################
#################################
### Synth 1
echo "Synth 1"
# Change in Population on Synth 1
echo "Running with 50 Individuals"
f1=$(python3 run.py -d synth1 -g 500 -k 5 -p 50 -r 30 -cp 0.85 -mp 0.14 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test pop_test | tail -1)
echo "Running with 100 Individuals"
f2=$(python3 run.py -d synth1 -g 500 -k 5 -p 100 -r 30 -cp 0.85 -mp 0.14 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test pop_test | tail -1)
echo "Running with 200 Individuals"
f3=$(python3 run.py -d synth1 -g 500 -k 5 -p 200 -r 30 -cp 0.85 -mp 0.14 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test pop_test | tail -1)
echo "Running with 500 Individuals"
f4=$(python3 run.py -d synth1 -g 500 -k 5 -p 500 -r 30 -cp 0.85 -mp 0.14 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test pop_test | tail -1)
echo "Plotting Population Test"
python3 plots/plot_population.py --scores $f1 $f2 $f3 $f4 --dataset synth1
# Number of Generations Synth 1
echo "Running 50 Generations on Synth 1"
f1=$(python3 run.py -d synth1 -g 50 -k 5 -p 100 -r 30 -cp 0.85 -mp 0.14 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test test_generations | tail -1)
echo "Running 100 Generations on Synth 1"
f2=$(python3 run.py -d synth1 -g 100 -k 5 -p 100 -r 30 -cp 0.85 -mp 0.14 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test test_generations | tail -1)
echo "Running 200 Generations on Synth 1"
f3=$(python3 run.py -d synth1 -g 200 -k 5 -p 100 -r 30 -cp 0.85 -mp 0.14 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test test_generations | tail -1)
echo "Running 500 Generations on Synth 1"
f4=$(python3 run.py -d synth1 -g 500 -k 5 -p 100 -r 30 -cp 0.85 -mp 0.14 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test test_generations | tail -1)
python3 plots/plot_test_generations.py --scores $f1 $f2 $f3 $f4 --dataset synth1
# Operator Probabilities on Synth 1
echo "Running operator Probability 1"
f1=$(python3 run.py -d synth1 -g 200 -k 5 -p 100 -r 40 -cp 0.9 -mp 0.09 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test operator_prob | tail -1)
echo "Running operator Probability 2"
f2=$(python3 run.py -d synth1 -g 200 -k 5 -p 100 -r 40 -cp 0.7 -mp 0.29 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test operator_prob | tail -1)
echo "Running operator Probability 3"
f3=$(python3 run.py -d synth1 -g 200 -k 5 -p 100 -r 40 -cp 0.5 -mp 0.49 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test operator_prob | tail -1)
python3 plots/plot_operators_prob.py --scores $f1 $f2 $f3 --dataset synth1
# Tournament Size on Synth 1
echo "Running Tournament Size 2"
f1=$(python3 run.py -d synth1 -g 200 -k 2 -p 100 -r 30 -cp 0.7 -mp 0.29 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test tournament_size | tail -1)
echo "Running Tournament Size 5"
f2=$(python3 run.py -d synth1 -g 200 -k 5 -p 100 -r 30 -cp 0.7 -mp 0.29 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test tournament_size | tail -1)
echo "Running Tournament Size 7"
f3=$(python3 run.py -d synth1 -g 200 -k 7 -p 100 -r 30 -cp 0.7 -mp 0.29 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test tournament_size | tail -1)
python3 plots/plot_tournament_size.py --scores $f1 $f2 $f3 --dataset synth1
python3 plots/plot_different_individuals.py --scores $f1 $f2 $f3 --dataset synth1 --individual 100
# Elists on Synth 1
echo "Running Without Elitist Operators"
f1=$(python3 run.py -d synth1 -g 200 -k 2 -p 100 -r 30 -cp 0.7 -mp 0.29 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test elitist_operators | tail -1)
echo "Running With Elistist Operators"
f2=$(python3 run.py -d synth1 -g 200 -k 2 -p 100 -r 30 -cp 0.7 -mp 0.29 -rp 0.01 --elitist-operators --random-seed $SEED --timestamp $TIMESTAMP --test elitist_operators | tail -1)
python3 plots/plot_elitist_operators.py --scores $f1 $f2 --dataset synth1
# Best, Average Synth 1
echo "Best Average on Synth 1"
f1=$(python3 run.py -d synth1 -g 200 -k 2 -p 200 -r 30 -cp 0.5 -mp 0.49 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test best_avg | tail -1)
python3 plots/plot_avg_best.py --scores $f1 --dataset synth1
# Synth 2
echo "Synth 2"
# Change in Population on Synth 2
echo "Running with 50 Individuals"
f1=$(python3 run.py -d synth2 -g 500 -k 5 -p 50 -r 30 -cp 0.85 -mp 0.10 -rp 0.05 --random-seed $SEED --timestamp $TIMESTAMP --test pop_test | tail -1)
echo "Running with 100 Individuals"
f2=$(python3 run.py -d synth2 -g 500 -k 5 -p 100 -r 30 -cp 0.85 -mp 0.10 -rp 0.05 --random-seed $SEED --timestamp $TIMESTAMP --test pop_test | tail -1)
echo "Running with 200 Individuals"
f3=$(python3 run.py -d synth2 -g 500 -k 5 -p 200 -r 30 -cp 0.85 -mp 0.10 -rp 0.05 --allow-sin --random-seed $SEED --timestamp $TIMESTAMP --test pop_test | tail -1)
echo "Running with 500 Individuals"
f4=$(python3 run.py -d synth2 -g 500 -k 5 -p 500 -r 30 -cp 0.85 -mp 0.10 -rp 0.05 --allow-sin --random-seed $SEED --timestamp $TIMESTAMP --test pop_test | tail -1)
echo "Plotting Population Test"
python3 plots/plot_population.py --scores $f1 $f2 $f3 $f4 --dataset synth2
#################################
#################################
###########SYNTH2################
#################################
#################################
# Allow Sin
echo "Running with not allow sin"
f1=$(python3 run.py -d synth2 -g 500 -k 2 -p 200 -r 30 -cp 0.9 -mp 0.09 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test allow_sin | tail -1)
echo "Running with allow sin"
f2=$(python3 run.py -d synth2 -g 500 -k 2 -p 200 -r 30 -cp 0.9 -mp 0.09 -rp 0.01 --allow-sin --random-seed $SEED --timestamp $TIMESTAMP --test allow_sin | tail -1)
python3 plots/plot_sin.py --scores $f1 $f2 --dataset synth2
python3 plots/plot_avg_best.py --scores $f1 --dataset synth2
#################################
#################################
###########CONCRETE##############
#################################
#################################
# echo "Concrete"
echo "Running with not allow sin"
f1=$(python3 run.py -d concrete -g 500 -k 2 -p 200 -r 30 -cp 0.9 -mp 0.09 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test allow_sin | tail -1)
echo "Running with allow sin"
f2=$(python3 run.py -d concrete -g 500 -k 2 -p 200 -r 30 -cp 0.9 -mp 0.09 -rp 0.01 --allow-sin --random-seed $SEED --timestamp $TIMESTAMP --test allow_sin | tail -1)
python3 plots/plot_sin.py --scores $f1 --dataset concrete
echo "Running operator Probability 1"
f1=$(python3 run.py -d concrete -g 500 -k 2 -p 100 -r 40 -cp 0.9 -mp 0.09 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test operator_prob | tail -1)
echo "Running operator Probability 2"
f2=$(python3 run.py -d concrete -g 500 -k 2 -p 100 -r 40 -cp 0.7 -mp 0.29 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test operator_prob | tail -1)
echo "Running operator Probability 3"
f3=$(python3 run.py -d concrete -g 500 -k 2 -p 100 -r 40 -cp 0.5 -mp 0.49 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test operator_prob | tail -1)
python3 plots/plot_operators_prob.py --scores $f1 $f2 $f3 --dataset concrete
# Tournament Size on Concrete
echo "Running Tournament Concrete"
f1=$(python3 run.py -d concrete -g 500 -k 2 -p 100 -r 30 -cp 0.7 -mp 0.29 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test tournament_size | tail -1)
echo "Running Tournament Size 5"
f2=$(python3 run.py -d concrete -g 500 -k 5 -p 100 -r 30 -cp 0.7 -mp 0.29 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test tournament_size | tail -1)
echo "Running Tournament Size 7"
f3=$(python3 run.py -d concrete -g 500 -k 7 -p 100 -r 30 -cp 0.7 -mp 0.29 -rp 0.01 --random-seed $SEED --timestamp $TIMESTAMP --test tournament_size | tail -1)
python3 plots/plot_tournament_size.py --scores $f1 $f2 $f3 --dataset concrete
python3 plots/plot_different_individuals.py --scores $f1 $f2 $f3 --dataset concrete --individual 100
# Best, Average Concrete
echo "Best Average on Concrete"
f1=$(python3 run.py -d concrete -g 500 -k 2 -p 100 -r 30 -cp 0.9 -mp 0.09 -rp 0.01 --allow-sin --random-seed $SEED --timestamp $TIMESTAMP --test best_avg | tail -1)
python3 plots/plot_avg_best.py --scores $f1 --dataset concrete