2 # pattern_bayes_gen: Generate pattern probability table from a SGF collection
4 (for i
in "$@"; do echo $i >&2; tools
/sgf2gtp.pl
<$i; done) |
5 .
/pachi
-d 0 -e patternscan competition |
7 BEGIN { use List::MoreUtils qw(uniq); }
22 $p{$_} = $choices{$_} / $counts{$_};
24 for (sort { $counts{$b} <=> $counts{$a} } keys %p) {
25 printf("%.3f %d %d %s\n", $p{$_}, $choices{$_}, $counts{$_}, $_);