-
Notifications
You must be signed in to change notification settings - Fork 11
/
run.sh
executable file
·63 lines (52 loc) · 1.25 KB
/
run.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
#!/bin/bash -
#===============================================================================
#
# FILE: run.sh
#
# USAGE: ./run.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Aijun Bai (),
# ORGANIZATION:
# CREATED: 01/15/2017 10:37
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
VERSION="release"
SIZE="5"
TRIALS="200"
EPISODES="100000"
PLT="plot.gnuplot"
OPT=""
declare -a ALGS=(
"HAMQ-INT"
"HAMQ"
"MaxQ-Q"
"MaxQ-0"
"MaxQ-OP"
)
if [ $VERSION = "debug" ]; then
OPT="--debug $OPT"
fi
ulimit -c unlimited
make cleanall
make $VERSION
mkdir -p data
cd data
cp ../${PLT} plot.gnuplot
cp ../plot.sh .
echo "set output \"reward.png\"" >> plot.gnuplot
echo "plot \\" >> plot.gnuplot
LS="1"
for alg in "${ALGS[@]}"; do
time ../taxi $OPT --size $SIZE --trials $TRIALS --episodes $EPISODES \
--train --multithreaded --$alg > ${alg}.out
echo "'${alg}.out' u 1:2:3 t \"${alg}\" ls $LS with yerrorlines, \\" >> plot.gnuplot
LS="`expr $LS + 1`"
done
./plot.sh