-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtrain.sh
More file actions
executable file
·29 lines (20 loc) · 783 Bytes
/
train.sh
File metadata and controls
executable file
·29 lines (20 loc) · 783 Bytes
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
#!/bin/bash
N=$1
ROBOCODE=$2
: ${N:=2}
: ${ROBOCODE:="$HOME/robocode"}
start_bg () {
cd /Users/Lenny/robocode/
java -Xmx512M -Dsun.io.useCanonCaches=false -Ddebug=true -DNOSECURITY=true -DROBOTPATH=$ROBOCODE/robots -Dfile.encoding=UTF-8 -classpath "/Users/lenny/code/Plato/plato-robot/bin/lk/*:$ROBOCODE/libs/*:/Users/lenny/code/Plato/plato-robot/libs/*" robocode.Robocode -battle /Users/lenny/code/Plato/train.battle -tps 150 &
sleep 1
cd /Users/lenny/code/Plato/
}
rm -r /tmp/plato
javac -cp "plato-robot/libs/*:$ROBOCODE/libs/*" -Xlint:deprecation -d plato-robot/bin plato-robot/src/lk/*
tensorboard --logdir=/tmp/plato &
cd plato-server
python3 main.py &
cd ..
for i in $(seq 1 $N); do start_bg; done
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
wait