aboutsummaryrefslogtreecommitdiff
path: root/solvability.sh
diff options
context:
space:
mode:
authorCharlie Blake2018-07-25 16:39:53 +0100
committerCharlie Blake2018-07-26 10:32:38 +0100
commit4f7d08f7ff56df1b5f4217680e6f5c71ea8972ec (patch)
treead8dbd8c67153a166f1083ba7a117893ad1216f9 /solvability.sh
parentAdd csv output to single deal and init sol script (diff)
downloadmetasol-4f7d08f7ff56df1b5f4217680e6f5c71ea8972ec.tar.gz
metasol-4f7d08f7ff56df1b5f4217680e6f5c71ea8972ec.zip

Add correct solvability script output

Diffstat (limited to 'solvability.sh')
-rwxr-xr-xsolvability.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/solvability.sh b/solvability.sh
index 0775654..e0d157a 100755
--- a/solvability.sh
+++ b/solvability.sh
@@ -1,17 +1,18 @@
#!/bin/bash
-if [ "$#" != 3 ]; then
- # e.g.: ./solvability 1000 40 "sol --type alpha-star --timeout 6000"
- echo "Usage: <seeds> <cores> \"<solvitaire_command>\""
+if [ "$#" != 4 ]; then
+ # e.g.: ./solvability 1000 40 "sol --type alpha-star --timeout 6000" results.csv
+ echo "Usage: <seeds> <cores> \"<solvitaire_command>\" <output_file>"
exit 1
fi
seeds="$1"
cores="$2"
sol_command="$3"
+out="$4"
# Features: smart-sol
-echo "Attempted Seed, Outcome, Time Taken(ms), States Searched, Unique States Searched, Backtracks, Dominance Moves, States Removed From Cache, Final States In Cache, Final Buckets In Cache, Maximum Search Depth, Final Search Depth"
+echo "Attempted Seed, Outcome, Time Taken(ms), States Searched, Unique States Searched, Backtracks, Dominance Moves, States Removed From Cache, Final States In Cache, Final Buckets In Cache, Maximum Search Depth, Final Search Depth" > "$out"
-parallel -j"$cores" "$sol_command" --ra {} --class ::: $(seq "$seeds") 2> /dev/null
+parallel -j"$cores" "$sol_command" --ra {} --class ::: $(seq "$seeds") >> "$out" 2> /dev/null