new struct `finger_cost`
[evolve-layout.git] / evaluate_efficiency.sh
blobb8e2841af51063fe7fa102af4b93a79424786c68
1 #!/bin/bash
3 if [ $# -lt 1 ]; then
4 echo "usage: $0 <identifier>"
5 exit 0
6 fi
8 if [ "$1" == "--help" ]; then
9 echo "usage: $0 <identifier>"
10 exit 0
13 echo create data
14 for j in 600 {1..6}000
15 do time ./check_neo.py --evolve $j --prerandomize 1000000 -v -q --controlled-tail >> results/$1-evolve-$j-results.txt
16 done
18 echo check and plot the data
19 echo … final penalty
20 for j in {1..9} {1..9}0 {1..9}00 {1..9}000 {1..3}0000; do grep "billion total" results/$1-evolve-$j-results.txt | cut -d " " -f 2| sed "s/^/$j /" ; done > results/$1-evolve-range-final-penalty.txt
21 echofinger repeats
22 for j in {1..9} {1..9}0 {1..9}00 {1..9}000 {1..3}0000; do grep 2gramme results/$1-evolve-$j-results.txt | cut -d " " -f 2| sed "s/^/$j /" ; done > results/$1-evolve-range-finger-repeats.txt
23 echofinger disbalance
24 for j in {1..9} {1..9}0 {1..9}00 {1..9}000 {1..3}0000; do grep "disbalance of the fingers" results/$1-evolve-$j-results.txt | cut -d " " -f 2| sed "s/^/$j /" ; done > results/$1-evolve-range-finger-disbalance.txt
25 echo … key position cost
26 for j in {1..9} {1..9}0 {1..9}00 {1..9}000 {1..3}0000; do grep 1gramme results/$1-evolve-$j-results.txt | cut -d " " -f 2| sed "s/^/$j /" ; done > results/$1-evolve-range-key-position.txt
27 echo … key handswitching
28 for j in {1..9} {1..9}0 {1..9}00 {1..9}000 {1..3}0000; do grep handswitching results/$1-evolve-$j-results.txt | cut -d " " -f 2| sed "s/^/$j /" ; done > results/$1-evolve-range-handswitching.txt
30 # and old style results
31 for j in {1..130} 1{4..9}0 {201..205} {301..305} {401..405} {601..603} {1001..1003} 10000; do grep "billion total" results/$1-evolve-$j-results.txt | cut -d " " -f 2| sed "s/^/$j /" ; done >> results/$1-evolve-range-final-penalty.txt; for j in {1..130} 1{4..9}0 {201..205} {301..305} {401..405} {601..603} {1001..1003} 10000; do grep 2gramme results/$1-evolve-$j-results.txt | cut -d " " -f 2| sed "s/^/$j /" ; done >> results/$1-evolve-range-finger-repeats.txt; for j in {1..130} 1{4..9}0 {201..205} {301..305} {401..405} {601..603} {1001..1003} 10000; do grep disbalance results/$1-evolve-$j-results.txt | cut -d " " -f 2| sed "s/^/$j /" ; done >> results/$1-evolve-range-finger-disbalance.txt; for j in {1..130} 1{4..9}0 {201..205} {301..305} {401..405} {601..603} {1001..1003} 10000; do grep 1gramme results/$1-evolve-$j-results.txt | cut -d " " -f 2| sed "s/^/$j /" ; done >> results/$1-evolve-range-key-position.txt
32 echo with pyxplot
33 # pyxplot evaluate_efficiency.pyx