-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrain.sh
More file actions
97 lines (77 loc) · 1.58 KB
/
train.sh
File metadata and controls
97 lines (77 loc) · 1.58 KB
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
#!/bin/sh
LIBPATH=/usr/local/lib
if [ x"$LIBPATH" != x ]; then
if [ x"$LD_LIBRARY_PATH" = x ]; then
LD_LIBRARY_PATH=$LIBPATH
else
LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH
fi
export LD_LIBRARY_PATH
fi
DIR=`dirname $0`
player="${DIR}/sample_player"
coach="${DIR}/sample_coach"
trainer="${DIR}/sample_trainer"
teamname="HELIOS"
host="localhost"
config="${DIR}/player.conf"
config_dir="${DIR}/formations-dt"
number=11
usecoach="true"
sleepprog=sleep
goaliesleep=1
sleeptime=0
debugopt="--offline_logging --debug --debug_server_connect"
usage()
{
(echo "Usage: $0 [options]"
echo "Possible options are:"
echo " --help print this"
echo " -h, --host HOST specifies server host"
echo " -t, --teamname TEAMNAME specifies team name") 1>&2
}
while [ $# -gt 0 ]
do
case $1 in
--help)
usage
exit 0
;;
-h|--host)
if [ $# -lt 2 ]; then
usage
exit 1
fi
host=$2
shift 1
;;
-t|--teamname)
if [ $# -lt 2 ]; then
usage
exit 1
fi
teamname=$2
shift 1
;;
*)
usage
exit 1
;;
esac
shift 1
done
OPT="-h ${host} -t ${teamname}"
OPT="${OPT} --player-config ${config} --config_dir ${config_dir}"
OPT="${OPT} ${debugopt}"
#if [ $number -gt 0 ]; then
# $player ${OPT} -g &
# $sleepprog $goaliesleep
#fi
#for (( i=2; i<=${number}; i=$i+1 )) ; do
$player ${OPT} -n 11 &
$sleepprog $sleeptime
#done
#if [ "${usecoach}" = "true" ]; then
# $coach -h $host -t $teamname &
#fi
$trainer -h $host -t $teamname &