From d82ac959f7f3234cc7ba9057e781be37bcf1c4be Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Fri, 28 Jan 2011 12:22:55 +0100 Subject: [PATCH] Move some helper scripts and files to tools/ subdirectory --- HACKING | 4 ++-- Makefile | 2 +- README | 6 +++--- complete-tromptaylor.gtp => tools/complete-tromptaylor.gtp | 0 complete.gtp => tools/complete.gtp | 0 genmove.gtp => tools/genmove.gtp | 0 genmove19.gtp => tools/genmove19.gtp | 0 gentbook.sh => tools/gentbook.sh | 0 pattern3_show.pl => tools/pattern3_show.pl | 0 sgf-analyse.pl => tools/sgf-analyse.pl | 8 ++++---- sgf2gtp.pl => tools/sgf2gtp.pl | 0 spirit.gtp => tools/spirit.gtp | 0 twogtp.py => tools/twogtp.py | 0 13 files changed, 10 insertions(+), 10 deletions(-) rename complete-tromptaylor.gtp => tools/complete-tromptaylor.gtp (100%) rename complete.gtp => tools/complete.gtp (100%) rename genmove.gtp => tools/genmove.gtp (100%) rename genmove19.gtp => tools/genmove19.gtp (100%) rename gentbook.sh => tools/gentbook.sh (100%) rename pattern3_show.pl => tools/pattern3_show.pl (100%) rename sgf-analyse.pl => tools/sgf-analyse.pl (81%) rename sgf2gtp.pl => tools/sgf2gtp.pl (100%) rename spirit.gtp => tools/spirit.gtp (100%) rename twogtp.py => tools/twogtp.py (100%) diff --git a/HACKING b/HACKING index 4eaadc9..4fb7e35 100644 --- a/HACKING +++ b/HACKING @@ -191,8 +191,8 @@ Opening Book The UCT engine can "pre-read" the starting board position and dump the core of the built tree to a file, loading it later. This is called a 'tbook' (as in "tree book") and can be generated using the -./gentbook.sh script. The newly generated file is automatically used -by the UCT engine when found. +tools/gentbook.sh script. The newly generated file is automatically +used by the UCT engine when found. Alternatively, there is a support for directly used opening book (so-called fbook, a.k.a. "forced book" or "fuseki book"). The book diff --git a/Makefile b/Makefile index 41d55a9..0359bfb 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ zzgo: $(OBJS) zzgo.o $(LOCALLIBS) .PHONY: zzgo-profiled zzgo-profiled: @make clean all XLDFLAGS=-fprofile-generate XCFLAGS="-fprofile-generate -fomit-frame-pointer -frename-registers" - ./zzgo -t =5000 no_tbook file.gtp + tools/sgf2gtp.pl file.gtp 2. Open the file.gtp in your favorite plaintext editor and trim it after (remove all lines following) the move producing the situation you wish diff --git a/complete-tromptaylor.gtp b/tools/complete-tromptaylor.gtp similarity index 100% rename from complete-tromptaylor.gtp rename to tools/complete-tromptaylor.gtp diff --git a/complete.gtp b/tools/complete.gtp similarity index 100% rename from complete.gtp rename to tools/complete.gtp diff --git a/genmove.gtp b/tools/genmove.gtp similarity index 100% rename from genmove.gtp rename to tools/genmove.gtp diff --git a/genmove19.gtp b/tools/genmove19.gtp similarity index 100% rename from genmove19.gtp rename to tools/genmove19.gtp diff --git a/gentbook.sh b/tools/gentbook.sh similarity index 100% rename from gentbook.sh rename to tools/gentbook.sh diff --git a/pattern3_show.pl b/tools/pattern3_show.pl similarity index 100% rename from pattern3_show.pl rename to tools/pattern3_show.pl diff --git a/sgf-analyse.pl b/tools/sgf-analyse.pl similarity index 81% rename from sgf-analyse.pl rename to tools/sgf-analyse.pl index 39ce2d3..d76c30a 100755 --- a/sgf-analyse.pl +++ b/tools/sgf-analyse.pl @@ -3,7 +3,7 @@ # Pachi will analyse each move in the SGF and suggest the winrate # for either player and winrate it estimated for in-game followup. # -# Usage: ./sgf-analyse.pl COLOR SGF PACHIARGS... +# Usage: tools/sgf-analyse.pl COLOR SGF PACHIARGS... # # Note that this script assumes dynkomi=none and does not show # dynamic komi information. (Would be trivial to add but it's tricky @@ -11,7 +11,7 @@ # # This script is dirty and insecure for untrusted input! # -# Example: ./sgf-analyse.pl W progame.sgf -t =2000 -d 0 dynkomi=none +# Example: tools/sgf-analyse.pl W progame.sgf -t =2000 -d 0 dynkomi=none # ...to get 2000 simulations per move, and winrates from white perspective. # # To plot the output in gnuplot: @@ -36,7 +36,7 @@ sub one { # included. my $line = $move + 3; # board_size, clearboard, komi my $rest = $line + 1; - open my $g, "./sgf2gtp.pl \"$sgf\" | sed -e '$line s/play \\(.*\\) \\(.*\\)/1 echo \\1 \\2\\n2 genmove \\1\\n3 pachi-result/' -e '$rest,\$ d' | ./zzgo @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' | ./zzgo @ARGV |" or die $!; # Parse the GTP output. my ($color, $realmove, $genmove, $winrate) = @_; @@ -61,5 +61,5 @@ sub one { print "# $sgf @ARGV\n"; -my $moves = `./sgf2gtp.pl \"$sgf\" | wc -l` - 3; +my $moves = `tools/sgf2gtp.pl \"$sgf\" | wc -l` - 3; one($_) for (1 .. $moves); diff --git a/sgf2gtp.pl b/tools/sgf2gtp.pl similarity index 100% rename from sgf2gtp.pl rename to tools/sgf2gtp.pl diff --git a/spirit.gtp b/tools/spirit.gtp similarity index 100% rename from spirit.gtp rename to tools/spirit.gtp diff --git a/twogtp.py b/tools/twogtp.py similarity index 100% rename from twogtp.py rename to tools/twogtp.py -- 2.11.4.GIT