]> git.sesse.net Git - remoteglot/blobdiff - book/opening-stats.pl
Add some opening book stuff that is still under development, and really should be...
[remoteglot] / book / opening-stats.pl
diff --git a/book/opening-stats.pl b/book/opening-stats.pl
new file mode 100755 (executable)
index 0000000..963b8d6
--- /dev/null
@@ -0,0 +1,17 @@
+#! /usr/bin/perl
+use strict;
+use warnings;
+use CGI;
+use JSON::XS;
+use lib '.';
+use Position;
+require 'ECO.pm';
+
+#ECO::unpersist();
+
+my $cgi = CGI->new;
+my $fen = $ARGV[0];
+my $pos = Position->from_fen($fen);
+my $hex = unpack('H*', $pos->bitpacked_fen);
+system("./binlookup", "./open.mtbl", $hex);
+