12 my ($chld_out, $chld_in);
13 my $pid = IPC::Open2::open2($chld_out, $chld_in, "./binlookup", "./open.mtbl", "40");
16 my $pos = Position->from_fen($fen);
17 my $hex = unpack('H*', $pos->bitpacked_fen);
18 print $chld_in $hex, "\n";
20 chomp (my $line = <$chld_out>); # Root position hash.
23 chomp (my $line = <$chld_out>); # Actual stats.
25 my ($white, $draw, $black, $opening_num, $white_avg_elo, $black_avg_elo, $num_elo, $timestamp, $pgn_file_number, $pgn_start_position, @moves) = split / /, $line;
27 # Explore one move out.
28 for my $move (@moves) {
29 my ($np, $uci_move) = $pos->make_pretty_move($move);
30 my $hex = unpack('H*', $np->bitpacked_fen);
31 print $chld_in $hex, "\n";
32 my $line = <$chld_out>; # Ignore position hash.