aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2021-04-29 10:42:15 -0500
committerMatt Strapp <strap012@umn.edu>2021-04-29 10:42:15 -0500
commit1803daa78e3adb997985c6023cc4db1299b50619 (patch)
treed50b2316e889c0f617e8e52fcc8771fcc7b08e65
parentCreate bash script, add logs to gitignore (diff)
downloadcsci4511w-1803daa78e3adb997985c6023cc4db1299b50619.tar
csci4511w-1803daa78e3adb997985c6023cc4db1299b50619.tar.gz
csci4511w-1803daa78e3adb997985c6023cc4db1299b50619.tar.bz2
csci4511w-1803daa78e3adb997985c6023cc4db1299b50619.tar.lz
csci4511w-1803daa78e3adb997985c6023cc4db1299b50619.tar.xz
csci4511w-1803daa78e3adb997985c6023cc4db1299b50619.tar.zst
csci4511w-1803daa78e3adb997985c6023cc4db1299b50619.zip
Finish shell script
-rwxr-xr-xstart.sh26
1 files changed, 18 insertions, 8 deletions
diff --git a/start.sh b/start.sh
index edf5b9f..f3dffa3 100755
--- a/start.sh
+++ b/start.sh
@@ -1,6 +1,8 @@
#/bin/bash
#Bash script for automating evaluate
-(python3 python/dotsandboxes/dotsandboxesserver.py 8080) > server.log &
+echo "Dots and Boxes Agent Shell Script: Ver 0.1: first release"
+
+(python3 python/dotsandboxes/dotsandboxesserver.py 8080) >> server.log &
echo "Web server running on http://127.0.0.1:8080"
PORT=10000
@@ -15,24 +17,32 @@ do
read -p "Agent:" Agent
case $Agent in
1) echo "Random Agent running on ws://127.0.0.1:$PORT"
- (python3 python/dotsandboxes/dotsandboxesagent.py $PORT) > $a.log &
+ (python3 python/dotsandboxes/dotsandboxesagent.py $PORT) >> $a.log &
;;
2) echo "MCTS Agent running on ws://127.0.0.1:$PORT"
- (python3 python/agent_MCTS.py $PORT) > $a.log &
+ (python3 python/agent_MCTS.py $PORT) >> $a.log &
;;
3) echo "AB Agent running on ws://127.0.0.1:$PORT"
- (python3 python/agent_MCTS.py $PORT) > $a.log &
+ (python3 python/agent_MCTS.py $PORT) >> $a.log &
;;
*) echo "Invalid input. Human player assumed. Undefined behavior will likely occur because I am lazy."
;;
esac
done
+clear
+read -p "Columns of board: " c
+read -p "Rows of board: " r
+read -p "Number of games to run: " n
+read -p "Output file name (please include '.csv'): " o
+echo ""
+read -p "This will now run `evaluate` with the given arguments in the foreground. Hit enter to confirm."
+(python3 python/evaluate.py -c $c -r $r -n $n -o $o ws://127.0.0.1:10001 ws://127.0.0.1:10002) > evaluate.log
+echo ""
+echo "Evaluate log located in evaluate.log"
+echo "Evaluate has finished! Check the output in $o"
-
-
-
-echo "Press enter to close all programs"
+echo "Press enter to finish."
read TRASH;
trap "exit" INT TERM