]> git.sesse.net Git - remoteglot-book/blob - opening-stats.pl
Switch value format to protobuf. Slightly smaller, easier to deal with extensions...
[remoteglot-book] / opening-stats.pl
1 #! /usr/bin/perl
2 use strict;
3 use warnings;
4 use CGI;
5 use JSON::XS;
6 use lib '..';
7 use Position;
8
9 my $cgi = CGI->new;
10 my $fen = $ARGV[0];
11 my $pos = Position->from_fen($fen);
12 my $hex = unpack('H*', $pos->bitpacked_fen);
13 system("./binlookup", "./open.mtbl", "40", $hex);
14