-
Notifications
You must be signed in to change notification settings - Fork 13
/
run_sim_all.sh
executable file
·81 lines (71 loc) · 3.5 KB
/
run_sim_all.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
#!/usr/bin/env bash
if [ ! -d naive_experiments ]; then
mkdir naive_experiments
fi
pushd naive_experiments
for seed in {0..10000..100}
do
for pathset in dubins
do
for goal_only in False
do
for cost in False
do
for nonmyopic in True False
do
for reward_func in naive naive_value #mes #mean
do
for tree_type in dpw #belief
do
echo sim_seed${seed}-pathset${pathset}-nonmyopic${nonmyopic}-tree${tree_type}
# Dont want to run either cost or goal only
if [ ${pathset} = dubins ] && [ ${goal_only} = True ]; then
continue
fi
if [ ${pathset} = dubins ] && [ ${cost} = True ]; then
continue
fi
# Don't want to run myopic UCB
#if [ ${reward_func} = mean ] && [ ${nonmyopic} = False ]; then
# continue
#fi
# Myopic; tree_type should be ignored anyways, but should only run once
if [ ${nonmyopic} = False ] && [ ${tree_type} = belief ]; then
continue
fi
if [ ${nonmyopic} = True ] && [ ${reward_func} = naive ] && [ ${tree_type} = belief ]; then
continue
fi
if [ ${nonmyopic} = True ] && [ ${reward_func} = naive_value ] && [ ${tree_type} = belief ]; then
continue
fi
if [ ${nonmyopic} = False ]; then
workdir=sim_seed${seed}-pathset${pathset}-nonmyopic${nonmyopic}-NOISE
else
workdir=sim_seed${seed}-pathset${pathset}-nonmyopic${nonmyopic}-tree${tree_type}-NOISE
fi
if [ -d $workdir ] && [ -f ${workdir}/figures/${reward_func}/trajectory-N.SUMMARY.png ] ; then
continue
fi
if [ -d $workdir ] && [ -f ${workdir}/figures/${reward_func}/trajectory-N.SUMMARY.png ] ; then
continue
fi
if [ ! -d $workdir ]; then mkdir $workdir; fi
pushd $workdir
if [ ${nonmyopic} = False ]; then
cmd="python ../../nonmyopic_experiments.py -s ${seed} -r ${reward_func} -p ${pathset}"
fi
if [ ${nonmyopic} = True ]; then
cmd="python ../../nonmyopic_experiments.py -s ${seed} -r ${reward_func} -p ${pathset} -n -t ${tree_type}"
fi
echo $cmd
$cmd
popd
done
done
done
done
done
done
done
popd