From dcf7067adc7a04d83be626f52ebb93f9c95018b6 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 7 Jan 2012 18:20:57 +0100 Subject: [PATCH] sgf-analyse.pl: Fix sgf2gtp usage --- tools/sgf-analyse.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/sgf-analyse.pl b/tools/sgf-analyse.pl index a5ddccf..bded7f0 100755 --- a/tools/sgf-analyse.pl +++ b/tools/sgf-analyse.pl @@ -36,7 +36,7 @@ sub one { # included. my $line = $move + 3; # board_size, clearboard, komi my $rest = $line + 1; - open my $g, "tools/sgf2gtp.pl \"$sgf\" | sed -e '$line s/play \\(.*\\) \\(.*\\)/1 echo \\1 \\2\\n2 genmove \\1\\n3 pachi-result/' -e '$rest,\$ d' | ./pachi @ARGV |" or die $!; + open my $g, "tools/sgf2gtp.pl < \"$sgf\" | sed -e '$line s/play \\(.*\\) \\(.*\\)/1 echo \\1 \\2\\n2 genmove \\1\\n3 pachi-result/' -e '$rest,\$ d' | ./pachi @ARGV |" or die $!; # Parse the GTP output. my ($color, $realmove, $genmove, $winrate) = @_; @@ -61,5 +61,5 @@ sub one { print "# $sgf @ARGV\n"; -my $moves = `tools/sgf2gtp.pl \"$sgf\" | wc -l` - 3; +my $moves = `tools/sgf2gtp.pl < \"$sgf\" | wc -l` - 3; one($_) for (1 .. $moves); -- 2.11.4.GIT