3 # Choose next move to choose in the current directory (node)
6 # Exploration coefficient
12 { read mwins
; read msims
; } <stats
14 for move
in $
(find .
-maxdepth 1 -type d |
tail -n +2); do
15 { read wins
; read sims
; } <"$move"/stats
16 val
="$(echo "($wins/$sims+$explore_p*sqrt
(l
($msims)/$sims))*1000" | bc -l)"
18 if [ "$val" -gt "$best_val" ]; then