]> git.sesse.net Git - remoteglot-book/blobdiff - www/opening-stats.pl
Partition the SSTable; somewhat less efficient space-wise, it seems, but we avoid...
[remoteglot-book] / www / opening-stats.pl
index d74f1add083bddcc89ec6551b4091df760f0e16e..33d3c082dcd551a657a7c5847360c47d0a26046c 100755 (executable)
@@ -13,7 +13,7 @@ my $cgi = CGI->new;
 my $fen = $cgi->param('fen');
 my $pos = Position->from_fen($fen);
 my $hex = unpack('H*', $pos->bitpacked_fen);
-open my $fh, "-|", "../binlookup", "../open.mtbl", $hex
+open my $fh, "-|", "../binlookup", "../open.mtbl", "40", $hex
        or die "../binlookup: $!";
 
 my $opening;
@@ -31,7 +31,7 @@ while (<$fh>) {
                black_avg_elo => $black_avg_elo * 1,
                num_elo => $num_elo * 1
        };
-       $opening = $openings{$opening_num};
+       $opening = $openings{$opening_num} // 'A00: Start position';
 }
 close $fh;