aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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