Skip to content

Commit 304d5f1

Browse files
committed
added script for generating data reported in paper
1 parent 11ecfb6 commit 304d5f1

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

runscripts/paper_results.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
3+
# Replace 'PATH_TO_SNBO' with the path to your SNBO project
4+
export PYTHONPATH=PATH_TO_SNBO:$PYTHONPATH
5+
6+
methods=("bo" "ibnn" "turbo" "dycors" "snbo")
7+
8+
############ analytical cases
9+
10+
dims=(10 25 50)
11+
max_evals=(500 1000 1000)
12+
problems=("ackley" "rastrigin" "levy")
13+
14+
for seed in $(seq 1 10); do
15+
for dim_idx in "${!dims[@]}"; do
16+
17+
dim=${dims[$dim_idx]}
18+
n_init=$((2*$dim))
19+
max_eval=${max_evals[$dim_idx]}
20+
21+
for prob_idx in "${!problems[@]}"; do
22+
for method_idx in "${!methods[@]}"; do
23+
python algorithms/optimize.py --method ${methods[$method_idx]} --problem ${problems[$prob_idx]} --dim $dim --n_init $n_init\
24+
--max_evals $max_eval --seed $seed --neurons 128 128 --act_funcs "GELU" "GELU"
25+
done
26+
done
27+
28+
done
29+
done
30+
31+
############ real-world problems
32+
33+
dims=(100 102)
34+
max_evals=2000
35+
problems=("rover" "halfcheetah")
36+
37+
for seed in $(seq 1 10); do
38+
for prob_idx in "${!problems[@]}"; do
39+
40+
dim=${dims[$prob_idx]}
41+
n_init=$((2*$dim))
42+
43+
for method_idx in "${!methods[@]}"; do
44+
python algorithms/optimize.py --method ${methods[$method_idx]} --problem ${problems[$prob_idx]} --dim $dim\
45+
--n_init $n_init --max_evals $max_evals --seed $seed --neurons 256 256 --act_funcs "GELU" "GELU"
46+
done
47+
48+
done
49+
done

0 commit comments

Comments
 (0)