Beginning of implementation of a ctypes-based interface to libboard, which is a much cleaner set of Go routines than I hacked together originally. Including a copy of gnugo 3.8 so we can build a dynamic version of libboard.
8
gnugo/AUTHORS
Normal file
|
@ -0,0 +1,8 @@
|
|||
GNU Go authors (in chronological order of contribution) are Man Li, Wayne
|
||||
Iba, Daniel Bump, David Denholm, Gunnar Farneback, Nils Lohner, Jerome
|
||||
Dumonteil, Tommy Thorn, Nicklas Ekstrand, Inge Wallin, Thomas Traber,
|
||||
Douglas Ridgway, Teun Burgers, Tanguy Urvoy, Thien-Thi Nguyen, Heikki
|
||||
Levanto, Mark Vytlacil, Adriaan van Kessel, Wolfgang Manner, Jens Yllman,
|
||||
Don Dailey, Mans Ullerstam, Arend Bayer, Trevor Morris, Evan Berggren
|
||||
Daniel, Fernando Portela, Paul Pogonyshev, S.P. Lee, Stéphane Nicolet,
|
||||
Martin Holters, Grzegorz Leszczynski and Lee Fisher.
|
51
gnugo/CMakeLists.txt
Normal file
|
@ -0,0 +1,51 @@
|
|||
PROJECT(GNUGo)
|
||||
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
CHECK_INCLUDE_FILES(sys/times.h HAVE_SYS_TIMES_H)
|
||||
CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
|
||||
CHECK_INCLUDE_FILES("sys/time.h;time.h" TIME_WITH_SYS_TIME)
|
||||
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
|
||||
CHECK_INCLUDE_FILES(curses.h HAVE_CURSES_H)
|
||||
CHECK_INCLUDE_FILES(glib.h HAVE_GLIB_H)
|
||||
CHECK_INCLUDE_FILES(ncurses/curses.h HAVE_NCURSES_CURSES_H)
|
||||
CHECK_INCLUDE_FILES(ncurses/term.h HAVE_NCURSES_TERM_H)
|
||||
CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
|
||||
CHECK_INCLUDE_FILES(term.h HAVE_TERM_H)
|
||||
CHECK_INCLUDE_FILES(crtdbg.h HAVE_CRTDBG_H)
|
||||
CHECK_INCLUDE_FILES("winsock.h;io.h" HAVE_WINSOCK_IO_H)
|
||||
|
||||
INCLUDE(CheckTypeSize)
|
||||
CHECK_TYPE_SIZE(long SIZEOF_LONG)
|
||||
|
||||
INCLUDE(CheckFunctionExists)
|
||||
CHECK_FUNCTION_EXISTS(times HAVE_TIMES)
|
||||
CHECK_FUNCTION_EXISTS(usleep HAVE_USLEEP)
|
||||
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
|
||||
CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
|
||||
CHECK_FUNCTION_EXISTS(_vsnprintf HAVE__VSNPRINTF)
|
||||
# FIXME: Probably necessary to add the glib library for this test to pass.
|
||||
CHECK_FUNCTION_EXISTS(g_vsnprintf HAVE_G_VSNPRINTF)
|
||||
|
||||
SET(PRAGMAS "")
|
||||
IF(WIN32)
|
||||
SET(PRAGMAS "#pragma warning(disable: 4244 4305)")
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(MSVC80)
|
||||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
ENDIF(MSVC80)
|
||||
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
# Make sure all files know about and can find config.h
|
||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# Recurse into subdirectories.
|
||||
ADD_SUBDIRECTORY(utils)
|
||||
ADD_SUBDIRECTORY(sgf)
|
||||
ADD_SUBDIRECTORY(engine)
|
||||
ADD_SUBDIRECTORY(patterns)
|
||||
ADD_SUBDIRECTORY(interface)
|
674
gnugo/COPYING
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
7962
gnugo/ChangeLog
Normal file
146
gnugo/INSTALL
Normal file
|
@ -0,0 +1,146 @@
|
|||
GNU GO INSTALLATION INSTRUCTIONS
|
||||
|
||||
Get the most recent tar file from ftp.gnu.org or a mirror (see
|
||||
http://www.gnu.org/order/ftp.html for a list).
|
||||
|
||||
Untar the sources, change to the directory gnugo-3.6. Now do:
|
||||
|
||||
./configure [OPTIONS]
|
||||
make
|
||||
|
||||
Several configure options will be explained below. You do not need to set
|
||||
these unless you are dissatisfied with GNU Go's performance or wish to vary
|
||||
the experimental options.
|
||||
|
||||
As an example,
|
||||
|
||||
./configure --enable-level=9 --enable-cosmic-gnugo
|
||||
|
||||
will make a binary in which the default level is 9, and the experimental
|
||||
"cosmic"' option is enabled. A list of all configure options can be obtained
|
||||
by running `./configure --help'. Further information about the experimental
|
||||
options can be found in the next section.
|
||||
|
||||
After running configure and make, you have now made a binary called
|
||||
`interface/gnugo'. Now (running as root) type
|
||||
|
||||
make install
|
||||
|
||||
to install gnugo in `/usr/local/bin'.
|
||||
|
||||
There are different methods of using GNU Go. You may run it from the
|
||||
command line by just typing:
|
||||
|
||||
gnugo
|
||||
|
||||
but it is nicer to run it using CGoban 1 (under X Window System) or Jago (on
|
||||
any platform with a Java Runtime Environment).
|
||||
|
||||
You can get the most recent version of CGoban 1 from
|
||||
http://sourceforge.net/projects/cgoban1/. The earlier version
|
||||
1.12 is available from http://www.igoweb.org/~wms/comp/cgoban/index.html.
|
||||
The CGoban version number MUST be 1.9.1 at least or it won't work. CGoban 2
|
||||
will not work.
|
||||
|
||||
See the file README for instructions on how to run GNU Go from Cgoban, or
|
||||
for Jago.
|
||||
|
||||
|
||||
RAM CACHE
|
||||
|
||||
By default, GNU Go makes a cache of 8 Megabytes in RAM for its
|
||||
internal use. The cache is used to store intermediate results during
|
||||
its analysis of the position.
|
||||
|
||||
Increasing the cache size will often give a modest speed improvement.
|
||||
If your system has lots of RAM, consider increasing the cache
|
||||
size. But if the cache is too large, swapping will occur,
|
||||
causing hard drive accesses and degrading performance. If
|
||||
your hard drive seems to be running excessively your cache
|
||||
may be too large. On GNU/Linux systems, you may detect swapping
|
||||
using the program 'top'. Use the 'f' command to toggle SWAP
|
||||
display.
|
||||
|
||||
You may override the size of the default cache at compile time
|
||||
by running one of:
|
||||
|
||||
./configure --enable-cache-size=n
|
||||
|
||||
To set the cache size to n. For example
|
||||
|
||||
./configure --enable-cache-size=48
|
||||
|
||||
creates a cache of size 48. If you omit this, your default
|
||||
cache size will be 8. You must recompile and reinstall GNU Go
|
||||
after reconfiguring it by running make and make install.
|
||||
|
||||
You may override the compile-time defaults by running gnugo with
|
||||
the option `--cache-size n', where n is the size (in megabytes) of
|
||||
the cache you want, and `--level n' where n is the level desired.
|
||||
We will discuss setting these parameters next in detail.
|
||||
|
||||
DEFAULT LEVEL
|
||||
|
||||
GNU Go can play at different levels. Up to level 10 is
|
||||
supported. At level 10 GNU Go is much more accurate but takes
|
||||
an average of about 1.6 times longer to play than at level 8.
|
||||
|
||||
The level can be set at run time using the --level option.
|
||||
If you don't set this, the default level will be used. You
|
||||
can set the default level with the configure option
|
||||
--enable-level=n. For example
|
||||
|
||||
./configure --enable-level=9
|
||||
|
||||
sets the default level to 9. If you omit this parameter,
|
||||
the compiler sets the default level to 10. We recommend
|
||||
using level 10 unless you find it too slow. If you decide
|
||||
you want to change the default you may rerun configure
|
||||
and recompile the program.
|
||||
|
||||
DFA
|
||||
|
||||
GNU Go has two versions of the pattern matcher. The default
|
||||
version uses a Discrete Finite Automaton (DFA). It can be
|
||||
disabled, giving the old matcher (which was the default in
|
||||
GNU Go 3.0) with './configure --disable-dfa'.
|
||||
|
||||
EXPERIMENTAL OPTIONS
|
||||
|
||||
--enable-experimental-semeai enables an experimental semeai
|
||||
module. This will result in an engine that is probably stronger
|
||||
but slightly slower and less debugged. It is not guaranteed
|
||||
that the semeai code could not cause crashes in some situations.
|
||||
|
||||
--enable-owl-threats will result in an engine that does more
|
||||
life and death analysis. It will be stronger but slower.
|
||||
|
||||
There are other experimental options but we only mention these.
|
||||
|
||||
WINDOWS
|
||||
|
||||
Windows installation is described in a separate file, called WINDOWS.
|
||||
|
||||
MACINTOSH
|
||||
|
||||
If you have Mac OS X you can build GNU Go using Apple's compiler,
|
||||
which is derived from GCC. We recommend adding the flag -no-cpp-precomp
|
||||
to CFLAGS.
|
||||
|
||||
THE MANUAL
|
||||
|
||||
You can obtain a printed copy of the manual by running 'make
|
||||
gnugo.ps' in the doc/ directory, then printing the resulting
|
||||
postscript file @file{gnugo.ps}. The manual contains a great
|
||||
deal of information about the algorithms of GNU Go. The first
|
||||
few sections serve as a user's manual.
|
||||
|
||||
On platforms supporting info documentation, you can usually
|
||||
install the manual by executing `make install' (running as
|
||||
root) from the doc/ directory. The info documentation can
|
||||
be read conveniently from within Emacs by executing the
|
||||
command `Control-h i'.
|
||||
|
||||
|
||||
|
||||
|
64
gnugo/Makefile.am
Normal file
|
@ -0,0 +1,64 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = utils sgf engine patterns interface doc regression
|
||||
|
||||
DISTCLEANFILES = *~
|
||||
|
||||
EXTRA_DIST = gnugo.dsw config.vc makevcdist.pl WINDOWS OSX CMakeLists.txt config.h.cmake stamp-h.in
|
||||
|
||||
maintainer-check:
|
||||
|
||||
# Tag before making distribution. Also, don't make a distribution if
|
||||
# checks fail. Also, make sure the NEWS file is up-to-date.
|
||||
cvs-dist: maintainer-check
|
||||
pkg=`echo "@PACKAGE@" | tr a-z A-Z`; \
|
||||
ver=`echo "@VERSION@" | sed 's/\./_/g'`; \
|
||||
tag="$$pkg-$$ver"; \
|
||||
echo tag=$$tag; \
|
||||
if cvs -n log -h README| grep -e $$tag > /dev/null; then \
|
||||
echo "VERSION not new; not releasing" 1>&2; \
|
||||
exit 1; \
|
||||
else :; \
|
||||
fi; \
|
||||
cvs tag -c $$tag
|
||||
$(MAKE) dist
|
||||
|
||||
dist-hook:
|
||||
cd $(distdir) \
|
||||
&& find . '(' -name '*.rej' -o -name '*.orig' ')' -exec rm '{}' ';'
|
||||
|
||||
vpathcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck
|
||||
-rm -rf $(distdir)
|
||||
@banner="Successful VPATH build for $(distdir).tar.gz"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
|
||||
acdir = m4
|
||||
@MAINT@aclocal-files: configure.in
|
||||
@MAINT@ echo 'acfiles = \' > $@-tmp
|
||||
@MAINT@ find $(acdir) -type f -name '*.m4' -print \
|
||||
@MAINT@ | sed 's!^!$(top_srcdir)/!' \
|
||||
@MAINT@ | tr '\012' ' ' \
|
||||
@MAINT@ >> $@-tmp
|
||||
@MAINT@ echo >> $@-tmp
|
||||
@MAINT@ mv $@-tmp $@
|
||||
|
||||
@MAINT@include aclocal-files
|
||||
|
||||
@MAINT@# Override default rule to use --acdir option
|
||||
@MAINT@$(srcdir)/aclocal.m4: configure.in $(acfiles)
|
||||
@MAINT@ cd $(srcdir) && aclocal --acdir=$(acdir)
|
655
gnugo/Makefile.in
Normal file
|
@ -0,0 +1,655 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(srcdir)/config.vcin $(top_srcdir)/configure AUTHORS COPYING \
|
||||
ChangeLog INSTALL NEWS THANKS TODO depcomp install-sh missing \
|
||||
mkinstalldirs
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = config.vc
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DFA_ENABLED_FALSE = @DFA_ENABLED_FALSE@
|
||||
DFA_ENABLED_TRUE = @DFA_ENABLED_TRUE@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GCC_MINOR_VERSION = @GCC_MINOR_VERSION@
|
||||
GCC_ONLY_FALSE = @GCC_ONLY_FALSE@
|
||||
GCC_ONLY_TRUE = @GCC_ONLY_TRUE@
|
||||
GNU_GO_WARNINGS = @GNU_GO_WARNINGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
glibconfig = @glibconfig@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = utils sgf engine patterns interface doc regression
|
||||
DISTCLEANFILES = *~
|
||||
EXTRA_DIST = gnugo.dsw config.vc makevcdist.pl WINDOWS OSX CMakeLists.txt config.h.cmake stamp-h.in
|
||||
acdir = m4
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
config.vc: $(top_builddir)/config.status $(srcdir)/config.vcin
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/.
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-recursive ctags \
|
||||
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
|
||||
dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-recursive \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-exec install-exec-am \
|
||||
install-info install-info-am install-man install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
|
||||
maintainer-check:
|
||||
|
||||
# Tag before making distribution. Also, don't make a distribution if
|
||||
# checks fail. Also, make sure the NEWS file is up-to-date.
|
||||
cvs-dist: maintainer-check
|
||||
pkg=`echo "@PACKAGE@" | tr a-z A-Z`; \
|
||||
ver=`echo "@VERSION@" | sed 's/\./_/g'`; \
|
||||
tag="$$pkg-$$ver"; \
|
||||
echo tag=$$tag; \
|
||||
if cvs -n log -h README| grep -e $$tag > /dev/null; then \
|
||||
echo "VERSION not new; not releasing" 1>&2; \
|
||||
exit 1; \
|
||||
else :; \
|
||||
fi; \
|
||||
cvs tag -c $$tag
|
||||
$(MAKE) dist
|
||||
|
||||
dist-hook:
|
||||
cd $(distdir) \
|
||||
&& find . '(' -name '*.rej' -o -name '*.orig' ')' -exec rm '{}' ';'
|
||||
|
||||
vpathcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck
|
||||
-rm -rf $(distdir)
|
||||
@banner="Successful VPATH build for $(distdir).tar.gz"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
@MAINT@aclocal-files: configure.in
|
||||
@MAINT@ echo 'acfiles = \' > $@-tmp
|
||||
@MAINT@ find $(acdir) -type f -name '*.m4' -print \
|
||||
@MAINT@ | sed 's!^!$(top_srcdir)/!' \
|
||||
@MAINT@ | tr '\012' ' ' \
|
||||
@MAINT@ >> $@-tmp
|
||||
@MAINT@ echo >> $@-tmp
|
||||
@MAINT@ mv $@-tmp $@
|
||||
|
||||
@MAINT@include aclocal-files
|
||||
|
||||
@MAINT@# Override default rule to use --acdir option
|
||||
@MAINT@$(srcdir)/aclocal.m4: configure.in $(acfiles)
|
||||
@MAINT@ cd $(srcdir) && aclocal --acdir=$(acdir)
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
92
gnugo/NEWS
Normal file
|
@ -0,0 +1,92 @@
|
|||
New in 3.8 (since 3.6)
|
||||
|
||||
- many small improvements and tuning since 3.6
|
||||
- experimental Monte Carlo mode (9x9 only)
|
||||
- support for tiny boards
|
||||
- GPL v3
|
||||
|
||||
New in 3.6 (since 3.4)
|
||||
|
||||
- stronger than 3.4
|
||||
- many small improvements
|
||||
- GNU Go can now resign games
|
||||
- emacs mode can display the board graphically using xpms
|
||||
- basic knowledge of how to break out of mirror go
|
||||
|
||||
New in 3.4 (since 3.2)
|
||||
|
||||
- stronger than 3.2
|
||||
- new connection and semeai modules use lookahead
|
||||
- new break-in code
|
||||
- improvements to many parts of the program
|
||||
|
||||
New in 3.2 (since 3.0)
|
||||
|
||||
- stronger than 3.0
|
||||
- uses less RAM than 3.0
|
||||
- 1-dimensional board
|
||||
- experimental dynamic connection analysis
|
||||
- experimental reading semeai module
|
||||
- new influence function
|
||||
- stronger and more agressive
|
||||
- reads to find combinations
|
||||
- revised Zobrist hashing
|
||||
- new html views of the regressions, and many more tests
|
||||
|
||||
New in 3.0 (since 2.6)
|
||||
|
||||
- stronger than 2.6
|
||||
- new move generation scheme
|
||||
- new influence function
|
||||
- more accurate reading
|
||||
- board information maintained incrementally during reading
|
||||
- new "owl" and "life" modules for accurate life and death analysis
|
||||
- persistent caching of reading and owl results for speed
|
||||
- revised semeai module
|
||||
- experimental Deterministic Finite State Automaton (DFA) pattern matcher
|
||||
- new debugging tools
|
||||
- level option
|
||||
|
||||
New in 2.6 (since 2.4)
|
||||
|
||||
- stronger than 2.4
|
||||
- more portable code
|
||||
- Texinfo documentation
|
||||
- Emacs mode
|
||||
|
||||
New in 2.4 (since 2.0)
|
||||
|
||||
Enhancements for the user:
|
||||
|
||||
- stronger: able to give GNU Go 2.0 a 5 stone handicap
|
||||
- life and death evaluation drastically improved
|
||||
- more efficient and accurate reading
|
||||
- (small) joseki database
|
||||
- takes influence and territory into account
|
||||
- Ascii interface as an alternative to CGoban
|
||||
- uses GNU configure
|
||||
- undo supported
|
||||
- man page
|
||||
|
||||
Enhancements for the developer:
|
||||
|
||||
- expanded pattern database
|
||||
- autohelpers for patterns
|
||||
- joseki library in Smart Go Format
|
||||
- fuseki module
|
||||
- backfilling and numerous other improvements to reading code
|
||||
- algorithms for estimating territory and influence
|
||||
- eye_finder module uses a static algorithm for life and death
|
||||
- eyeshape database
|
||||
- connection database
|
||||
- reading code uses Zobrist hashing and other speedups
|
||||
- greater modularity
|
||||
- documentation of key algorithms
|
||||
- expanded support for Smart Go Format
|
||||
- various debugging tools
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
9
gnugo/OSX
Normal file
|
@ -0,0 +1,9 @@
|
|||
If you have Mac OS X you can build GNU Go using Apple's compiler, which
|
||||
is derived from GCC. You will need Xcode.
|
||||
|
||||
One issue is that the configure test for socket support is too
|
||||
conservative. On OS/X, the configure test fails, but actually socket
|
||||
support exists. So if you want to be able to connect to the engine
|
||||
through tcp/ip (using gtp) you may `configure --enable-socket-support'.
|
||||
There will be an error message but you may build the engine and socket
|
||||
support should work.
|
244
gnugo/README
Normal file
|
@ -0,0 +1,244 @@
|
|||
GNU Go
|
||||
|
||||
This is GNU Go, a Go program. Development versions of GNU Go may be
|
||||
found at http://www.gnu.org/software/gnugo/devel.html. Consult TODO if
|
||||
you are interested in helping.
|
||||
|
||||
|
||||
Installation
|
||||
|
||||
In short, './configure; make' will build GNU Go; optionally (running
|
||||
as root) 'make install' will put it into /usr/local/bin and also
|
||||
install the man page. You also will probably want to install CGoban.
|
||||
See INSTALL for details.
|
||||
|
||||
|
||||
Documentation
|
||||
|
||||
User documentation can be obtained by running 'gnugo --help' or 'man
|
||||
gnugo' from any terminal.
|
||||
|
||||
Texinfo documentation includes instructions for users as well as
|
||||
documentation of GNU Go's algorithms and functions for programmers and
|
||||
developers. Use an info reader or emacs to read the info files, or run
|
||||
`make gnugo.dvi' or `make gnugo.ps' in the doc/ directory to get
|
||||
printed documentation. You can also make html documentation from the
|
||||
Texinfo files. One method of making html documentation is to run the
|
||||
command 'makeinfo --html gnugo.texi' in the doc/ directory.
|
||||
|
||||
|
||||
|
||||
Contact us at gnugo@gnu.org if you are interested in helping to
|
||||
develop this program.
|
||||
|
||||
|
||||
Running GNU Go via CGoban
|
||||
|
||||
This is an extremely nice way to run GNU Go. CGoban provides a
|
||||
beautiful graphic user interface under X Window System.
|
||||
|
||||
Start CGoban. When the CGoban Control panel comes up, select ``Go
|
||||
Modem''. You will get the Go Modem Protocol Setup. Choose one (or
|
||||
both) of the players to be ``Program,'' and fill out the box with the
|
||||
path to gnugo. After clicking OK, you get the Game Setup window.
|
||||
Choose ``Rules Set'' to be Japanese (otherwise handicaps won't work).
|
||||
Set the board size and handicap if you want. Click OK and you are
|
||||
ready to go.
|
||||
|
||||
In the Go Modem Protocol Setup window, when you specify the path to
|
||||
GNU Go, you can give it command line options, such as --quiet to
|
||||
suppress most messages. Since the Go Modem Protocol preempts standard
|
||||
I/O other messages are sent to stderr, even if they are not error
|
||||
messages. These will appear in the terminal from which you started
|
||||
CGoban.
|
||||
|
||||
If you want to play with a komi, you should bear in mind that
|
||||
the GMP does not have any provision for communicating the komi.
|
||||
Because of this misfeature, unless you set the komi at the command
|
||||
line GNU Go will have to guess it. It assumes the komi is 5.5 for
|
||||
even games, 0.5 for handicap games. If this is not what you want,
|
||||
you can specify the komi at the command line with the --komi
|
||||
option, in the Go Modem Protocol Setup window. You have to set
|
||||
the komi again in the Game Setup window, which comes up next.
|
||||
|
||||
Click OK and you are ready to go.
|
||||
|
||||
Other command line options can be listed by typing 'gnugo --help'
|
||||
-or- 'man gnugo' from any terminal, or by consulting the Texinfo
|
||||
documentation.
|
||||
|
||||
|
||||
Ascii Interface
|
||||
|
||||
Even if you do not have CGoban installed you can play with GNU Go
|
||||
using its default Ascii interface. Simply type `gnugo' at the command
|
||||
line, and GNU Go will draw a board. Typing `help' will give a list of
|
||||
options. At the end of the game, pass twice, and GNU Go will prompt you
|
||||
through the counting. You and GNU Go must agree on the dead groups--you
|
||||
can toggle the status of groups to be removed, and when you are done,
|
||||
GNU Go will report the score.
|
||||
|
||||
|
||||
GNU Go mode in Emacs
|
||||
|
||||
You can run GNU Go from Emacs. This has the advantage that you place
|
||||
the stones using the cursor arrow keys. This requires Emacs 20.4 or
|
||||
later. (Tested with Emacs 20.4. Does not work with 20.2.)
|
||||
|
||||
Load `interface/gnugo.el', either by `M-x load-file', or by adding a
|
||||
line
|
||||
|
||||
(autoload 'gnugo "gnugo" "GNU Go" t)
|
||||
|
||||
in your `.emacs' file. Now you may start GNU Go by `M-x gnugo'. You
|
||||
will be prompted for command line options *note Invoking GNU Go::.
|
||||
Using these, you may set the handicap, board size, color and komi.
|
||||
|
||||
You can enter commands from the GNU Go ASCII interface after
|
||||
typing `:'. For example, to take a move back, type `:back', or
|
||||
to list all commands, type `:help'.
|
||||
|
||||
Here are the default keybindings:
|
||||
|
||||
* `Return' or `Space'
|
||||
Select point as the next move. An error is signalled for
|
||||
invalid locations. Illegal locations, on the other hand,
|
||||
show up in the GNU Go Console buffer.
|
||||
|
||||
* `q' or `Q'
|
||||
Quit. Both Board and Console buffers are deleted.
|
||||
|
||||
* `R'
|
||||
Resign.
|
||||
|
||||
* `C-l'
|
||||
Refresh. Includes restoring default window configuration.
|
||||
|
||||
* `M-_'
|
||||
Bury both Board and Console buffers (when the boss is near).
|
||||
|
||||
* `p'
|
||||
Pass; i.e., select no location for your move.
|
||||
|
||||
* `:'
|
||||
Extended command. Type in a string to be passed directly to
|
||||
the inferior GNU Go process."
|
||||
|
||||
|
||||
|
||||
Running GNU Go via Jago
|
||||
|
||||
Jago, like CGoban is a client capable of providing GNU Go with a
|
||||
graphical user interface. Unlike CGoban, it does not require
|
||||
X Window System, so it is an attractive alternative under Windows.
|
||||
You will need a Java Runtime Environment. Obtain Jago at
|
||||
http://www.rene-grothmann.de/jago and follow the links there for the
|
||||
Java Runtime Environment.
|
||||
|
||||
|
||||
Go Modem Protocol
|
||||
|
||||
The Go Modem Protocol was developed by Bruce Wilcox with input from
|
||||
David Fotland, Anders Kierulf and others, according to the history in
|
||||
ftp://www.joy.ne.jp/welcome/igs/Go/programs/protocol.Z . Any Go
|
||||
program *should* use this protocol since it is standard. Since CGoban
|
||||
supports this protocol, the user interface for any Go program can be
|
||||
done entirely through CGoban. The programmer can concentrate on the
|
||||
real issues without worrying about drawing stones, resizing the board
|
||||
and other distracting issues.
|
||||
|
||||
|
||||
Options
|
||||
|
||||
A few options are described here. A more complete list
|
||||
may be found in the Texinfo documentation, or by running
|
||||
gnugo --help.
|
||||
|
||||
* `--help', `-h'.
|
||||
Print a help message describing the options. This will also
|
||||
tell you the defaults of various parameters, most importantly
|
||||
the level and cache size. The default values of these
|
||||
parameters can be set before compiling by `configure'. If
|
||||
you forget the defaults you can find out using `--help'.
|
||||
|
||||
* `--level LEVEL'
|
||||
GNU Go can play with different strengths and speeds. Level 10
|
||||
is the default. Decreasing the level will make GNU Go faster
|
||||
but less accurate in its reading.
|
||||
|
||||
* `--quiet', `--silent'
|
||||
Don't print copyright and other messages. Messages
|
||||
specifically requested by other command line options, such as
|
||||
`--trace', are not supressed.
|
||||
|
||||
* `-l', `--infile FILENAME'
|
||||
Load the named SGF file
|
||||
|
||||
* `-L', `--until MOVE'
|
||||
Stop loading just before the indicated move is played. MOVE
|
||||
can be either the move number or location.
|
||||
|
||||
* `-o', `--outfile FILENAME'
|
||||
Write sgf output to file
|
||||
|
||||
* `--mode MODE'
|
||||
Force the playing mode ('ascii', 'gmp' or 'gtp'). The
|
||||
default is ASCII, but if no terminal is detected GMP (Go
|
||||
Modem Protocol) will be assumed. In practice this is usually
|
||||
what you want, so you may never need this option.
|
||||
|
||||
|
||||
* `-M', `--cache-size MEGS'
|
||||
Memory in megabytes used for hashing. The default size is 8
|
||||
unless you configure gnugo with the command `configure
|
||||
--enable-cache-size=SIZE' before compiling to make SIZE
|
||||
the default.
|
||||
|
||||
|
||||
* `--chinese-rules'
|
||||
Use Chinese counting.
|
||||
|
||||
|
||||
* `--japanese-rules'
|
||||
Use Japanese Rules. This is the default unless you specify
|
||||
`--enable-chinese-rules' as a configure option.
|
||||
|
||||
* `--copyright': Display the copyright notice
|
||||
|
||||
* `--version' or `-v': Print the version number
|
||||
|
||||
* `--printsgf FILENAME': Create an SGF file containing a diagram of
|
||||
the board. Useful with `-L' to create diagrams from games.
|
||||
|
||||
|
||||
|
||||
|
||||
Copyrights and License
|
||||
|
||||
All files Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2007, 2008 and 2009 by the Free Software Foundation except as noted below.
|
||||
|
||||
All files are under the GNU General Public License, which may be
|
||||
found in the file COPYING, with the following exceptions.
|
||||
|
||||
* The files interface/gtp.c and gtp.h are copyright 2001 by
|
||||
the Free Software Foundation. In the interests of promoting
|
||||
the Go Text Protocol these two files are licensed under a less
|
||||
restrictive license than the GPL and are free for unrestricted use.
|
||||
The GTP license appears in each file.
|
||||
|
||||
* The files gmp.c and gmp.h are copyright Bill Shubert. These
|
||||
are free for unrestricted use.
|
||||
|
||||
* The files regression/golois/* and the tests vie.tst, connect.tst,
|
||||
capture.tst and global.tst are copyright Tristan Cazenave and are
|
||||
used with his permission
|
||||
|
||||
* The SGF files in regression/games/handtalk are copyright Jessie Annala
|
||||
and are used with permission.
|
||||
|
||||
* The SGF files in regression/games/mertin13x13 are copyright Stefan
|
||||
Mertin and are used with permission.
|
||||
|
||||
* The remaining SGF files are either copyright by the FSF or are in
|
||||
the public domain.
|
33
gnugo/THANKS
Normal file
|
@ -0,0 +1,33 @@
|
|||
Acknowledgements
|
||||
|
||||
We would like to thank Arthur Britto, David Doshay, Tim Hunt, Matthias Krings,
|
||||
Piotr Lakomy, Paul Leonard, Jean-Louis Martineau, Andreas Roever, Pierce
|
||||
Wetter, Joseph Piche, and Emanuele Cisbani for helpful correspondence.
|
||||
|
||||
Thanks to everyone who stepped on a bug (and sent us a report)!
|
||||
|
||||
Thanks to Gary Boos, Wietze Brandsma, Peter Gucwa, Martijn van der Kooij, Michael
|
||||
Margolis, Trevor Morris, Mans Ullerstam, Don Wagner, Yin Zheng for help
|
||||
with Visual C++.
|
||||
|
||||
Thanks to Allan Crossman, Pierce Wetter, Stephan Somogyi and Mathias Wagner
|
||||
for help with Macintosh. And thanks to Marco Scheurer and Shigeru Mabuchi for
|
||||
helping us find various problems.
|
||||
|
||||
Thanks to Jessie Annala for the Handtalk games, and to Stefan
|
||||
Mertin for the games from his 13x13 tournament.
|
||||
|
||||
Thanks to Ricard Vilà for creating the STS-RV semeai regression test
|
||||
suite and to Emanuele Cisbani for helping to port it to GNU Go.
|
||||
|
||||
Special thanks to Ebba Berggren for creating our logos, logo-34 and
|
||||
logo-36. Logo-34 is based on a design by Tanguy Urvoy and comments
|
||||
by Alan Crossman. The old GNU Go logo32 was adapted from Jamal
|
||||
Hannah's typing GNU: http://www.gnu.org/graphics/atypinggnu.html.
|
||||
|
||||
We would like to thank Stuart Cracraft, Richard Stallman and Man Lung Li for
|
||||
their interest in making this program a part of GNU, William Shubert for
|
||||
writing CGoban and gmp.c, Rene Grothmann for Jago and Erik van Riper and his
|
||||
collaborators for NNGS.
|
||||
|
||||
|
207
gnugo/TODO
Normal file
|
@ -0,0 +1,207 @@
|
|||
GNU Go Task List
|
||||
|
||||
You can help make GNU Go the best Go program.
|
||||
|
||||
This is a task-list for anyone who is interested in helping with GNU
|
||||
Go. If you want to work on such a project you should correspond with
|
||||
us until we reach a common vision of how the feature will work!
|
||||
|
||||
A note about copyright. Before any code can be accepted as a part of
|
||||
the official release of GNU Go, the Free Software Foundation will want
|
||||
you to sign a copyright disclaimer. Of course you can work on a forked
|
||||
version without signing such a disclaimer. If you want your changes to
|
||||
the program to be incorporated into the version we distribute we need
|
||||
such a disclaimer. Please contact the GNU Go maintainers, Daniel Bump
|
||||
(bump@sporadic.stanford.edu) and Gunnar Farneback
|
||||
(gunnar@lysator.liu.se), to get more information and the papers to
|
||||
sign.
|
||||
|
||||
Below is a list of things YOU could work on. We are already working on
|
||||
some of these tasks, but don't let that stop you. Please contact us or
|
||||
the person assigned to task for further discussion.
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// General
|
||||
//--------------------------------------------------------------
|
||||
|
||||
* If you can, send us bug FIXES as well as bug reports. If you see
|
||||
some bad behavior, figure out what causes it, and what to do about
|
||||
fixing it. And send us a patch! If you find an interesting bug and
|
||||
cannot tell us how to fix it, we would be happy to have you tell us
|
||||
about it anyway. Send us the sgf file (if possible) and attach
|
||||
other relevant information, such as the GNU Go version number. In
|
||||
cases of assertion failures and segmentation faults we probably
|
||||
want to know what operating system and compiler you were using, in
|
||||
order to determine if the problem is platform dependent.
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// smaller projects
|
||||
//--------------------------------------------------------------
|
||||
|
||||
These issues are of tactical nature, i.e. they concern some specific
|
||||
feature or the infrastructure of the engine. Some of these are quiet
|
||||
small, maybe doable in a day for an experienced GNU Go programmer.
|
||||
They might also be useful project to start with for a new project
|
||||
member. Some of them are bigger and demand a deeper knowledge of the
|
||||
engine internals. The issues are presented here in an approximate
|
||||
order of perceived difficulty.
|
||||
|
||||
* Add more checks in patterns/mkpat.c testing whether the main diagram and
|
||||
the constraint diagram are consistent.
|
||||
|
||||
* Break out handling of movelists into its own file and generalize it.
|
||||
This is started in 3.1.16. Move lists are used, among other places,
|
||||
in worms.c where it is used to store moves that capture, save,
|
||||
threaten to capture and threaten to save the worm.
|
||||
|
||||
* Implement move lists storing important moves for dragons and eyes
|
||||
in the same way as it is used for worms. Half eyes are already
|
||||
halfway done. The moves are stored, but not the attack and defend
|
||||
codes (LOSE, KO_A, KO_B and WIN).
|
||||
|
||||
* Make the cache not waste storage on 64 bit systems.
|
||||
|
||||
* The dragon data is split into two arrays, dragon[] and dragon2[].
|
||||
The dragon2 array only have one entry per dragon, in contrast to
|
||||
the dragon array where all the data is stored once for every
|
||||
intersection of the board. Complete the conversion of eye_data,
|
||||
half_eye_data, worm and dragon to use the same structure as the
|
||||
dragon2 array.
|
||||
|
||||
* Support for ko in eyes.db and optics.c.
|
||||
|
||||
* Integrate the time handling code in play_gtp.c with the autolevel
|
||||
code in clock.c. Alternatively, replace them both with something
|
||||
better. Basing it on some solid system identification theory and/or
|
||||
control theory wouldn't hurt.
|
||||
|
||||
* Write a script which plays through the joseki databases and checks
|
||||
that the engine really generates a joseki move for all positions in
|
||||
the databases. This would also be interesting to run with the
|
||||
--nojosekidb option.
|
||||
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// long term issues
|
||||
//--------------------------------------------------------------
|
||||
|
||||
|
||||
These issues are strategic in nature. They will help us to improve the
|
||||
playing strength of the program and/or enhance certain aspects of it.
|
||||
|
||||
* Extend the regression test suites.
|
||||
See the texinfo manual in the doc directory for a description of
|
||||
how to do this. In particular it would be useful with test suites
|
||||
for common life and death problems. Currently second line groups, L
|
||||
groups and the tripod shape are reasonably well covered, but there
|
||||
is for example almost nothing on comb formations, carpenter's
|
||||
square, and so on. Other areas where test suites would be most
|
||||
welcome are fuseki, tesuji, and endgame.
|
||||
|
||||
* Tuning the pattern databases. These are under constant revision. Tuning
|
||||
them is a sort of art. It is not necessary to do any programming to do
|
||||
this since most of the patterns do not require helpers. We would like it if
|
||||
a few more Dan level players would learn this skill.
|
||||
|
||||
* Extend and tune the Joseki database. It might be very useful to implement
|
||||
a semi-automatic way of doing this. The current method based on sgf files
|
||||
becomes difficult with existing tools.
|
||||
|
||||
* The semeai module is still in need of improvement. (This is underway.)
|
||||
|
||||
* GNU Go does not have a move generator that tries explicitly to build
|
||||
moyos, or reduce/invade opponent's moyos. Such a move generator could
|
||||
be built using the same type of code that is used in the owl life and
|
||||
death reader, or the connection reader mentioned in point 5 above.
|
||||
|
||||
* A much improved combination module. The combination module of
|
||||
today only finds combinations of threats to capture enemy groups.
|
||||
A more useful combination module would e.g. find combinations of
|
||||
threats to capture a group or enter opponent territory. It would
|
||||
also be strong enough to find combinations of strategic moves and
|
||||
more indirect threats (a threat to a threat). Possibly it could
|
||||
combine threats in AND-OR trees (DAGs?) that could be searched
|
||||
using ordinary tree search algorithms. (Revision of combination.c
|
||||
is underway.)
|
||||
|
||||
* Speed up the tactical reading. GNU Go is reasonably accurate when
|
||||
it comes to tactical reading, but not always very fast. The main
|
||||
problem is that too many ineffective moves are tested, leading to
|
||||
strange variations that shouldn't need consideration. To improve
|
||||
one could refine the move generation heuristics in the reading.
|
||||
Also, one should implement some more of the standard tree search
|
||||
optimizations used in alpha-beta readers.
|
||||
|
||||
* Improve the heuristics for assessment of the safety of a
|
||||
group. This might take into account number of eyes / half eyes,
|
||||
moyo in corners, moyo along the edge, moyo in the center, proximity
|
||||
to living friendly groups, weak opponent groups etc. It is of
|
||||
particular interest to be able to accurately determine how a move
|
||||
affects the safety of all groups on the board.
|
||||
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Ideas
|
||||
//--------------------------------------------------------------
|
||||
|
||||
|
||||
These are some ideas that have been floated on the mailing list. Some
|
||||
of them are down-to-earth, and some are just blue sky ramblings. They
|
||||
are presented here for inspiration.
|
||||
|
||||
* A good GUI.
|
||||
A start is being made with GoThic, a goban widget based on the Qt
|
||||
toolkit. This is linked from the GNU Go development web page on
|
||||
gnu.org. Other starts have been made based on GTK+, but so far
|
||||
nothing more than a start has been attempted.
|
||||
|
||||
* A graphical pattern editor.
|
||||
This would make it much easier for non-programmers to improve the
|
||||
strength of GNU Go. It could also be used as a debugging tool for
|
||||
the programmers. This project has the GUI as a prerequisite.
|
||||
The challenge here is not to make a tool which makes it easier to
|
||||
create patterns but to make it easier to overview and maintain the
|
||||
database.
|
||||
|
||||
* Make the engine thread safe and use multiple CPUs on an SMP
|
||||
machine.
|
||||
|
||||
* Making the engine use many machines loosely connected on the
|
||||
internet or in a cluster.
|
||||
|
||||
* Think on the opponent's time.
|
||||
|
||||
* A global alpha-beta reader. This would probably be very slow and
|
||||
could only read 2 or 3 moves ahead. Still it could find fatal
|
||||
errors and improve the moves that GNU Go makes.
|
||||
|
||||
* A strategic module that identifies high-level goals and then gives
|
||||
these goals to the rest of the engine. It should be able to
|
||||
identify if we are ahead in territory or thickness, if we should
|
||||
play safe or if we should play daringly (e.g. if behind). It
|
||||
should also identify weak areas where we can attack or where we
|
||||
should defend. Maybe this module doesn't have to be written in C.
|
||||
Maybe PROLOG, LISP or some other AI language would be better.
|
||||
|
||||
* A parameter that makes GNU Go play different styles. Such styles
|
||||
could be 'play for territory', 'play aggressively', 'play tricky
|
||||
moves (hamete)', and so on. It could be used to present human
|
||||
users with different kinds of opponents or to tell GNU Go how to
|
||||
play certain computer opponents in tournaments.
|
||||
|
||||
* Generalize representation and handling of threats so that we have a
|
||||
graph representation of threats that can be searched to see how
|
||||
different threats interact.
|
||||
|
||||
* An endgame module based on ideas from combinatorial game theory.
|
||||
To be really useful this would have to deal with early endgame
|
||||
positions.
|
||||
|
||||
* Fuseki tuning by hand is difficult. People who are interested
|
||||
in doing machine learning experiments with GNU Go could try
|
||||
working with fuseki. This may be one of the areas with most
|
||||
potential for substantial and reasonably quick improvements.
|
||||
|
||||
* Create a paradigm for handling other types of ko (approach move ko,
|
||||
multi-step ko, etc) and then write code that handles them.
|
||||
|
183
gnugo/WINDOWS
Normal file
|
@ -0,0 +1,183 @@
|
|||
Building GNU Go on Windows Platforms
|
||||
|
||||
==========================
|
||||
|
||||
|
||||
BUILDING WITH OLDER VISUAL STUDIO
|
||||
|
||||
The distribution directories contain some .dsp and .dsw files with
|
||||
GNU Go. These have been brought up to date in the sense that they
|
||||
should work if you have the older VC++ with Visual Studio 6
|
||||
but the distributed .dsp and .dsw files will only be of use with
|
||||
older version of Visual Studio.
|
||||
|
||||
In most cases (unless you are building in Cygwin) the preferred way
|
||||
to build GNU Go on Windows platforms is to use CMake. CMake
|
||||
understands about many versions of Visual C/Visual Studio, and will
|
||||
generate project/solution files for the tools installed on your
|
||||
system. So even if you have Visual Studio 6 you may use CMake
|
||||
and dispense with the distributed .dsp and .dsw files.
|
||||
|
||||
==========================
|
||||
|
||||
BUILDING WITH VISUAL STUDIO PROJECT FILES
|
||||
|
||||
Before you compile the GNU Go source, you need to run CMake first, to
|
||||
generate the build files you'll give to Visual Studio.
|
||||
|
||||
From the cmd.exe command prompt, CD into the GNU Go source directory.
|
||||
To confirm you're in the right place, you should see the file
|
||||
'CMakeLists.txt' in the top-level directory of the GNU Go code (as well
|
||||
as others in lower subdirectories).
|
||||
|
||||
Direct CMake to generate the new Visual Studio build files by typing:
|
||||
|
||||
cmake CMakeLists.txt
|
||||
|
||||
Compile the code by invoking the newly-created Solution file:
|
||||
|
||||
vcbuild GNUGo.sln
|
||||
|
||||
This will take a few moments, as CMake generates 4 debug/retail targets:
|
||||
|
||||
debug
|
||||
release
|
||||
minsizerel
|
||||
relwithdebinfo
|
||||
|
||||
For each of these targets, Visual Studio is generating a version of
|
||||
gnugo.exe:
|
||||
|
||||
interface\debug\gnugo.exe
|
||||
interface\release\gnugo.exe
|
||||
interface\minsizerel\gnugo.exe
|
||||
interface\relwithdebinfo\gnugo.exe
|
||||
|
||||
Additionally, there is an 'Install' target available, that will copy the
|
||||
the gnugo.exe into the %ProgramFiles% directory. To do this, type:
|
||||
|
||||
vcbuild INSTALL.vcproj
|
||||
|
||||
This should result in copying GNU/Go into:
|
||||
|
||||
"%ProgramFiles%\GNUGo\bin\gnugo.exe" --options
|
||||
|
||||
In addition to command line use, CMake also has a GUI version. Users of
|
||||
the Visual Studio GUI might prefer to use that.
|
||||
|
||||
==========================
|
||||
|
||||
BUILDING WITH NMAKE MAKEFILES
|
||||
|
||||
GNU Go will also build using NMake makefiles. Optionally, instead of
|
||||
Visual Studio project/solution files, you may direct CMake to generate
|
||||
NMake makefiles. To generate the makefiles:
|
||||
|
||||
cmake -G "NMake Makefiles" CMakeLists.txt
|
||||
|
||||
The default rule for the makefile is 'all'. Use the 'help' rule to show
|
||||
a list of available targets.
|
||||
|
||||
nmake -f Makefile help
|
||||
|
||||
To compile GNU Go:
|
||||
|
||||
nmake -f Makefile all
|
||||
|
||||
On some systems, GNU GO may fail to build when using NMake makefiles. It
|
||||
only fails the first time run, run NMake again with the 'clean all'
|
||||
targets, and it will compile the second and subsequent times.
|
||||
|
||||
nmake -f Makefile clean all
|
||||
|
||||
Which will successfully generate a gnugo.exe.
|
||||
|
||||
interface\gnugo.exe --options
|
||||
|
||||
==========================
|
||||
|
||||
BUILDING WITH MINGW MAKEFILES:
|
||||
|
||||
GNU Go can be built on Windows systems using MinGW.
|
||||
|
||||
This development environment uses: the GCC compiler (gcc.exe, not
|
||||
cl.exe), the Microsoft C runtime libraries (MSCRT, not GLibC), the GNU
|
||||
Make build tool (mingw32-make.exe, not NMake), all from the Windows
|
||||
shell (cmd.exe, not sh/bash).
|
||||
|
||||
For CMake to work, in addition to the base MinGW installation, the C++
|
||||
compiler (g++.exe) and GNU Make (mingw32-make.exe) need to be installed.
|
||||
This was tested using GCC v3, not the experimental v4. To debug, use
|
||||
GDB, as the GCC-generated symbols won't work with NTSD/Windbg/Visual Studio.
|
||||
|
||||
To create the makfiles, run CMake with the MinGW generator option:
|
||||
|
||||
cmake -G "MinGW Makefiles" CMakeLists.txt
|
||||
|
||||
To build GNU Go, from a cmd.exe shell, run GNU Make (against the
|
||||
newly-created 'Makefile' and it's default 'all' target):
|
||||
|
||||
mingw32-make
|
||||
..\interface\gnugo.exe --options
|
||||
|
||||
==========================
|
||||
|
||||
BUILDING WITH MSYS MAKEFILES (MinGW)
|
||||
|
||||
GNU Go can be built on Windows systems using MSYS.
|
||||
|
||||
This development environment uses: the GCC compiler (gcc.exe, not
|
||||
cl.exe), the Microsoft C runtime libraries (MSCRT, not GLibC), the GNU
|
||||
Make build tool (make, not NMake), all from the GNU Bash (sh.exe, not
|
||||
cmd.exe).
|
||||
|
||||
To create the makfiles, run CMake with the MSYS generator option:
|
||||
|
||||
cmake -G "MSYS Makefiles" CMakeLists.txt
|
||||
|
||||
Start MSYS's Bash shell, either clicking on a shortcut on from the
|
||||
command line:
|
||||
|
||||
cd /d c:\msys\1.0
|
||||
msys.bat
|
||||
|
||||
To build GNU Go, from a Bash shell, run GNU Make (against the
|
||||
newly-created 'Makefile' and it's default 'all' target):
|
||||
|
||||
make
|
||||
../interface/gnugo.exe --options
|
||||
|
||||
To debug, use GDB, as the GCC-generated symbols won't work with
|
||||
NTSD/Windbg/Visual Studio.
|
||||
|
||||
==========================
|
||||
|
||||
BUILDING ON CYGWIN
|
||||
|
||||
With Cygwin, you should be able to
|
||||
|
||||
tar zxvf gnugo-3.8.tar.gz
|
||||
cd gnugo-3.8
|
||||
env CC='gcc -mno-cygwin' ./configure
|
||||
make
|
||||
|
||||
==========================
|
||||
|
||||
Testing on Windows:
|
||||
|
||||
Regress.cmd is a simplified cmd.exe-centric port of the main gnugo Unix
|
||||
shell script regress.sh. It can be used to help verify that the
|
||||
generated binary might be operational. Read the script's comment header
|
||||
for more information. For access to the full GNU Go tests, use Unix, not
|
||||
Windows.
|
||||
|
||||
To test:
|
||||
|
||||
cd regression
|
||||
regress.cmd ..\interface\gnugo.exe
|
||||
|
||||
==========================
|
||||
|
||||
|
||||
|
||||
|
891
gnugo/aclocal.m4
vendored
Normal file
|
@ -0,0 +1,891 @@
|
|||
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
||||
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.9.6])])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||
#
|
||||
# Of course, Automake must honor this variable whenever it calls a
|
||||
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||
# depending on how configure is run. This is pretty annoying, since
|
||||
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||
# source directory, any form will work fine, but in subdirectories a
|
||||
# relative path needs to be adjusted first.
|
||||
#
|
||||
# $ac_aux_dir/missing
|
||||
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||
# $top_srcdir/$ac_aux_dir/missing
|
||||
# fails if $ac_aux_dir is absolute,
|
||||
# fails when called from a subdirectory in a VPATH build with
|
||||
# a relative $ac_aux_dir
|
||||
#
|
||||
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||
# harmless because $srcdir is `.', but things will broke when you
|
||||
# start a VPATH build or use an absolute $srcdir.
|
||||
#
|
||||
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||
# and then we would define $MISSING as
|
||||
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# This will work as long as MISSING is not called from configure, because
|
||||
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||
# However there are other variables, like CC, which are often used in
|
||||
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||
#
|
||||
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ(2.52)dnl
|
||||
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])
|
||||
AC_SUBST([$1_FALSE])
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
# will think it sees a *use*, and therefore will trigger all it's
|
||||
# C support machinery. Also note that it means that autoscan, seeing
|
||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||
# dependency, and given that the user is not expected to run this macro,
|
||||
# just rely on AC_PROG_CC.
|
||||
AC_DEFUN([_AM_DEPENDENCIES],
|
||||
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
# AM_SET_DEPDIR
|
||||
# -------------
|
||||
# Choose a directory name for dependency files.
|
||||
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||
AC_DEFUN([AM_SET_DEPDIR],
|
||||
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_DEP_TRACK
|
||||
# ------------
|
||||
AC_DEFUN([AM_DEP_TRACK],
|
||||
[AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 3
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# So let's grep whole file.
|
||||
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
|
||||
|
||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# -----------------------------
|
||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||
#
|
||||
# This code is only required when automatic dependency tracking
|
||||
# is enabled. FIXME. This creates each `.P' file that we will
|
||||
# need in order to bootstrap the dependency handling code.
|
||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
|
||||
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 12
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||
# -----------------------------------------------
|
||||
# The call with PACKAGE and VERSION arguments is the old style
|
||||
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||
# and VERSION should now be passed to AC_INIT and removed from
|
||||
# the call to AM_INIT_AUTOMAKE.
|
||||
# We support both call styles for the transition. After
|
||||
# the next Automake release, Autoconf can make the AC_INIT
|
||||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.58])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
||||
test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
_AM_IF_OPTION([no-define],,
|
||||
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||
|
||||
# Some tools Automake needs.
|
||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||
AM_PROG_INSTALL_SH
|
||||
AM_PROG_INSTALL_STRIP
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||
# loop where config.status creates the headers, so we can generate
|
||||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[# Compute $1's index in $config_headers.
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$1 | $1:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
||||
AC_SUBST(install_sh)])
|
||||
|
||||
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
[rm -rf .tst 2>/dev/null
|
||||
mkdir .tst 2>/dev/null
|
||||
if test -d .tst; then
|
||||
am__leading_dot=.
|
||||
else
|
||||
am__leading_dot=_
|
||||
fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode is disabled by default
|
||||
AC_ARG_ENABLE(maintainer-mode,
|
||||
[ --enable-maintainer-mode enable make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer],
|
||||
USE_MAINTAINER_MODE=$enableval,
|
||||
USE_MAINTAINER_MODE=no)
|
||||
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
||||
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
AC_SUBST(MAINT)dnl
|
||||
]
|
||||
)
|
||||
|
||||
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||
[am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it supports --run.
|
||||
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN([`missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
|
||||
#
|
||||
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
|
||||
# created by `make install' are always world readable, even if the
|
||||
# installer happens to have an overly restrictive umask (e.g. 077).
|
||||
# This was a mistake. There are at least two reasons why we must not
|
||||
# use `-m 0755':
|
||||
# - it causes special bits like SGID to be ignored,
|
||||
# - it may be too restrictive (some setups expect 775 directories).
|
||||
#
|
||||
# Do not use -m 0755 and let people choose whatever they expect by
|
||||
# setting umask.
|
||||
#
|
||||
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
|
||||
# Some implementations (such as Solaris 8's) are not thread-safe: if a
|
||||
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
|
||||
# concurrently, both version can detect that a/ is missing, but only
|
||||
# one can create it and the other will error out. Consequently we
|
||||
# restrict ourselves to GNU make (using the --version option ensures
|
||||
# this.)
|
||||
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
# We used to keeping the `.' as first argument, in order to
|
||||
# allow $(mkdir_p) to be used without argument. As in
|
||||
# $(mkdir_p) $(somedir)
|
||||
# where $(somedir) is conditionally defined. However this is wrong
|
||||
# for two reasons:
|
||||
# 1. if the package is installed by a user who cannot write `.'
|
||||
# make install will fail,
|
||||
# 2. the above comment should most certainly read
|
||||
# $(mkdir_p) $(DESTDIR)$(somedir)
|
||||
# so it does not work when $(somedir) is undefined and
|
||||
# $(DESTDIR) is not.
|
||||
# To support the latter case, we have to write
|
||||
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
|
||||
# so the `.' trick is pointless.
|
||||
mkdir_p='mkdir -p --'
|
||||
else
|
||||
# On NextStep and OpenStep, the `mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because `.' already
|
||||
# exists.
|
||||
for d in ./-p ./--version;
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
|
||||
if test -f "$ac_aux_dir/mkinstalldirs"; then
|
||||
mkdir_p='$(mkinstalldirs)'
|
||||
else
|
||||
mkdir_p='$(install_sh) -d'
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([mkdir_p])])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
# _AM_SET_OPTION(NAME)
|
||||
# ------------------------------
|
||||
# Set option NAME. Presently that only means defining a flag for this option.
|
||||
AC_DEFUN([_AM_SET_OPTION],
|
||||
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
|
||||
# _AM_SET_OPTIONS(OPTIONS)
|
||||
# ----------------------------------
|
||||
# OPTIONS is a space-separated list of Automake options.
|
||||
AC_DEFUN([_AM_SET_OPTIONS],
|
||||
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
|
||||
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||
# -------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftest.file
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftest.file`
|
||||
fi
|
||||
rm -f conftest.file
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor `install' (even GNU) is that you can't
|
||||
# specify the program used to strip binaries. This is especially
|
||||
# annoying in cross-compiling environments, where the build's strip
|
||||
# is unlikely to handle the host's binaries.
|
||||
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||
# always use install-sh in `make install-strip', and initialize
|
||||
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using `strip' when the user
|
||||
# run `make install-strip'. However `strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the `STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||
#
|
||||
# Substitute a variable $(am__tar) that is a command
|
||||
# writing to stdout a FORMAT-tarball containing the directory
|
||||
# $tardir.
|
||||
# tardir=directory && $(am__tar) > result.tar
|
||||
#
|
||||
# Substitute a variable $(am__untar) that extract such
|
||||
# a tarball read from stdin.
|
||||
# $(am__untar) < result.tar
|
||||
AC_DEFUN([_AM_PROG_TAR],
|
||||
[# Always define AMTAR for backward compatibility.
|
||||
AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||
[m4_case([$1], [ustar],, [pax],,
|
||||
[m4_fatal([Unknown tar format])])
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
# Loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
# Do not fold the above two line into one, because Tru64 sh and
|
||||
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||
for _am_tool in $_am_tools
|
||||
do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar;
|
||||
do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
131
gnugo/config.h.cmake
Normal file
|
@ -0,0 +1,131 @@
|
|||
/* Ruleset. Default Japanese */
|
||||
#define CHINESE_RULES 0
|
||||
|
||||
/* Allow resignation. Default enabled */
|
||||
#define RESIGNATION_ALLOWED 1
|
||||
|
||||
/* Default level (strength). Up to 10 supported */
|
||||
#define DEFAULT_LEVEL 10
|
||||
|
||||
/* Center oriented influence. Disabled by default. */
|
||||
#define COSMIC_GNUGO 0
|
||||
|
||||
/* Owl Node Limit. 1000 default. */
|
||||
#define OWL_NODE_LIMIT 1000
|
||||
|
||||
/* Semeai Variations. 500 default */
|
||||
#define SEMEAI_NODE_LIMIT 500
|
||||
|
||||
/* Default hash table size in megabytes */
|
||||
#define DEFAULT_MEMORY -1
|
||||
|
||||
/* Compile support for GTP communication over TCP/IP channel. */
|
||||
#undef ENABLE_SOCKET_SUPPORT
|
||||
|
||||
/* GAIN/LOSS codes. Disabled by default. */
|
||||
#define EXPERIMENTAL_OWL_EXT 0
|
||||
|
||||
/* Large Scale Captures. Disabled by default. */
|
||||
#define LARGE_SCALE 0
|
||||
|
||||
/* Oracle. Default not enabled. */
|
||||
#define ORACLE 0
|
||||
|
||||
/* Owl Threats. 0 standard. */
|
||||
#define OWL_THREATS 0
|
||||
|
||||
/* Break-in module. Enabled by default. */
|
||||
#define USE_BREAK_IN 1
|
||||
|
||||
/* Connection module. Default experimental. */
|
||||
#define EXPERIMENTAL_CONNECTIONS 1
|
||||
|
||||
/* Connection module. Default standard. */
|
||||
#define ALTERNATE_CONNECTIONS 1
|
||||
|
||||
/* Define as 1 to use the grid optimisation, or 2 to run it in self-test mode
|
||||
*/
|
||||
#define GRID_OPT 1
|
||||
|
||||
/* Define to use ansi escape sequences for color debugging */
|
||||
#undef ANSI_COLOR
|
||||
|
||||
/* Define to 1 if you have the <curses.h> header file. */
|
||||
#cmakedefine HAVE_CURSES_H 1
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#cmakedefine HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the <glib.h> header file. */
|
||||
#cmakedefine HAVE_GLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `g_vsnprintf' function. */
|
||||
#cmakedefine HAVE_G_VSNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the <ncurses/curses.h> header file. */
|
||||
#cmakedefine HAVE_NCURSES_CURSES_H 1
|
||||
|
||||
/* Define to 1 if you have the <ncurses/term.h> header file. */
|
||||
#cmakedefine HAVE_NCURSES_TERM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/times.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TIMES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <term.h> header file. */
|
||||
#cmakedefine HAVE_TERM_H 1
|
||||
|
||||
/* Define to 1 if you have the <crtdbg.h> header file. */
|
||||
#cmakedefine HAVE_CRTDBG_H 1
|
||||
|
||||
/* Define to 1 if you have the <winsock.h> and <io.h> header files. */
|
||||
#cmakedefine HAVE_WINSOCK_IO_H 1
|
||||
|
||||
/* Define to 1 if you have the `times' function. */
|
||||
#cmakedefine HAVE_TIMES 1
|
||||
|
||||
/* Define if your compiler supports transparent unions */
|
||||
#undef HAVE_TRANSPARENT_UNIONS
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#cmakedefine HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `usleep' function. */
|
||||
#cmakedefine HAVE_USLEEP 1
|
||||
|
||||
/* Define if #define can take a variable number of arguments */
|
||||
#undef HAVE_VARIADIC_DEFINE
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#cmakedefine HAVE_VSNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `_vsnprintf' function. */
|
||||
#cmakedefine HAVE__VSNPRINTF 1
|
||||
|
||||
/* Enable GNU Readline support */
|
||||
#undef READLINE
|
||||
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
#cmakedefine SIZEOF_LONG ${SIZEOF_LONG}
|
||||
|
||||
/* Define to 1 if termcap/terminfo is available. */
|
||||
#undef TERMINFO
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#cmakedefine TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define special valgrind macros. */
|
||||
#undef USE_VALGRIND
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "3.8"
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
${PRAGMAS}
|
167
gnugo/config.h.in
Normal file
|
@ -0,0 +1,167 @@
|
|||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Connection module. Default standard. */
|
||||
#undef ALTERNATE_CONNECTIONS
|
||||
|
||||
/* Define to use ansi escape sequences for color debugging */
|
||||
#undef ANSI_COLOR
|
||||
|
||||
/* Ruleset. Default Japanese */
|
||||
#undef CHINESE_RULES
|
||||
|
||||
/* Center oriented influence. Disabled by default. */
|
||||
#undef COSMIC_GNUGO
|
||||
|
||||
/* Default level (strength). Up to 10 supported */
|
||||
#undef DEFAULT_LEVEL
|
||||
|
||||
/* Default hash table size in megabytes */
|
||||
#undef DEFAULT_MEMORY
|
||||
|
||||
/* Compile support for GTP communication over TCP/IP channel. */
|
||||
#undef ENABLE_SOCKET_SUPPORT
|
||||
|
||||
/* Connection module. Default experimental. */
|
||||
#undef EXPERIMENTAL_CONNECTIONS
|
||||
|
||||
/* GAIN/LOSS codes. Disabled by default. */
|
||||
#undef EXPERIMENTAL_OWL_EXT
|
||||
|
||||
/* The concatenation of the strings "GNU ", and PACKAGE. */
|
||||
#undef GNU_PACKAGE
|
||||
|
||||
/* Define as 1 to use the grid optimisation, or 2 to run it in self-test mode
|
||||
*/
|
||||
#undef GRID_OPT
|
||||
|
||||
/* Define to 1 if you have the <curses.h> header file. */
|
||||
#undef HAVE_CURSES_H
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the <glib.h> header file. */
|
||||
#undef HAVE_GLIB_H
|
||||
|
||||
/* Define to 1 if you have the `g_vsnprintf' function. */
|
||||
#undef HAVE_G_VSNPRINTF
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <ncurses/curses.h> header file. */
|
||||
#undef HAVE_NCURSES_CURSES_H
|
||||
|
||||
/* Define to 1 if you have the <ncurses/term.h> header file. */
|
||||
#undef HAVE_NCURSES_TERM_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/times.h> header file. */
|
||||
#undef HAVE_SYS_TIMES_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <term.h> header file. */
|
||||
#undef HAVE_TERM_H
|
||||
|
||||
/* Define to 1 if you have the `times' function. */
|
||||
#undef HAVE_TIMES
|
||||
|
||||
/* Define if your compiler supports transparent unions */
|
||||
#undef HAVE_TRANSPARENT_UNIONS
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `usleep' function. */
|
||||
#undef HAVE_USLEEP
|
||||
|
||||
/* Define if #define can take a variable number of arguments */
|
||||
#undef HAVE_VARIADIC_DEFINE
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
/* Large Scale Captures. Disabled by default. */
|
||||
#undef LARGE_SCALE
|
||||
|
||||
/* Oracle. Default not enabled. */
|
||||
#undef ORACLE
|
||||
|
||||
/* Owl Node Limit */
|
||||
#undef OWL_NODE_LIMIT
|
||||
|
||||
/* Owl Threats. 0 standard. */
|
||||
#undef OWL_THREATS
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Enable GNU Readline support */
|
||||
#undef READLINE
|
||||
|
||||
/* Allow resignation. Default enabled */
|
||||
#undef RESIGNATION_ALLOWED
|
||||
|
||||
/* Semeai Variations. 500 default */
|
||||
#undef SEMEAI_NODE_LIMIT
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if termcap/terminfo is available. */
|
||||
#undef TERMINFO
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Break-in module. Enabled by default. */
|
||||
#undef USE_BREAK_IN
|
||||
|
||||
/* Define special valgrind macros. */
|
||||
#undef USE_VALGRIND
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
82
gnugo/config.vc
Normal file
|
@ -0,0 +1,82 @@
|
|||
/* This is the Microsoft Visual C++ version of config.h *
|
||||
* Replace the distributed config.h with this file *
|
||||
* See config.h.in for comments on the meanings of most of the *
|
||||
* defines. This file is autogenerated. Do not modify it. *
|
||||
* See instead, the perl script makevcdist.pl */
|
||||
|
||||
#define HAVE_CRTDBG_H 1
|
||||
#define HAVE_WINSOCK_IO_H 1
|
||||
#define HAVE__VSNPRINTF 1
|
||||
|
||||
/* Connection module. Default standard. */
|
||||
#define ALTERNATE_CONNECTIONS 1
|
||||
|
||||
/* Ruleset. Default Japanese */
|
||||
#define CHINESE_RULES 0
|
||||
|
||||
/* Center oriented influence. Disabled by default. */
|
||||
#define COSMIC_GNUGO 0
|
||||
|
||||
/* Default level (strength). Up to 10 supported */
|
||||
#define DEFAULT_LEVEL 10
|
||||
|
||||
/* Default hash table size in megabytes */
|
||||
#define DEFAULT_MEMORY 8
|
||||
|
||||
/* Compile support for GTP communication over TCP/IP channel. */
|
||||
#define ENABLE_SOCKET_SUPPORT 1
|
||||
|
||||
/* Connection module. Default experimental. */
|
||||
#define EXPERIMENTAL_CONNECTIONS 1
|
||||
|
||||
/* GAIN/LOSS codes. Disabled by default. */
|
||||
#define EXPERIMENTAL_OWL_EXT 0
|
||||
|
||||
/* Define as 1 to use the grid optimisation, or 2 to run it in self-test mode
|
||||
*/
|
||||
#define GRID_OPT 1
|
||||
|
||||
/* Large Scale Captures. Disabled by default. */
|
||||
#define LARGE_SCALE 0
|
||||
|
||||
/* Oracle. Default not enabled. */
|
||||
#define ORACLE 0
|
||||
|
||||
/* Owl Node Limit */
|
||||
#define OWL_NODE_LIMIT 1000
|
||||
|
||||
/* Owl Threats. 0 standard. */
|
||||
#define OWL_THREATS 0
|
||||
|
||||
/* Enable GNU Readline support */
|
||||
#define READLINE 0
|
||||
|
||||
/* Allow resignation. Default enabled */
|
||||
#define RESIGNATION_ALLOWED 1
|
||||
|
||||
/* Semeai Variations. 500 default */
|
||||
#define SEMEAI_NODE_LIMIT 500
|
||||
|
||||
/* Break-in module. Enabled by default. */
|
||||
#define USE_BREAK_IN 1
|
||||
|
||||
/* Define special valgrind macros. */
|
||||
#define USE_VALGRIND 0
|
||||
|
||||
|
||||
/* Version number of package */
|
||||
#define PACKAGE "gnugo"
|
||||
|
||||
/* The concatenation of the strings "GNU ", and PACKAGE. */
|
||||
#define GNU_PACKAGE "GNU " PACKAGE
|
||||
|
||||
/* The number of bytes in a int. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The number of bytes in a long. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "3.8"
|
||||
|
||||
#pragma warning(disable: 4244 4305)
|
82
gnugo/config.vcin
Normal file
|
@ -0,0 +1,82 @@
|
|||
/* This is the Microsoft Visual C++ version of config.h *
|
||||
* Replace the distributed config.h with this file *
|
||||
* See config.h.in for comments on the meanings of most of the *
|
||||
* defines. This file is autogenerated. Do not modify it. *
|
||||
* See instead, the perl script makevcdist.pl */
|
||||
|
||||
#define HAVE_CRTDBG_H 1
|
||||
#define HAVE_WINSOCK_IO_H 1
|
||||
#define HAVE__VSNPRINTF 1
|
||||
|
||||
/* Connection module. Default standard. */
|
||||
#define ALTERNATE_CONNECTIONS 1
|
||||
|
||||
/* Ruleset. Default Japanese */
|
||||
#define CHINESE_RULES 0
|
||||
|
||||
/* Center oriented influence. Disabled by default. */
|
||||
#define COSMIC_GNUGO 0
|
||||
|
||||
/* Default level (strength). Up to 10 supported */
|
||||
#define DEFAULT_LEVEL 10
|
||||
|
||||
/* Default hash table size in megabytes */
|
||||
#define DEFAULT_MEMORY 8
|
||||
|
||||
/* Compile support for GTP communication over TCP/IP channel. */
|
||||
#define ENABLE_SOCKET_SUPPORT 1
|
||||
|
||||
/* Connection module. Default experimental. */
|
||||
#define EXPERIMENTAL_CONNECTIONS 1
|
||||
|
||||
/* GAIN/LOSS codes. Disabled by default. */
|
||||
#define EXPERIMENTAL_OWL_EXT 0
|
||||
|
||||
/* Define as 1 to use the grid optimisation, or 2 to run it in self-test mode
|
||||
*/
|
||||
#define GRID_OPT 1
|
||||
|
||||
/* Large Scale Captures. Disabled by default. */
|
||||
#define LARGE_SCALE 0
|
||||
|
||||
/* Oracle. Default not enabled. */
|
||||
#define ORACLE 0
|
||||
|
||||
/* Owl Node Limit */
|
||||
#define OWL_NODE_LIMIT 1000
|
||||
|
||||
/* Owl Threats. 0 standard. */
|
||||
#define OWL_THREATS 0
|
||||
|
||||
/* Enable GNU Readline support */
|
||||
#define READLINE 0
|
||||
|
||||
/* Allow resignation. Default enabled */
|
||||
#define RESIGNATION_ALLOWED 1
|
||||
|
||||
/* Semeai Variations. 500 default */
|
||||
#define SEMEAI_NODE_LIMIT 500
|
||||
|
||||
/* Break-in module. Enabled by default. */
|
||||
#define USE_BREAK_IN 1
|
||||
|
||||
/* Define special valgrind macros. */
|
||||
#define USE_VALGRIND 0
|
||||
|
||||
|
||||
/* Version number of package */
|
||||
#define PACKAGE "gnugo"
|
||||
|
||||
/* The concatenation of the strings "GNU ", and PACKAGE. */
|
||||
#define GNU_PACKAGE "GNU " PACKAGE
|
||||
|
||||
/* The number of bytes in a int. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The number of bytes in a long. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "@VERSION@"
|
||||
|
||||
#pragma warning(disable: 4244 4305)
|
7916
gnugo/configure
vendored
Executable file
590
gnugo/configure.in
Normal file
|
@ -0,0 +1,590 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl *****************************************************************
|
||||
dnl IMPORTANT: Don't forget to add corresponding output for --options
|
||||
dnl if you add a non-trivial configure option here.
|
||||
dnl *****************************************************************
|
||||
|
||||
dnl this is to determine if the config script is running in the proper place
|
||||
dnl just give it one file relative to where it should be
|
||||
AC_INIT([gnugo], [3.8])
|
||||
AC_CONFIG_SRCDIR([engine/dragon.c])
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_PREREQ(2.52)dnl dnl Minimum Autoconf version required.
|
||||
|
||||
AH_TEMPLATE([PACKAGE],
|
||||
[Define to the name of the distribution.])
|
||||
|
||||
AH_TEMPLATE([GNU_PACKAGE],
|
||||
[The concatenation of the strings "GNU ", and PACKAGE.])
|
||||
|
||||
AH_TEMPLATE([VERSION],
|
||||
[Define to the version of the distribution.])
|
||||
|
||||
dnl this defines VERSION and PACKAGE
|
||||
AM_INIT_AUTOMAKE
|
||||
GNU_PACKAGE="GNU $PACKAGE"
|
||||
AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE")
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
dnl See if user has expressed a preference for use of curses and/or color
|
||||
dnl These set variables $enable_color and $with_curses to "no" if disabled
|
||||
dnl "yes" if enabled, or undefined if not specified
|
||||
|
||||
AC_ARG_WITH(readline,
|
||||
[ --with-readline try to use GNU Readline for command reading
|
||||
--without-readline do not use GNU Readline (default)])
|
||||
|
||||
AC_ARG_WITH(curses,
|
||||
[ --with-curses try to use curses for colored debugging output (default)
|
||||
--without-curses do not use curses for colored debugging output])
|
||||
|
||||
AC_ARG_ENABLE(color,
|
||||
[ --enable-color use curses or ansi escape sequences for colored
|
||||
debug output
|
||||
--disable-color do not try to generated colored debug output])
|
||||
|
||||
dnl and look to see if they want to disable the grid optimisation
|
||||
|
||||
AC_ARG_ENABLE(grid-opt,
|
||||
[ --enable-grid-opt enable the grid optimisation within the pattern
|
||||
matcher (default)
|
||||
--enable-grid-opt=distrust enable the grid optimisation in non-trusting mode
|
||||
--disable-grid-opt disable the grid optimisation])
|
||||
|
||||
default_cache_size=-1
|
||||
default_level=10
|
||||
default_semeai_node_limit=500
|
||||
default_owl_node_limit=1000
|
||||
|
||||
AC_ARG_ENABLE(cache-size,
|
||||
[ --enable-cache-size=n reserve n MB RAM for caching (special value -1
|
||||
default, corresponding to 8-11 MB depending on
|
||||
platform)])
|
||||
|
||||
AC_ARG_ENABLE(level,
|
||||
[ --enable-level=n n = default level (10 standard)])
|
||||
|
||||
AC_ARG_ENABLE(semeai-node-limit,
|
||||
[ --enable-semeai-node-limit=n n = semeai variations (500 standard)])
|
||||
|
||||
AC_ARG_ENABLE(level,
|
||||
[ --enable-owl-node-limit=n n = owl node limit (1000 standard)])
|
||||
|
||||
AC_ARG_ENABLE(dfa,
|
||||
[ --disable-dfa use old non-dfa pattern matcher],
|
||||
[ if test ${enableval} = no; then
|
||||
dfa_c=
|
||||
else
|
||||
dfa_c=dfa
|
||||
fi] ,
|
||||
[ dfa_c=dfa ])
|
||||
|
||||
AC_ARG_ENABLE(chinese-rules,
|
||||
[ --enable-chinese-rules use Chinese (area) counting
|
||||
--disable-chinese-rules use Japanese counting (default)])
|
||||
|
||||
AC_ARG_ENABLE(resignation-allowed,
|
||||
[ --enable-resignation-allowed resign lost games (default)
|
||||
--disable-resignation-allowed never resign])
|
||||
|
||||
AC_ARG_ENABLE(metamachine,
|
||||
[ --enable-metamachine enable metamachine
|
||||
--disable-metamachine don't enable metamachine (default)])
|
||||
|
||||
AC_ARG_ENABLE(experimental-break-in,
|
||||
[ --enable-experimental-break-in use the breakin module (default)
|
||||
--disable-experimental-break-in don't use the breakin module])
|
||||
|
||||
AC_ARG_ENABLE(experimental-owl-ext,
|
||||
[ --enable-experimental-owl-ext use the experimental GAIN/LOSS codes
|
||||
--disable-experimental-owl-ext use standard owl module (default)])
|
||||
|
||||
AC_ARG_ENABLE(cosmic-gnugo,
|
||||
[ --enable-cosmic-gnugo use center-oriented influence code
|
||||
--disable-cosmic-gnugo use standard influence code (default)])
|
||||
|
||||
AC_ARG_ENABLE(large-scale,
|
||||
[ --enable-large-scale look for large scale captures
|
||||
--disable-large-scale don't seek large scale captures (default)])
|
||||
|
||||
AC_ARG_ENABLE(experimental-connections,
|
||||
[ --enable-experimental-connections use experimental connection analysis
|
||||
(default)
|
||||
--disable-experimental-connections use standard connection analysis])
|
||||
|
||||
AC_ARG_ENABLE(alternate-connections,
|
||||
[ --enable-alternate-connections use alternate experimental connection
|
||||
analysis
|
||||
--disable-alternate-connections use primary experimental connection
|
||||
analysis (default)])
|
||||
|
||||
AC_ARG_ENABLE(socket-support,
|
||||
[ --disable-socket-support don't compile GTP over TCP/IP support
|
||||
--enable-socket-support compile TCP/IP support (default)])
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
dnl for automake 1.4.x
|
||||
AC_EXEEXT
|
||||
|
||||
dnl add -lm to library list since we use some
|
||||
dnl math functions such as pow and fabs
|
||||
|
||||
AC_SEARCH_LIBS(pow,m)
|
||||
|
||||
AC_CACHE_CHECK(
|
||||
[for mingw32],
|
||||
ac_cv_mingw32,
|
||||
AC_TRY_COMPILE(,
|
||||
[return __MINGW32__],
|
||||
ac_cv_mingw32="yes",
|
||||
ac_cv_mingw32="no")
|
||||
)
|
||||
|
||||
if test $ac_cv_mingw32 = yes;then
|
||||
LIBS="$LIBS -lwsock32"
|
||||
AC_SEARCH_LIBS(vsnprintf, mingwex)
|
||||
fi
|
||||
|
||||
AC_PROG_CPP
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl required since we use SUBDIRS in Makefile.am
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
AC_HEADER_TIME
|
||||
|
||||
AC_C_CONST
|
||||
|
||||
AC_CHECK_HEADERS(unistd.h sys/time.h sys/times.h)
|
||||
AC_CHECK_HEADERS(curses.h term.h ncurses/curses.h ncurses/term.h)
|
||||
|
||||
if test "$ac_cv_header_curses_h" = "yes";then
|
||||
curses_header="curses.h"
|
||||
elif test "$ac_cv_header_ncurses_curses_h" = "yes";then
|
||||
curses_header="ncurses/curses.h"
|
||||
else
|
||||
curses_header="no"
|
||||
fi
|
||||
|
||||
if test "$ac_cv_header_term_h" = "yes";then
|
||||
term_header="term.h"
|
||||
elif test "$ac_cv_header_ncurses_term_h" = "yes";then
|
||||
term_header="ncurses/term.h"
|
||||
else
|
||||
term_header="no"
|
||||
fi
|
||||
|
||||
AC_CHECK_SIZEOF(long,,[#include <stdio.h>])
|
||||
|
||||
dnl vsnprintf not universally available
|
||||
dnl usleep not available in Unicos and mingw32
|
||||
AC_CHECK_FUNCS(vsnprintf gettimeofday usleep times)
|
||||
|
||||
dnl if snprintf not available try to use g_snprintf from GLib
|
||||
if test $ac_cv_func_vsnprintf = no; then
|
||||
AC_CHECK_PROG(glibconfig,glib-config,yes,no)
|
||||
if test $ac_cv_prog_glibconfig = yes;then
|
||||
glib_cflags=`glib-config --cflags`
|
||||
glib_libs=`glib-config --libs`
|
||||
CPPFLAGS="$CPPFLAGS $glib_cflags"
|
||||
LIBS="$LIBS $glib_libs"
|
||||
AC_CHECK_FUNCS(g_vsnprintf)
|
||||
AC_CHECK_HEADERS(glib.h)
|
||||
if test $ac_cv_func_g_vsnprintf = no; then
|
||||
AC_MSG_WARN([GLib installation problem.
|
||||
Continuing without GLib ])
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([Neither vsnprintf nor GLib found. GNU Go is
|
||||
compiled but it is safer to get GLib at
|
||||
http://www.gtk.org/])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ------ variadic #define -----------------------
|
||||
|
||||
AH_TEMPLATE([HAVE_VARIADIC_DEFINE],
|
||||
[Define if #define can take a variable number of arguments])
|
||||
|
||||
AC_CACHE_CHECK(
|
||||
[for variadic cpp define],
|
||||
gnugo_cv_cpp_variadic_define,
|
||||
AC_TRY_COMPILE(
|
||||
[#include <stdio.h>
|
||||
#define zz(fmt,arg...) printf(fmt,##arg)],
|
||||
[zz("Hello");zz("%s","Hello");zz("%s%s","Hello","World")],
|
||||
gnugo_cv_cpp_variadic_define="yes",
|
||||
gnugo_cv_cpp_variadic_define="no")
|
||||
)
|
||||
if test "$gnugo_cv_cpp_variadic_define" = "yes";then
|
||||
AC_DEFINE(HAVE_VARIADIC_DEFINE)
|
||||
fi
|
||||
|
||||
dnl ------ transparent unions ---------------------
|
||||
|
||||
AH_TEMPLATE([HAVE_TRANSPARENT_UNIONS],
|
||||
[Define if your compiler supports transparent unions])
|
||||
|
||||
AC_CACHE_CHECK(
|
||||
[whether $CC supports transparent unions],
|
||||
gnugo_cv_transparent_unions,
|
||||
AC_TRY_COMPILE([],
|
||||
[[ struct {
|
||||
union {
|
||||
int x;
|
||||
float y;
|
||||
}
|
||||
} A = { { .y = 0.0 } };
|
||||
A.y = 1.0;]],
|
||||
gnugo_cv_transparent_unions="yes",
|
||||
gnugo_cv_transparent_unions="no")
|
||||
)
|
||||
|
||||
if test "$gnugo_cv_transparent_unions" = "yes"; then
|
||||
AC_DEFINE(HAVE_TRANSPARENT_UNIONS)
|
||||
fi
|
||||
|
||||
dnl -------- color debugging support -----------
|
||||
|
||||
AH_TEMPLATE([TERMINFO],
|
||||
[Define to 1 if termcap/terminfo is available.])
|
||||
|
||||
AH_TEMPLATE([ANSI_COLOR],
|
||||
[Define to use ansi escape sequences for color debugging])
|
||||
|
||||
tmp_color_result="none"
|
||||
|
||||
if test "$with_curses" != no -a "$enable_color" != no ; then
|
||||
tmp_color_result="none (curses failed)"
|
||||
|
||||
dnl Do a separate test for curses and termcap
|
||||
dnl DJGPP does have pdcurses, but not termcap
|
||||
|
||||
dnl make sure that both curses.h and term.h are available
|
||||
dnl FIXME: better to actually figure out here what headers
|
||||
dnl are really required
|
||||
if test "$term_header" != "no" -a "$curses_header" != "no" ; then
|
||||
|
||||
dnl check for a working termcap library
|
||||
AC_SEARCH_LIBS(tparm,ncurses curses pdcurses termcap terminfo termlib)
|
||||
|
||||
if test "$ac_cv_search_tparm" != "no" ; then
|
||||
AC_DEFINE(TERMINFO)
|
||||
tmp_color_result="curses"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$with_curses" = no -a "$enable_color" != no ; then
|
||||
dnl we asked for color, but there is no termcap
|
||||
AC_DEFINE(ANSI_COLOR)
|
||||
tmp_color_result="ANSI color"
|
||||
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for color support)
|
||||
AC_MSG_RESULT($tmp_color_result)
|
||||
|
||||
dnl -------- readline support -------------------
|
||||
|
||||
AH_TEMPLATE([READLINE], [Enable GNU Readline support])
|
||||
|
||||
if test "$with_readline" = yes ; then
|
||||
|
||||
dnl check for a working termcap and readline library
|
||||
AC_SEARCH_LIBS(readline,termcap readline)
|
||||
|
||||
if test "$ac_cv_search_readline" != "no" ; then
|
||||
AC_DEFINE(READLINE,1)
|
||||
else
|
||||
AC_DEFINE(READLINE,0)
|
||||
fi
|
||||
else
|
||||
AC_DEFINE(READLINE,0)
|
||||
fi
|
||||
|
||||
dnl ---------- grid optimisation ------------
|
||||
|
||||
AH_TEMPLATE([GRID_OPT],
|
||||
[Define as 1 to use the grid optimisation, or 2 to run it in self-test mode])
|
||||
|
||||
if test "$enable_grid_opt" = "distrust" ; then
|
||||
AC_DEFINE(GRID_OPT, 2)
|
||||
else
|
||||
if test "$enable_grid_opt" = "no" ; then
|
||||
AC_DEFINE(GRID_OPT, 0)
|
||||
else
|
||||
AC_DEFINE(GRID_OPT, 1)
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
dnl ------------ set cache size ----------
|
||||
|
||||
AH_TEMPLATE([DEFAULT_MEMORY],
|
||||
[Default hash table size in megabytes])
|
||||
|
||||
if test "$enable_cache_size" ; then
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_MEMORY, $enable_cache_size)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_MEMORY, $default_cache_size)
|
||||
fi
|
||||
|
||||
|
||||
dnl ------------ set default level ----------
|
||||
|
||||
AH_TEMPLATE([DEFAULT_LEVEL],
|
||||
[Default level (strength). Up to 10 supported])
|
||||
|
||||
if test "$enable_level" ; then
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_LEVEL, $enable_level)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_LEVEL, $default_level)
|
||||
fi
|
||||
|
||||
dnl ------------ set cache size ----------
|
||||
|
||||
AH_TEMPLATE([OWL_NODE_LIMIT],
|
||||
[Owl Node Limit])
|
||||
|
||||
if test "$enable_owl_node_limit" ; then
|
||||
AC_DEFINE_UNQUOTED(OWL_NODE_LIMIT, $enable_owl_node_limit)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(OWL_NODE_LIMIT, $default_owl_node_limit)
|
||||
fi
|
||||
|
||||
|
||||
dnl ------------ set semeai variations ----------
|
||||
|
||||
AH_TEMPLATE([SEMEAI_NODE_LIMIT],
|
||||
[Semeai Variations. 500 default])
|
||||
|
||||
if test "$enable_semeai_node_limit" ; then
|
||||
AC_DEFINE_UNQUOTED(SEMEAI_NODE_LIMIT, $enable_semeai_node_limit)
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(SEMEAI_NODE_LIMIT, $default_semeai_node_limit)
|
||||
fi
|
||||
|
||||
dnl ------------ dfa -------------------
|
||||
|
||||
AM_CONDITIONAL(DFA_ENABLED, test "$enable_dfa" != "no")
|
||||
|
||||
dnl FIXME: Is there a more elegant approach for this?
|
||||
dnl force owl c files rebuild
|
||||
rm -f \
|
||||
patterns/owl_attackpat.c \
|
||||
patterns/owl_defendpat.c \
|
||||
patterns/owl_vital_apat.c
|
||||
|
||||
|
||||
dnl ------------ Chinese Rules -------------------
|
||||
|
||||
AH_TEMPLATE([CHINESE_RULES],
|
||||
[Ruleset. Default Japanese])
|
||||
|
||||
if test "$enable_chinese_rules" = "yes" ; then
|
||||
AC_DEFINE(CHINESE_RULES, 1)
|
||||
else
|
||||
AC_DEFINE(CHINESE_RULES, 0)
|
||||
fi
|
||||
|
||||
dnl ------------ Resignation allowed-------------------
|
||||
|
||||
AH_TEMPLATE([RESIGNATION_ALLOWED],
|
||||
[Allow resignation. Default enabled])
|
||||
|
||||
if test "$disable_resignation_allowed" = "yes" ; then
|
||||
AC_DEFINE(RESIGNATION_ALLOWED, 0)
|
||||
else
|
||||
AC_DEFINE(RESIGNATION_ALLOWED, 1)
|
||||
fi
|
||||
|
||||
dnl ------------ Oracle enabled-------------------
|
||||
|
||||
AH_TEMPLATE([ORACLE],
|
||||
[Oracle. Default not enabled.])
|
||||
|
||||
if test "$enable_metamachine" = "yes" ; then
|
||||
AC_DEFINE(ORACLE, 1)
|
||||
else
|
||||
AC_DEFINE(ORACLE, 0)
|
||||
fi
|
||||
|
||||
dnl ------------ Experimental Breakin enabled-------------------
|
||||
|
||||
AH_TEMPLATE([USE_BREAK_IN],
|
||||
[Break-in module. Enabled by default.])
|
||||
|
||||
if test "$enable_experimental_break_in" = "no" ; then
|
||||
AC_DEFINE(USE_BREAK_IN, 0)
|
||||
else
|
||||
AC_DEFINE(USE_BREAK_IN, 1)
|
||||
fi
|
||||
|
||||
dnl ------------ Owl extensions ------------
|
||||
|
||||
AH_TEMPLATE([EXPERIMENTAL_OWL_EXT],
|
||||
[GAIN/LOSS codes. Disabled by default.])
|
||||
|
||||
if test "$enable_experimental_owl_ext" = "yes" ; then
|
||||
AC_DEFINE(EXPERIMENTAL_OWL_EXT, 1)
|
||||
else
|
||||
AC_DEFINE(EXPERIMENTAL_OWL_EXT, 0)
|
||||
fi
|
||||
|
||||
dnl ------------ Cosmic Consciousness -------------------
|
||||
|
||||
AH_TEMPLATE([COSMIC_GNUGO],
|
||||
[Center oriented influence. Disabled by default.])
|
||||
|
||||
if test "$enable_cosmic_gnugo" = "yes" ; then
|
||||
AC_DEFINE(COSMIC_GNUGO, 1)
|
||||
else
|
||||
AC_DEFINE(COSMIC_GNUGO, 0)
|
||||
fi
|
||||
|
||||
dnl ------------ Large Scale -------------------
|
||||
|
||||
AH_TEMPLATE([LARGE_SCALE],
|
||||
[Large Scale Captures. Disabled by default.])
|
||||
|
||||
if test "$enable_large_scale" = "yes" ; then
|
||||
AC_DEFINE(LARGE_SCALE, 1)
|
||||
else
|
||||
AC_DEFINE(LARGE_SCALE, 0)
|
||||
fi
|
||||
|
||||
dnl ------------ Connections -------------------
|
||||
|
||||
AH_TEMPLATE([EXPERIMENTAL_CONNECTIONS],
|
||||
[Connection module. Default experimental.])
|
||||
|
||||
if test "$enable_experimental_connections" = "no" ; then
|
||||
AC_DEFINE(EXPERIMENTAL_CONNECTIONS, 0)
|
||||
else
|
||||
AC_DEFINE(EXPERIMENTAL_CONNECTIONS, 1)
|
||||
fi
|
||||
|
||||
dnl ------------ Connections -------------------
|
||||
|
||||
AH_TEMPLATE([ALTERNATE_CONNECTIONS],
|
||||
[Connection module. Default standard.])
|
||||
|
||||
if test "$enable_alternate_connections" = "no" ; then
|
||||
AC_DEFINE(ALTERNATE_CONNECTIONS, 0)
|
||||
else
|
||||
AC_DEFINE(ALTERNATE_CONNECTIONS, 1)
|
||||
fi
|
||||
|
||||
dnl ------------ Owl Threats -------------------
|
||||
|
||||
AH_TEMPLATE([OWL_THREATS],
|
||||
[Owl Threats. 0 standard.])
|
||||
|
||||
if test "$enable_owl_threats" = "yes" ; then
|
||||
AC_DEFINE(OWL_THREATS, 1)
|
||||
else
|
||||
AC_DEFINE(OWL_THREATS, 0)
|
||||
fi
|
||||
|
||||
dnl ------------ additional valgrind macros ------
|
||||
|
||||
AH_TEMPLATE([USE_VALGRIND],
|
||||
[Define special valgrind macros.])
|
||||
|
||||
if test "$enable_valgrind" = "yes" ; then
|
||||
AC_DEFINE(USE_VALGRIND, 1)
|
||||
else
|
||||
AC_DEFINE(USE_VALGRIND, 0)
|
||||
fi
|
||||
|
||||
dnl ----------- special-case use of gcc ---------
|
||||
|
||||
dnl Not sure if we are supposed to be accessing this variable, but...
|
||||
|
||||
AM_CONDITIONAL(GCC_ONLY, test "$ac_compiler_gnu" = "yes")
|
||||
|
||||
dnl Now lines in Makefile.am can be prefixed @GCC_ONLY@.
|
||||
|
||||
AC_SUBST(GCC_MAJOR_VERSION)
|
||||
AC_SUBST(GCC_MINOR_VERSION)
|
||||
AC_SUBST(GNU_GO_WARNINGS)
|
||||
|
||||
if test "$ac_compiler_gnu" = "yes"; then
|
||||
|
||||
dnl M4 escaping of brackets
|
||||
GCC_MAJOR_VERSION=`echo __GNUC__ | $CC -E -xc - | tail -n 1`
|
||||
GCC_MINOR_VERSION=`echo __GNUC_MINOR__ | $CC -E -xc - | tail -n 1`
|
||||
|
||||
GNU_GO_WARNINGS='-Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wundef'
|
||||
|
||||
if (test $GCC_MAJOR_VERSION -eq 3 && test $GCC_MINOR_VERSION -ge 4) || test $GCC_MAJOR_VERSION -gt 3; then
|
||||
GNU_GO_WARNINGS="$GNU_GO_WARNINGS -Wdeclaration-after-statement"
|
||||
fi
|
||||
|
||||
else
|
||||
GCC_MAJOR_VERSION=0
|
||||
GCC_MINOR_VERSION=0
|
||||
GNU_GO_WARNINGS=''
|
||||
fi
|
||||
|
||||
dnl FIXME: please add warnings for other compilers!
|
||||
|
||||
|
||||
AH_TEMPLATE([ENABLE_SOCKET_SUPPORT],
|
||||
[Compile support for GTP communication over TCP/IP channel.])
|
||||
|
||||
if test "$enable_socket_support" != "no"; then
|
||||
# Check for all required headers, macros, structures and functions
|
||||
# at once.
|
||||
AC_CACHE_CHECK(
|
||||
[whether socket support can be compiled],
|
||||
gnugo_cv_sockets_supported,
|
||||
AC_TRY_LINK([#if !defined(_WIN32) && !defined(_WIN32_WCE)
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#else /* on Windows */
|
||||
#include <winsock.h>
|
||||
#endif /* on Windows */],
|
||||
[[ struct sockaddr_in A;
|
||||
struct hostent *H;
|
||||
A.sin_family = AF_INET;
|
||||
A.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
A.sin_port = htons(0);
|
||||
gethostbyname(0);
|
||||
socket(PF_INET, SOCK_STREAM, 0);
|
||||
connect(0, 0, 0);
|
||||
bind(0, 0, 0);
|
||||
listen(0, 0);
|
||||
accept(0, 0, 0);]],
|
||||
gnugo_cv_sockets_supported="yes",
|
||||
gnugo_cv_sockets_supported="no"))
|
||||
|
||||
if test "$gnugo_cv_sockets_supported" = "yes"; then
|
||||
AC_DEFINE(ENABLE_SOCKET_SUPPORT)
|
||||
else
|
||||
if test "$enable_socket_support" = "yes"; then
|
||||
AC_MSG_WARN(
|
||||
[[
|
||||
*** Socket support was requested but does not pass configure test. ***
|
||||
*** Proceed only if you know what you are doing. ***]])
|
||||
AC_DEFINE(ENABLE_SOCKET_SUPPORT)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#AM_GNU_GETTEXT
|
||||
#AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||
|
||||
dnl FIXME:
|
||||
dnl autoconf 2.50 recommends AC_CONFIG_FILES and AC_OUPUT
|
||||
dnl This however requires automake 1.4p2 or better
|
||||
|
||||
AC_OUTPUT([Makefile interface/Makefile patterns/Makefile sgf/Makefile
|
||||
utils/Makefile engine/Makefile doc/Makefile regression/Makefile config.vc:config.vcin])
|
411
gnugo/depcomp
Executable file
|
@ -0,0 +1,411 @@
|
|||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. This file always lives in the current directory.
|
||||
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||
# $object doesn't have directory information.
|
||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
outname="$stripped.o"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 AIX compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
|
||||
tmpdepfile1="$object.d"
|
||||
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*) # this is libtool, let us make it quiet
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case "$arg" in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
# X makedepend
|
||||
(
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in no)
|
||||
set ""; shift
|
||||
cleared=yes
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift;;
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tail +3 "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*)
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case $arg in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*)
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case $arg in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
64
gnugo/doc/Makefile.am
Normal file
|
@ -0,0 +1,64 @@
|
|||
## Process this file with automake to create Makefile.in
|
||||
AUTOMAKE_OPTIONS=no-dependencies
|
||||
|
||||
info_TEXINFOS = gnugo.texi
|
||||
|
||||
gnugo_TEXINFOS = analyze.texi api.texi board.texi copying.texi dfa.texi \
|
||||
dragon.texi eyes.texi gnugo.texi gtp.texi gtp-commands.texi \
|
||||
influence.texi introduction.texi move_generation.texi \
|
||||
moyo.texi overview.texi owl.texi patterns.texi \
|
||||
reading.texi regression.texi sgf.texi using.texi \
|
||||
utils.texi install.texi montecarlo.texi
|
||||
|
||||
man_MANS = gnugo.6
|
||||
|
||||
EPS = cdfa.eps dfa.eps dfa2.eps oldlogo.eps newlogo.eps \
|
||||
path.eps sync-prod1.eps sync-prod2.eps logo-34.eps \
|
||||
logo-32.eps logo-36.eps
|
||||
|
||||
FIG = cdfa.fig dfa.fig dfa2.fig path.fig sync-prod1.fig sync-prod2.fig
|
||||
|
||||
PNG = cdfa.png dfa.png dfa2.png path.png sync-prod1.png sync-prod2.png
|
||||
|
||||
JPG = cdfa.jpg dfa.jpg dfa2.jpg oldlogo.jpg path.jpg sync-prod1.jpg \
|
||||
sync-prod2.jpg newlogo.jpg logo-32.jpg logo-34.jpg logo-36.jpg
|
||||
|
||||
PDF = cdfa.pdf dfa2.pdf dfa.pdf logo-34.pdf path.pdf sync-prod1.pdf \
|
||||
sync-prod2.pdf logo-36.pdf
|
||||
|
||||
EXTRA_DIST = automake-1.4.patch gnugo.6 gnugo.pod gtp-commands.sed \
|
||||
$(EPS) $(FIG) $(PNG) $(JPG) $(PDF)
|
||||
|
||||
CLEANFILES = *.log *.dvi *.aux *.vr *.tp *.ky *.pg *.cps *.fns *.toc \
|
||||
*.fn *.cp *~
|
||||
|
||||
TEXI2PDF = texi2pdf
|
||||
TEXI2HTML = texi2html
|
||||
|
||||
gnugo.6: $(srcdir)/gnugo.pod
|
||||
pod2man $(srcdir)/gnugo.pod --section 6 --release @VERSION@ > gnugo.6
|
||||
|
||||
BUILT_SOURCES = gtp-commands.texi
|
||||
|
||||
cmdsrc = $(srcdir)/../interface/play_gtp.c
|
||||
|
||||
gnugo.pdf: gnugo.texi $(gnugo_TEXINFOS)
|
||||
$(TEXI2PDF) $<
|
||||
|
||||
gnugo.html: gnugo.texi $(gnugo_TEXINFOS)
|
||||
$(TEXI2HTML) -split=chapter -nosec_nav -expand=tex $<
|
||||
|
||||
## Rebuild gtp-commands.texi from play_gtp.c:
|
||||
|
||||
gtp-commands:
|
||||
sed -e '1r '$(srcdir)/gtp-commands.sed \
|
||||
-e '/static struct gtp_command commands/,/^}/!d' \
|
||||
-e '/^ /!d' -e '/NULL/d' \
|
||||
-e 's/ *{"\(.*\)"[^a-z]*\(gtp_[a-z_]*\)}.*/s,\2,\1,g/' \
|
||||
$(cmdsrc) > TMP.sed
|
||||
sed -f TMP.sed $(cmdsrc) > $(srcdir)/gtp-commands.texi
|
||||
rm -f TMP.sed
|
||||
|
||||
|
||||
|
||||
|
555
gnugo/doc/Makefile.in
Normal file
|
@ -0,0 +1,555 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = doc
|
||||
DIST_COMMON = $(gnugo_TEXINFOS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in texinfo.tex
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
depcomp =
|
||||
am__depfiles_maybe =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
INFO_DEPS = $(srcdir)/gnugo.info
|
||||
am__TEXINFO_TEX_DIR = $(srcdir)
|
||||
DVIS = gnugo.dvi
|
||||
PDFS = gnugo.pdf
|
||||
PSS = gnugo.ps
|
||||
HTMLS = gnugo.html
|
||||
TEXINFOS = gnugo.texi
|
||||
TEXI2DVI = texi2dvi
|
||||
MAKEINFOHTML = $(MAKEINFO) --html
|
||||
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
|
||||
DVIPS = dvips
|
||||
am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man6dir)"
|
||||
man6dir = $(mandir)/man6
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DFA_ENABLED_FALSE = @DFA_ENABLED_FALSE@
|
||||
DFA_ENABLED_TRUE = @DFA_ENABLED_TRUE@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GCC_MINOR_VERSION = @GCC_MINOR_VERSION@
|
||||
GCC_ONLY_FALSE = @GCC_ONLY_FALSE@
|
||||
GCC_ONLY_TRUE = @GCC_ONLY_TRUE@
|
||||
GNU_GO_WARNINGS = @GNU_GO_WARNINGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
glibconfig = @glibconfig@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = no-dependencies
|
||||
info_TEXINFOS = gnugo.texi
|
||||
gnugo_TEXINFOS = analyze.texi api.texi board.texi copying.texi dfa.texi \
|
||||
dragon.texi eyes.texi gnugo.texi gtp.texi gtp-commands.texi \
|
||||
influence.texi introduction.texi move_generation.texi \
|
||||
moyo.texi overview.texi owl.texi patterns.texi \
|
||||
reading.texi regression.texi sgf.texi using.texi \
|
||||
utils.texi install.texi montecarlo.texi
|
||||
|
||||
man_MANS = gnugo.6
|
||||
EPS = cdfa.eps dfa.eps dfa2.eps oldlogo.eps newlogo.eps \
|
||||
path.eps sync-prod1.eps sync-prod2.eps logo-34.eps \
|
||||
logo-32.eps logo-36.eps
|
||||
|
||||
FIG = cdfa.fig dfa.fig dfa2.fig path.fig sync-prod1.fig sync-prod2.fig
|
||||
PNG = cdfa.png dfa.png dfa2.png path.png sync-prod1.png sync-prod2.png
|
||||
JPG = cdfa.jpg dfa.jpg dfa2.jpg oldlogo.jpg path.jpg sync-prod1.jpg \
|
||||
sync-prod2.jpg newlogo.jpg logo-32.jpg logo-34.jpg logo-36.jpg
|
||||
|
||||
PDF = cdfa.pdf dfa2.pdf dfa.pdf logo-34.pdf path.pdf sync-prod1.pdf \
|
||||
sync-prod2.pdf logo-36.pdf
|
||||
|
||||
EXTRA_DIST = automake-1.4.patch gnugo.6 gnugo.pod gtp-commands.sed \
|
||||
$(EPS) $(FIG) $(PNG) $(JPG) $(PDF)
|
||||
|
||||
CLEANFILES = *.log *.dvi *.aux *.vr *.tp *.ky *.pg *.cps *.fns *.toc \
|
||||
*.fn *.cp *~
|
||||
|
||||
TEXI2PDF = texi2pdf
|
||||
TEXI2HTML = texi2html
|
||||
BUILT_SOURCES = gtp-commands.texi
|
||||
cmdsrc = $(srcdir)/../interface/play_gtp.c
|
||||
all: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .html .info .pdf .ps .texi
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
.texi.info:
|
||||
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
||||
am__cwd=`pwd` && cd $(srcdir) && \
|
||||
rm -rf $$backupdir && mkdir $$backupdir && \
|
||||
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
|
||||
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||||
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
||||
done; \
|
||||
else :; fi && \
|
||||
cd "$$am__cwd"; \
|
||||
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $@ $<; \
|
||||
then \
|
||||
rc=0; \
|
||||
cd $(srcdir); \
|
||||
else \
|
||||
rc=$$?; \
|
||||
cd $(srcdir) && \
|
||||
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
|
||||
fi; \
|
||||
rm -rf $$backupdir; exit $$rc
|
||||
|
||||
.texi.dvi:
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) $<
|
||||
|
||||
.texi.pdf:
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2PDF) $<
|
||||
|
||||
.texi.html:
|
||||
rm -rf $(@:.html=.htp)
|
||||
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $(@:.html=.htp) $<; \
|
||||
then \
|
||||
rm -rf $@; \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
|
||||
else \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(srcdir)/gnugo.info: gnugo.texi $(gnugo_TEXINFOS)
|
||||
gnugo.dvi: gnugo.texi $(gnugo_TEXINFOS)
|
||||
.dvi.ps:
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
uninstall-info-am:
|
||||
@$(PRE_UNINSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||
done; \
|
||||
else :; fi
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
(if cd "$(DESTDIR)$(infodir)"; then \
|
||||
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
|
||||
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
|
||||
else :; fi); \
|
||||
done
|
||||
|
||||
dist-info: $(INFO_DEPS)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for base in $$list; do \
|
||||
case $$base in \
|
||||
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$base; then d=.; else d=$(srcdir); fi; \
|
||||
base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
|
||||
if test -f $$file; then \
|
||||
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
|
||||
test -f $(distdir)/$$relfile || \
|
||||
cp -p $$file $(distdir)/$$relfile; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -rf gnugo.aux gnugo.cp gnugo.cps gnugo.fn gnugo.fns gnugo.ky gnugo.kys \
|
||||
gnugo.log gnugo.pg gnugo.pgs gnugo.tmp gnugo.toc gnugo.tp \
|
||||
gnugo.tps gnugo.vr gnugo.vrs gnugo.dvi gnugo.pdf gnugo.ps \
|
||||
gnugo.html
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
@list='$(INFO_DEPS)'; for i in $$list; do \
|
||||
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
|
||||
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
|
||||
done
|
||||
install-man6: $(man6_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man6dir)" || $(mkdir_p) "$(DESTDIR)$(man6dir)"
|
||||
@list='$(man6_MANS) $(dist_man6_MANS) $(nodist_man6_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.6*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
6*) ;; \
|
||||
*) ext='6' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man6dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man6dir)/$$inst"; \
|
||||
done
|
||||
uninstall-man6:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man6_MANS) $(dist_man6_MANS) $(nodist_man6_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.6*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
6*) ;; \
|
||||
*) ext='6' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f '$(DESTDIR)$(man6dir)/$$inst'"; \
|
||||
rm -f "$(DESTDIR)$(man6dir)/$$inst"; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-info
|
||||
check-am: all-am
|
||||
check: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-am
|
||||
all-am: Makefile $(INFO_DEPS) $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man6dir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am: $(DVIS)
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am: $(HTMLS)
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am: $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-info-am install-man
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
|
||||
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
|
||||
if test -f $$ifile; then \
|
||||
relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
|
||||
echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||
$(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
install-man: install-man6
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am: $(PDFS)
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am: $(PSS)
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man6
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic dist-info \
|
||||
distclean distclean-generic distdir dvi dvi-am html html-am \
|
||||
info info-am install install-am install-data install-data-am \
|
||||
install-exec install-exec-am install-info install-info-am \
|
||||
install-man install-man6 install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-aminfo mostlyclean-generic pdf pdf-am ps ps-am \
|
||||
uninstall uninstall-am uninstall-info-am uninstall-man \
|
||||
uninstall-man6
|
||||
|
||||
|
||||
gnugo.6: $(srcdir)/gnugo.pod
|
||||
pod2man $(srcdir)/gnugo.pod --section 6 --release @VERSION@ > gnugo.6
|
||||
|
||||
gnugo.pdf: gnugo.texi $(gnugo_TEXINFOS)
|
||||
$(TEXI2PDF) $<
|
||||
|
||||
gnugo.html: gnugo.texi $(gnugo_TEXINFOS)
|
||||
$(TEXI2HTML) -split=chapter -nosec_nav -expand=tex $<
|
||||
|
||||
gtp-commands:
|
||||
sed -e '1r '$(srcdir)/gtp-commands.sed \
|
||||
-e '/static struct gtp_command commands/,/^}/!d' \
|
||||
-e '/^ /!d' -e '/NULL/d' \
|
||||
-e 's/ *{"\(.*\)"[^a-z]*\(gtp_[a-z_]*\)}.*/s,\2,\1,g/' \
|
||||
$(cmdsrc) > TMP.sed
|
||||
sed -f TMP.sed $(cmdsrc) > $(srcdir)/gtp-commands.texi
|
||||
rm -f TMP.sed
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
265
gnugo/doc/analyze.texi
Normal file
|
@ -0,0 +1,265 @@
|
|||
In this chapter we will discuss methods of finding
|
||||
out how GNU Go understands a given position. These
|
||||
methods will be of interest to anyone working on the
|
||||
program, or simply curious about its workings.
|
||||
|
||||
In practice, most tuning of GNU Go is done in conjunction
|
||||
with maintaining the @file{regression/} directory
|
||||
(@pxref{Regression}).
|
||||
|
||||
We assume that you have a game GNU Go played saved
|
||||
as an sgf file, and you want to know why it made a
|
||||
certain move.
|
||||
|
||||
@menu
|
||||
* Traces:: Analyzing traces in GNU Go 3.6
|
||||
* Output File:: The Output File
|
||||
* Decide string:: Checking the reading code
|
||||
* Decide dragon:: Checking the owl code
|
||||
* GTP and GDB techniques:: GTP and GDB techniques
|
||||
* view.pike:: Debugging on a Graphic Board
|
||||
* Scoring:: Finding out the winner of the game
|
||||
* Colored Display:: Colored Display
|
||||
@end menu
|
||||
|
||||
@node Traces
|
||||
@section Interpreting Traces
|
||||
@cindex traces
|
||||
@cindex tuning GNU Go
|
||||
|
||||
A quick way to find out roughly the reason for a move is to run
|
||||
|
||||
@example
|
||||
gnugo -l @var{filename} -t -L @var{move number}
|
||||
@end example
|
||||
|
||||
(You may also want to add @option{--quiet} to suppress the copyright
|
||||
message.) In GNU Go 3.6, the moves together with their reasons are
|
||||
listed, followed by a numerical analysis of the values given to each
|
||||
move.
|
||||
|
||||
If you are tuning (@pxref{Tuning}) you may want to add the @option{-a}
|
||||
option. This causes GNU Go to report all patterns matched, even ones
|
||||
that cannot affect the outcome of the move. The reasons for doing
|
||||
this is that you may want to modify a pattern already matched
|
||||
instead of introducing a new one.
|
||||
|
||||
If you use the @option{-w} option, GNU Go will report the statuses of
|
||||
worms and dragons around the board. This type of information is
|
||||
available by different methods, however (@pxref{view.pike},
|
||||
@pxref{Colored Display}).
|
||||
|
||||
@node Output File
|
||||
@section The Output File
|
||||
@cindex output file
|
||||
|
||||
If GNU Go is invoked with the option @option{-o filename} it will
|
||||
produce an output file. This option can be added at the command line
|
||||
in the Go Modem Protocol Setup Window of CGoban. The output file will
|
||||
show the locations of the moves considered and their weights. It is
|
||||
worth noting that by enlarging the CGoban window to its fullest size
|
||||
it can display 3 digit numbers. Dragons with status @code{DEAD} are
|
||||
labelled with an @samp{X}, and dragons with status @code{CRITICAL} are
|
||||
labelled with a @samp{!}.
|
||||
|
||||
If you have a game file which is not commented this way, or
|
||||
which was produced by a non-current version of GNU Go you may
|
||||
ask GNU Go to produce a commented version by running:
|
||||
|
||||
@example
|
||||
gnugo --quiet -l <old file> --replay <color> -o <new file>
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Here <color> can be 'black,' 'white' or 'both'. The replay
|
||||
option will also help you to find out if your current version
|
||||
of GNU Go would play differently than the program that created
|
||||
the file.
|
||||
|
||||
@node Decide string
|
||||
@section Checking the reading code
|
||||
@cindex decide-string
|
||||
|
||||
The @option{--decide-string} option is used to check the tactical reading code
|
||||
(@pxref{Tactical Reading}). This option takes an argument, which is a location
|
||||
on the board in the usual algebraic notation (e.g.
|
||||
@option{--decide-string C17}). This will tell you whether the reading code (in
|
||||
@file{engine/reading.c}) believes the string can be captured, and if so,
|
||||
whether it believes it can be defended, which moves it finds to attack or
|
||||
defend the move, how many nodes it searched in coming to these
|
||||
conclusions. Note that when GNU Go runs normally (not with
|
||||
@option{--decide-string}) the points of attack and defense are
|
||||
computed when @code{make_worms()} runs and cached in
|
||||
@code{worm.attack} and @code{worm.defend}.
|
||||
|
||||
If used with an output file (@option{-o @var{filename}})
|
||||
@option{--decide-string} will produce a variation tree showing
|
||||
all the variations which are considered. This is a useful way
|
||||
of debugging the reading code, and also of educating yourself
|
||||
with the way it works. The variation tree can be displayed
|
||||
graphically using CGoban.
|
||||
|
||||
At each node, the comment contains some information. For example you
|
||||
may find a comment:
|
||||
|
||||
@example
|
||||
|
||||
attack4-B at D12 (variation 6, hash 51180fdf)
|
||||
break_chain D12: 0
|
||||
defend3 D12: 1 G12 (trivial extension)
|
||||
|
||||
@end example
|
||||
|
||||
This is to be interpreted as follows. The node in question
|
||||
was generated by the function @code{attack3()} in @file{engine/reading.c},
|
||||
which was called on the string at @code{D12}. The data in
|
||||
parentheses tell you the values of @code{count_variations} and
|
||||
@code{hashdata.hashval}.
|
||||
|
||||
The second value (``hash'') you probably will not need to know
|
||||
unless you are debugging the hash code, and we will not discuss it.
|
||||
But the first value (``variation'') is useful when using the debugger
|
||||
@command{gdb}. You can first make an output file using
|
||||
the @option{-o} option, then walk through the reading with
|
||||
@command{gdb}, and to coordinate the SGF file with the debugger,
|
||||
display the value of @code{count_variations}. Specifically,
|
||||
from the debugger you can find out where you are as follows:
|
||||
|
||||
@example
|
||||
(gdb) set dump_stack()
|
||||
B:D13 W:E12 B:E13 W:F12 B:F11 (variation 6)
|
||||
@end example
|
||||
|
||||
If you place yourself right after the call to @code{trymove()}
|
||||
which generated the move in question, then the variation number
|
||||
in the SGF file should match the variation number displayed by
|
||||
@code{dump_stack()}, and the move in question will be the
|
||||
last move played (F11 in this example).
|
||||
|
||||
This displays the sequence of moves leading up to the variation
|
||||
in question, and it also prints @code{count_variations-1}.
|
||||
|
||||
The second two lines tell you that from this node, the function
|
||||
@code{break_chain()} was called at D12 and returned 0 meaning
|
||||
that no way was found of rescuing the string by attacking
|
||||
an element of the surrounding chain, and the function
|
||||
@code{defend3()} was called also at D12 and returned 1,
|
||||
meaning that the string can be defended, and that
|
||||
G12 is the move that defends it. If you have trouble
|
||||
finding the function calls which generate these comments,
|
||||
try setting @code{sgf_dumptree=1} and setting a breakpoint in
|
||||
@code{sgf_trace}.
|
||||
|
||||
@node Decide dragon
|
||||
@section Checking the Owl Code
|
||||
@cindex decide-dragon
|
||||
|
||||
You can similarly debug the Owl code using the option
|
||||
@option{--decide-dragon}. Usage is entirely similar to
|
||||
@option{--decide-string}, and it can be used similarly
|
||||
to produce variation trees. These should be typically
|
||||
much smaller than the variation trees produced by
|
||||
@option{--decide-string}.
|
||||
|
||||
@node GTP and GDB techniques
|
||||
@section GTP and GDB techniques
|
||||
@cindex GDB
|
||||
@cindex GTP
|
||||
|
||||
You can use the Go Text Protocol (@pxref{GTP}) to determine
|
||||
the statuses of dragons and other information needed for
|
||||
debugging. The GTP command @command{dragon_data P12} will list
|
||||
the dragon data of the dragon at @code{P12} and
|
||||
@command{worm_data} will list the worm data; other GTP
|
||||
commands may be useful as well.
|
||||
|
||||
You can also conveniently get such information from GDB.
|
||||
A suggested @file{.gdbinit} file may be found in
|
||||
@xref{Debugging}. Assuming this file is loaded, you can
|
||||
list the dragon data with the command:
|
||||
|
||||
@example
|
||||
(gdb) dragon P12
|
||||
@end example
|
||||
|
||||
Similarly you can get the worm data with @command{worm P12}.
|
||||
|
||||
@node view.pike
|
||||
@section Debugging on a Graphical Board
|
||||
@cindex debugging on a graphical board
|
||||
|
||||
The quickest way to analyze most positions is to use the tool
|
||||
@file{view.pike} in the @file{regression} directory. It can be started
|
||||
with a testcase specified, e.g. @command{pike view.pike strategy:40} or
|
||||
at a move in an sgf file, e.g. @command{pike view.pike mistake.sgf:125}.
|
||||
When started it shows the position on a grapical board on which it also
|
||||
marks information like move values, dragon status, and so on. By
|
||||
clicking on the board further information about the valuation of moves,
|
||||
contents of various data structures, and other data can be made
|
||||
available.
|
||||
|
||||
Specific information on how to use @file{view.pike} for influence tuning
|
||||
can be found in @xref{Influence Tuning}.
|
||||
|
||||
@node Scoring
|
||||
@section Scoring the game
|
||||
@cindex scoring
|
||||
|
||||
GNU Go can score the game. Normally GNU Go will report its opinion about
|
||||
the score at the end of the game, but if you want this information about
|
||||
a game stored in a file, use the @option{--score} option (@pxref{Invoking
|
||||
GNU Go}).
|
||||
|
||||
@node Colored Display
|
||||
@section Colored Display
|
||||
@cindex colored display
|
||||
|
||||
Various colored displays of the board may be obtained in a color
|
||||
@command{xterm} or @command{rxvt} window. Xterm will only work if xterm is
|
||||
compiled with color support. If the colors are not displayed on your xterm,
|
||||
try @command{rxvt}. You may also use the Linux console. The colored display
|
||||
will work best if the background color is black; if this is not the case you
|
||||
may want to edit your @file{.Xdefaults} file or add the options
|
||||
@option{-bg black -fg white} to @command{xterm} or @command{rxvt}.
|
||||
On Mac OS X put @command{setenv TERM xterm-color} in your @file{.tcshrc}
|
||||
file to enable color in the terminal.
|
||||
|
||||
@subsection Dragon Display
|
||||
|
||||
You can get a colored ASCII display of the board in which each dragon
|
||||
is assigned a different letter; and the different @code{matcher_status} values
|
||||
(@code{ALIVE}, @code{DEAD}, @code{UNKNOWN}, @code{CRITICAL}) have different
|
||||
colors. This is very handy for debugging. Actually two diagrams are generated.
|
||||
The reason for this is concerns the way the matcher status is computed.
|
||||
The dragon_status (@pxref{Dragons}) is computed first, then for some, but not
|
||||
all dragons, a more accurate owl status is computed. The matcher status is
|
||||
the owl status if available; otherwise it is the dragon_status. Both the
|
||||
dragon_status and the owl_status are displayed. The color scheme is as
|
||||
follows:
|
||||
|
||||
@example
|
||||
green = alive
|
||||
cyan = dead
|
||||
red = critical
|
||||
yellow = unknown
|
||||
magenta = unchecked
|
||||
@end example
|
||||
|
||||
To get the colored display, save a game in sgf format using CGoban, or using
|
||||
the @option{-o} option with GNU Go itself.
|
||||
|
||||
Open an @command{xterm} or @command{rxvt} window.
|
||||
|
||||
Execute @command{gnugo -l [filename] -L [movenum] -T} to get the colored
|
||||
display.
|
||||
|
||||
Other useful colored displays may be obtained by using instead:
|
||||
|
||||
@subsection Eye Space Display
|
||||
@cindex eye space display
|
||||
|
||||
Instead of @option{-T}, try this with @option{-E}. This gives a colored
|
||||
display of the eyespaces, with marginal eye spaces marked @samp{!}
|
||||
(@pxref{Eyes}).
|
||||
|
||||
|
426
gnugo/doc/api.texi
Normal file
|
@ -0,0 +1,426 @@
|
|||
If you want to write your own interface to GNU Go, or if you want to
|
||||
create a go application using the GNU Go engine, this chapter is of
|
||||
interest to you.
|
||||
|
||||
First an overview: GNU Go consists of two parts: the GNU Go @i{engine}
|
||||
and a program (user interface) which uses this engine. These are linked
|
||||
together into one binary. The current program implements the following
|
||||
user modes:
|
||||
|
||||
@itemize @bullet
|
||||
@item An interactive board playable on ASCII terminals
|
||||
@item solo play - GNU Go plays against itself
|
||||
@item replay - a mode which lets the user investigate moves in an existing
|
||||
SGF file.
|
||||
@item GMP - Go Modem Protocol, a protocol for automatic play between two
|
||||
computers.
|
||||
@item GTP - Go Text Protocol, a more general go protocol, @pxref{GTP}.
|
||||
@end itemize
|
||||
@cindex API
|
||||
|
||||
The GNU Go engine can be used in other applications. For example, supplied
|
||||
with GNU Go is another program using the engine, called @file{debugboard},
|
||||
in the directory @file{interface/debugboard/}. The program debugboard lets the
|
||||
user load SGF files and can then interactively look at different properties of
|
||||
the position such as group status and eye status.
|
||||
|
||||
The purpose of this Chapter is to show how to interface your own
|
||||
program such as @code{debugboard} with the GNU Go engine.
|
||||
|
||||
Figure 1 describes the structure of a program using the GNU Go
|
||||
engine.
|
||||
|
||||
@example
|
||||
@group
|
||||
+-----------------------------------+
|
||||
| |
|
||||
| Go application |
|
||||
| |
|
||||
+-----+----------+------+ |
|
||||
| | | | |
|
||||
| | Game | | |
|
||||
| | handling | | |
|
||||
| | | | |
|
||||
| +----+-----+ | |
|
||||
| SGF | Move | |
|
||||
| handling | generation | |
|
||||
| | | |
|
||||
+----------+------------+-----------+
|
||||
| |
|
||||
| Board handling |
|
||||
| |
|
||||
+-----------------------------------+
|
||||
|
||||
Figure 1: The structure of a program using the GNU Go engine
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
The foundation is a library called @code{libboard.a} which provides
|
||||
efficient handling of a go board with rule checks for moves, with
|
||||
incremental handling of connected strings of stones and with methods to
|
||||
efficiently hash go positions.
|
||||
|
||||
On top of this, there is a library which helps the application use
|
||||
Smart Game Format (SGF) files, with complete handling of game trees in
|
||||
memory and in files. This library is called @code{libsgf.a}
|
||||
|
||||
The main part of the code within GNU Go is the move generation
|
||||
library which given a position generates a move. This part of the
|
||||
engine can also be used to manipulate a go position, add or remove
|
||||
stones, do tactical and strategic reading and to query the engine for
|
||||
legal moves. These functions are collected into @code{libengine.a}.
|
||||
|
||||
The game handling code helps the application programmer keep tracks
|
||||
of the moves in a game. Games can be saved to
|
||||
SGF files and then later be read back again. These are also within
|
||||
@code{libengine.a}.
|
||||
|
||||
The responsibility of the application is to provide the user with a
|
||||
user interface, graphical or not, and let the user interact with the
|
||||
engine.
|
||||
|
||||
@menu
|
||||
* Getting Started:: How to use the engine in your program
|
||||
* Basic Data Structures:: Basic Data Structures in the Engine
|
||||
* The Board State:: The board_state `struct'
|
||||
* Positional Functions:: Functions which manipulate a Position
|
||||
@end menu
|
||||
|
||||
@node Getting Started
|
||||
|
||||
@section How to use the engine in your own program: getting started
|
||||
|
||||
To use the GNU Go engine in your own program you must include
|
||||
the file @file{gnugo.h}. This file describes the whole public API. There is
|
||||
another file, @file{liberty.h}, which describes the internal interface within
|
||||
the engine. If you want to make a new module within the engine, e.g. for
|
||||
suggesting moves you will have to include this file also. In this section we
|
||||
will only describe the public interface.
|
||||
|
||||
@findex init_gnugo
|
||||
Before you do anything else, you have to call the function
|
||||
@code{init_gnugo()}. This function initializes everything within the engine.
|
||||
It takes one parameter: the number of megabytes the engine can use for
|
||||
the internal hash table. In addition to this the engine will use a few
|
||||
megabytes for other purposes such as data describing groups (liberties,
|
||||
life status, etc), eyes and so on.
|
||||
|
||||
@node Basic Data Structures
|
||||
@section Basic Data Structures in the Engine
|
||||
@cindex data structures
|
||||
@cindex position struct
|
||||
|
||||
|
||||
There are some basic definitions in gnugo.h which are used
|
||||
everywhere. The most important of these are the numeric declarations of
|
||||
colors. Each intersection on the board is represented by one of these:
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
color value
|
||||
EMPTY 0
|
||||
WHITE 1
|
||||
BLACK 2
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
There is a macro, @code{OTHER_COLOR(color)} which can be used to get the
|
||||
other color than the parameter. This macro can only be used on @code{WHITE}
|
||||
or @code{BLACK}, but not on @code{EMPTY}.
|
||||
@findex OTHER_COLOR
|
||||
|
||||
GNU Go uses two different representations of the board, for
|
||||
most purposes a one-dimensional one, but for a few purposes a
|
||||
two dimensional one (@pxref{Libboard}). The one-dimensional
|
||||
board was introduced before GNU Go 3.2, while the two-dimensional
|
||||
board dates back to the ancestral program written by Man Lung Li
|
||||
before 1995. The API still uses the two-dimensional board, so
|
||||
the API functions have not changed much since GNU Go 3.0.
|
||||
|
||||
@node The Board State
|
||||
|
||||
@section The board_state struct
|
||||
@cindex board_state
|
||||
|
||||
A basic data structure in the engine is the @code{board_state} struct.
|
||||
This structure is internal to the engine and is defined in @file{liberty.h}.
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
typedef unsigned char Intersection;
|
||||
|
||||
struct board_state @{
|
||||
int board_size;
|
||||
|
||||
Intersection board[BOARDSIZE];
|
||||
int board_ko_pos;
|
||||
int black_captured;
|
||||
int white_captured;
|
||||
|
||||
Intersection initial_board[BOARDSIZE];
|
||||
int initial_board_ko_pos;
|
||||
int initial_white_captured;
|
||||
int initial_black_captured;
|
||||
int move_history_color[MAX_MOVE_HISTORY];
|
||||
int move_history_pos[MAX_MOVE_HISTORY];
|
||||
int move_history_pointer;
|
||||
|
||||
float komi;
|
||||
int move_number;
|
||||
@};
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Here @code{Intersection} stores @code{EMPTY}, @code{WHITE} or
|
||||
@code{BLACK}. It is currently defined as an @code{unsigned char} to make
|
||||
it reasonably efficient in both storage and access time. The board state
|
||||
contains an array of @code{Intersection}'s representing the board.
|
||||
The move history is contained in the struct. Also contained in
|
||||
the struct is the location of a ko (@code{EMPTY}) if the last
|
||||
move was not a ko capture, the komi, the number of captures, and
|
||||
corresponding data for the initial position at the beginning
|
||||
of the move history.
|
||||
|
||||
@node Positional Functions
|
||||
|
||||
@section Functions which manipulate a Position
|
||||
|
||||
All the functions in the engine that manipulate Positions have names
|
||||
prefixed by @code{gnugo_}. These functions still use the two-dimensional
|
||||
representation of the board (@pxref{The Board Array}). Here is a complete
|
||||
list, as prototyped in @file{gnugo.h}:
|
||||
|
||||
@itemize
|
||||
@item @code{void init_gnugo(float memory)}
|
||||
@findex init_gnugo
|
||||
@quotation
|
||||
Initialize the gnugo engine. This needs to be called
|
||||
once only.
|
||||
@end quotation
|
||||
@item @code{void gnugo_clear_board(int boardsize)}
|
||||
@findex gnugo_clear_board
|
||||
@quotation
|
||||
Clear the board.
|
||||
@end quotation
|
||||
@item @code{void gnugo_set_komi(float new_komi)}
|
||||
@findex gnugo_set_komi
|
||||
@quotation
|
||||
Set the komi.
|
||||
@end quotation
|
||||
@item @code{void gnugo_add_stone(int i, int j, int color)}
|
||||
@findex gnugo_add_stone
|
||||
@quotation
|
||||
Place a stone on the board
|
||||
@end quotation
|
||||
@item @code{void gnugo_remove_stone(int i, int j)}
|
||||
@findex gnugo_remove_stone
|
||||
@quotation
|
||||
Remove a stone from the board
|
||||
@end quotation
|
||||
@item @code{int gnugo_is_pass(int i, int j)}
|
||||
@findex gnugo_is_pass
|
||||
@quotation
|
||||
Return true if (i,j) is PASS_MOVE
|
||||
@end quotation
|
||||
@item @code{void gnugo_play_move(int i, int j, int color)}
|
||||
@findex gnugo_play_move
|
||||
@quotation
|
||||
Play a move and start the clock
|
||||
@end quotation
|
||||
@item @code{int gnugo_undo_move(int n)}
|
||||
@findex gnugo_undo_move
|
||||
@quotation
|
||||
Undo n permanent moves. Returns 1 if successful and 0 if it fails.
|
||||
If n moves cannot be undone, no move is undone.
|
||||
@end quotation
|
||||
@item @code{int gnugo_play_sgfnode(SGFNode *node, int to_move)}
|
||||
@findex gnugo_play_sgfnode
|
||||
@quotation
|
||||
Perform the moves and place the stones from the SGF node on the
|
||||
board. Return the color of the player whose turn it is to move.
|
||||
@end quotation
|
||||
@item @code{int gnugo_play_sgftree(SGFNode *root, int *until, SGFNode **curnode)}
|
||||
@findex gnugo_play_sgftree
|
||||
@quotation
|
||||
Play the moves in ROOT UNTIL movenumber is reached. Return the color of the
|
||||
player whose turn it is to move.
|
||||
@end quotation
|
||||
@item @code{int gnugo_is_legal(int i, int j, int color)}
|
||||
@findex gnugo_is_legal
|
||||
@quotation
|
||||
Interface to @code{is_legal()}.
|
||||
@end quotation
|
||||
@item @code{int gnugo_is_suicide(int i, int j, int color)}
|
||||
@findex gnugo_is_suicide
|
||||
@quotation
|
||||
Interface to @code{is_suicide()}.
|
||||
@end quotation
|
||||
@item @code{int gnugo_placehand(int handicap)}
|
||||
@findex gnugo_placehand
|
||||
@quotation
|
||||
Interface to placehand. Sets up handicap pieces and
|
||||
returns the number of placed handicap stones.
|
||||
@end quotation
|
||||
@item @code{void gnugo_recordboard(SGFNode *root)}
|
||||
@findex gnugo_recordboard
|
||||
@quotation
|
||||
Interface to @code{sgffile_recordboard()}
|
||||
@end quotation
|
||||
@item @code{int gnugo_sethand(int handicap, SGFNode *node)}
|
||||
@findex gnugo_sethand
|
||||
@quotation
|
||||
Interface to placehand. Sets up handicap stones and
|
||||
returns the number of placed handicap stones, updating the sgf file
|
||||
@end quotation
|
||||
@item @code{float gnugo_genmove(int *i, int *j, int color, int *resign)}
|
||||
@findex gnugo_genmove
|
||||
@quotation
|
||||
Interface to @code{genmove()}.
|
||||
@end quotation
|
||||
@item @code{int gnugo_attack(int m, int n, int *i, int *j)}
|
||||
@findex gnugo_attack
|
||||
@quotation
|
||||
Interface to @code{attack()}.
|
||||
@end quotation
|
||||
@item @code{int gnugo_find_defense(int m, int n, int *i, int *j)}
|
||||
@findex gnugo_find_defense
|
||||
@quotation
|
||||
Interface to @code{find_defense()}.
|
||||
@end quotation
|
||||
@item @code{void gnugo_who_wins(int color, FILE *outfile)}
|
||||
@findex gnugo_who_wins
|
||||
@quotation
|
||||
Interface to @code{who_wins()}.
|
||||
@end quotation
|
||||
@item @code{float gnugo_estimate_score(float *upper, float *lower)}
|
||||
@findex gnugo_estimate_score
|
||||
@quotation
|
||||
Put upper and lower score estimates into @code{*upper}, @code{*lower} and
|
||||
return the average. A positive score favors white. In computing
|
||||
the upper bound, @code{CRITICAL} dragons are awarded to white; in
|
||||
computing the lower bound, they are awarded to black.
|
||||
@end quotation
|
||||
@item @code{void gnugo_examine_position(int color, int how_much)}
|
||||
@findex gnugo_examine_position
|
||||
@quotation
|
||||
Interface to @code{examine_position}.
|
||||
@end quotation
|
||||
@item @code{int gnugo_get_komi()}
|
||||
@findex gnugo_get_komi
|
||||
@quotation
|
||||
Report the komi.
|
||||
@end quotation
|
||||
@item @code{void gnugo_get_board(int b[MAX_BOARD][MAX_BOARD])}
|
||||
@findex gnugo_get_board
|
||||
@quotation
|
||||
Place the board into the @samp{b} array.
|
||||
@end quotation
|
||||
@item @code{int gnugo_get_boardsize()}
|
||||
@findex gnugo_get_boardsize
|
||||
@quotation
|
||||
Report the board size.
|
||||
@end quotation
|
||||
@item @code{int gnugo_get_move_number()}
|
||||
@findex gnugo_get_move_number
|
||||
@quotation
|
||||
Report the move number.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@section Game handling
|
||||
|
||||
The functions (in @pxref{Positional Functions}) are all that are needed to
|
||||
create a fully functional go program. But to make the life easier for the
|
||||
programmer, there is a small set of functions specially designed for handling
|
||||
ongoing games.
|
||||
|
||||
The data structure describing an ongoing game is the @code{Gameinfo}. It
|
||||
is defined as follows:
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
typedef struct @{
|
||||
int handicap;
|
||||
|
||||
int to_move; /* whose move it currently is */
|
||||
SGFTree game_record; /* Game record in sgf format. */
|
||||
|
||||
int computer_player; /* BLACK, WHITE, or EMPTY (used as BOTH) */
|
||||
|
||||
char outfilename[128]; /* Trickle file */
|
||||
FILE *outfile;
|
||||
@} Gameinfo;
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
The meaning of @code{handicap} should be obvious. @code{to_move} is the
|
||||
color of the side whose turn it is to move.
|
||||
|
||||
The SGF tree @code{game_record} is used to store all the moves in the entire
|
||||
game, including a header node which contains, among other things, komi
|
||||
and handicap.
|
||||
|
||||
If one or both of the opponents is the computer, the field
|
||||
@code{computer_player} is used. Otherwise it can be ignored.
|
||||
|
||||
GNU Go can use a trickle file to continuously save all the moves of an
|
||||
ongoing game. This file can also contain information about internal
|
||||
state of the engine such as move reasons for various locations or move
|
||||
valuations. The name of this file should
|
||||
be stored in @code{outfilename} and the file pointer to the open file is
|
||||
stored in @code{outfile}. If no trickle file is used,
|
||||
@code{outfilename[0]} will contain a null character and @code{outfile}
|
||||
will be set to @code{NULL}.
|
||||
|
||||
@subsection Functions which manipulate a Gameinfo
|
||||
|
||||
All the functions in the engine that manipulate Gameinfos have names
|
||||
prefixed by @code{gameinfo_}. Here is a complete list, as prototyped in
|
||||
@file{gnugo.h}:
|
||||
|
||||
@itemize
|
||||
@item @code{void gameinfo_clear(Gameinfo *ginfo, int boardsize, float komi)}
|
||||
@findex gameinfo_clear
|
||||
@quotation
|
||||
Initialize the @code{Gameinfo} structure.
|
||||
@end quotation
|
||||
@item @code{void gameinfo_print(Gameinfo *ginfo)}
|
||||
@findex gameinfo_print
|
||||
@quotation
|
||||
Print a gameinfo.
|
||||
@end quotation
|
||||
@item @code{void gameinfo_load_sgfheader(Gameinfo *gameinfo, SGFNode *head)}
|
||||
@findex gameinfo_load_sgfheader
|
||||
@quotation
|
||||
Reads header info from sgf structure and sets the appropriate variables.
|
||||
@end quotation
|
||||
@item @code{void gameinfo_play_move(Gameinfo *ginfo, int i, int j, int color)}
|
||||
@findex gameinfo_play_move
|
||||
@quotation
|
||||
Make a move in the game. Return 1 if the move was legal. In that
|
||||
case the move is actually done. Otherwise return 0.
|
||||
@end quotation
|
||||
@item @code{int gameinfo_play_sgftree_rot(Gameinfo *gameinfo, SGFNode *head, const char *untilstr, int orientation)}
|
||||
@findex gameinfo_play_sgftree_rot
|
||||
@quotation
|
||||
Play the moves in an SGF tree. Walk the main variation, actioning the
|
||||
properties into the playing board. Returns the color of the next move to be
|
||||
made. Head is an sgf tree. Untilstr is an optional string of the form either
|
||||
'L12' or '120' which tells it to stop playing at that move or move
|
||||
number. When debugging, this is the location of the move being examined.
|
||||
@end quotation
|
||||
@item @code{int gameinfo_play_sgftree(Gameinfo *gameinfo, SGFNode *head, const char *untilstr)}
|
||||
@findex gameinfo_play_sgftree
|
||||
@quotation
|
||||
Same as previous function, using standard orientation.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
|
11
gnugo/doc/automake-1.4.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- automake.orig Sat Jan 16 19:37:42 1999
|
||||
+++ automake Sat Oct 30 15:55:04 1999
|
||||
@@ -2367,7 +2367,7 @@
|
||||
$output_rules .= "\t d=\$(srcdir); \\\n";
|
||||
}
|
||||
$output_rules .= ("\t if test -d \$\$d/\$\$file; then \\\n"
|
||||
- . "\t cp -pr \$\$/\$\$file \$(distdir)/\$\$file; \\\n"
|
||||
+ . "\t cp -pr \$\$d/\$\$file \$(distdir)/\$\$file; \\\n"
|
||||
. "\t else \\\n"
|
||||
. "\t test -f \$(distdir)/\$\$file \\\n"
|
||||
. "\t || ln \$\$d/\$\$file \$(distdir)/\$\$file 2> /dev/null \\\n"
|
573
gnugo/doc/board.texi
Normal file
|
@ -0,0 +1,573 @@
|
|||
@menu
|
||||
* Board Data Structures:: Board Data Structures
|
||||
* The Board Array:: One-dimensional board array
|
||||
* Incremental Board:: Incremental board data structures
|
||||
* Some Board Functions:: Explanation of some board functions
|
||||
@end menu
|
||||
|
||||
The foundation of the GNU Go engine is a library of very efficient
|
||||
routines for handling go boards. This board library, called
|
||||
@file{libboard}, can be used for those programs that only need a
|
||||
basic go board but no AI capability. One such program is
|
||||
@file{patterns/joseki.c}, which compiles joseki pattern
|
||||
databases from SGF files.
|
||||
|
||||
If you want to use the board library in your own program, you need all
|
||||
the .c-files listed under libboard_SOURCES in engine/Makefile.am, and
|
||||
the files in the directories sgf/ and utils/. Then you should include
|
||||
engine/board.h in your code.
|
||||
|
||||
The library consists of the following files:
|
||||
|
||||
@itemize
|
||||
@item @file{board.h}
|
||||
@quotation
|
||||
The public interface to the board library.
|
||||
@end quotation
|
||||
|
||||
@item @file{board.c}
|
||||
@quotation
|
||||
The basic board code. It uses incremental algorithms for keeping track
|
||||
of strings and liberties on the go board.
|
||||
@end quotation
|
||||
|
||||
@item @file{boardlib.c}
|
||||
@quotation
|
||||
This contains all global variable of the board library.
|
||||
@end quotation
|
||||
|
||||
@item @file{hash.c}
|
||||
@quotation
|
||||
Code for hashing go positions.
|
||||
@end quotation
|
||||
|
||||
@item @file{sgffile.c}
|
||||
@quotation
|
||||
Implementation of output file in SGF format.
|
||||
@end quotation
|
||||
|
||||
@item @file{printutils.c}
|
||||
@quotation
|
||||
Utilities for printing go boards and other things.
|
||||
@end quotation
|
||||
|
||||
@end itemize
|
||||
|
||||
To use the board library, you must include @file{liberty.h} just like
|
||||
when you use the whole engine, but of course you cannot use all the
|
||||
functions declared in it, i.e. the functions that are part of the
|
||||
engine, but not part of the board library. You must link your
|
||||
application with @code{libboard.a}.
|
||||
|
||||
@node Board Data Structures
|
||||
@section Board Data structures
|
||||
|
||||
The basic data structures of the board correspond tightly to the
|
||||
@code{board_state} struct described in @xref{The Board State}. They are all
|
||||
stored in global variables for efficiency reasons, the most important of which
|
||||
are:
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
int board_size;
|
||||
Intersection board[MAXSIZE];
|
||||
int board_ko_pos;
|
||||
|
||||
float komi;
|
||||
int white_captured;
|
||||
int black_captured;
|
||||
|
||||
Hash_data hashdata;
|
||||
@end group
|
||||
@end example
|
||||
|
||||
The description of the @code{Position} struct is applicable to these
|
||||
variables also, so we won't duplicate it here. All these variables are
|
||||
globals for performance reasons. Behind these variables, there are a
|
||||
number of other private data structures. These implement incremental
|
||||
handling of strings, liberties and other properties
|
||||
(@pxref{Incremental Board}). The variable @code{hashdata} contains information
|
||||
about the hash value for the current position (@pxref{Hashing}).
|
||||
|
||||
These variables should never be manipulated directly, since they are
|
||||
only the front end for the incremental machinery. They can be read, but
|
||||
should only be written by using the functions described in the next
|
||||
section. If you write directly to them, the incremental data structures
|
||||
will become out of sync with each other, and a crash is the likely
|
||||
result.
|
||||
|
||||
@node The Board Array
|
||||
@section The Board Array
|
||||
|
||||
GNU Go represents the board in a one-dimensional array called
|
||||
@code{board}. For some purposes a two dimensional indexing of the
|
||||
board by parameters @code{(i,j)} might be used.
|
||||
|
||||
The @code{board} array includes out-of-board markers around the
|
||||
board. To make the relation to the old two-dimensional board
|
||||
representation clear, this figure shows how the 1D indices correspond
|
||||
to the 2D indices when MAX_BOARD is 7.
|
||||
|
||||
@example
|
||||
@group
|
||||
j -1 0 1 2 3 4 5 6
|
||||
i +----------------------------------
|
||||
-1| 0 1 2 3 4 5 6 7
|
||||
0| 8 9 10 11 12 13 14 15
|
||||
1| 16 17 18 19 20 21 22 23
|
||||
2| 24 25 26 27 28 29 30 31
|
||||
3| 32 33 34 35 36 37 38 39
|
||||
4| 40 41 42 43 44 45 46 47
|
||||
5| 48 49 50 51 52 53 54 55
|
||||
6| 56 57 58 59 60 61 62 63
|
||||
7| 64 65 66 67 68 69 70 71 72
|
||||
@end group
|
||||
@end example
|
||||
|
||||
To convert between a 1D index @code{pos} and a 2D index @code{(i,j)},
|
||||
the macros @code{POS}, @code{I}, and @code{J} are provided, defined as
|
||||
below:
|
||||
|
||||
@example
|
||||
#define POS(i, j) ((MAX_BOARD + 2) + (i) * (MAX_BOARD + 1) + (j))
|
||||
#define I(pos) ((pos) / (MAX_BOARD + 1) - 1)
|
||||
#define J(pos) ((pos) % (MAX_BOARD + 1) - 1)
|
||||
@end example
|
||||
|
||||
All 1D indices not corresponding to points on the board have the out
|
||||
of board marker value @code{GRAY}. Thus if @code{board_size} and
|
||||
@code{MAX_BOARD} both are 7, this looks like
|
||||
|
||||
@example
|
||||
@group
|
||||
j -1 0 1 2 3 4 5 6
|
||||
i +----------------------------------
|
||||
-1| # # # # # # # #
|
||||
0| # . . . . . . .
|
||||
1| # . . . . . . .
|
||||
2| # . . . . . . .
|
||||
3| # . . . . . . .
|
||||
4| # . . . . . . .
|
||||
5| # . . . . . . .
|
||||
6| # . . . . . . .
|
||||
7| # # # # # # # # #
|
||||
@end group
|
||||
@end example
|
||||
|
||||
The indices marked @samp{#} have value @code{GRAY}.
|
||||
If @code{MAX_BOARD} is 7 and @code{board_size} is only 5:
|
||||
|
||||
@example
|
||||
@group
|
||||
j -1 0 1 2 3 4 5 6
|
||||
i +----------------------------------
|
||||
-1| # # # # # # # #
|
||||
0| # . . . . . # #
|
||||
1| # . . . . . # #
|
||||
2| # . . . . . # #
|
||||
3| # . . . . . # #
|
||||
4| # . . . . . # #
|
||||
5| # # # # # # # #
|
||||
6| # # # # # # # #
|
||||
7| # # # # # # # # #
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Navigation on the board is done by the @code{SOUTH}, @code{WEST},
|
||||
@code{NORTH}, and @code{EAST} macros,
|
||||
|
||||
@example
|
||||
#define NS (MAX_BOARD + 1)
|
||||
#define WE 1
|
||||
#define SOUTH(pos) ((pos) + NS)
|
||||
#define WEST(pos) ((pos) - 1)
|
||||
#define NORTH(pos) ((pos) - NS)
|
||||
#define EAST(pos) ((pos) + 1)
|
||||
@end example
|
||||
|
||||
There are also shorthand macros @code{SW}, @code{NW}, @code{NE},
|
||||
@code{SE}, @code{SS}, @code{WW}, @code{NN}, @code{EE} for two step
|
||||
movements.
|
||||
|
||||
Any movement from a point on the board to an adjacent or diagonal
|
||||
vertex is guaranteed to produce a valid index into the board array, and
|
||||
the color found is GRAY if it is not on the board. To do explicit tests
|
||||
for out of board there are two macros
|
||||
|
||||
@example
|
||||
#define ON_BOARD(pos) (board[pos] != GRAY)
|
||||
#define ON_BOARD1(pos) (((unsigned) (pos) < BOARDSIZE) && board[pos] != GRAY)
|
||||
@end example
|
||||
|
||||
where the first one should be used in the algorithms and the second
|
||||
one is useful for assertion tests.
|
||||
|
||||
The advantage of a one-dimensional board array is that it gives a
|
||||
significant performance advantage. We need only one variable to determine
|
||||
a board position, which means that many functions need less arguments. Also,
|
||||
often one computation is sufficient for 1D-coordinate where we would need
|
||||
two with two 2D-coordinates: If we, for example, want to have the
|
||||
coordinate of the upper right of @code{pos}, we can do this with
|
||||
@code{NORTH(EAST(pos))} instead of @code{(i+1, j-1)}.
|
||||
|
||||
@strong{Important}: The 2D coordinate @code{(-1,-1)}, which is used for
|
||||
pass and sometimes to indicate no point, maps to the 1D coordinate
|
||||
@code{0}, not to @code{-1}. Instead of a plain @code{0}, use one of the
|
||||
macros @code{NO_MOVE} or @code{PASS_MOVE}.
|
||||
|
||||
A loop over multiple directions is straightforwardly written:
|
||||
|
||||
@example
|
||||
for (k = 0; k < 4; k++) @{
|
||||
int d = delta[k];
|
||||
do_something(pos + d);
|
||||
@}
|
||||
@end example
|
||||
|
||||
The following constants are useful for loops over the entire board and
|
||||
allocation of arrays with a 1-1 mapping to the board.
|
||||
|
||||
@example
|
||||
#define BOARDSIZE ((MAX_BOARD + 2) * (MAX_BOARD + 1) + 1)
|
||||
#define BOARDMIN (MAX_BOARD + 2)
|
||||
#define BOARDMAX (MAX_BOARD + 1) * (MAX_BOARD + 1)
|
||||
@end example
|
||||
|
||||
@code{BOARDSIZE} is the actual size of the 1D board array,
|
||||
@code{BOARDMIN} is the first index corresponding to a point on the
|
||||
board, and @code{BOARDMAX} is one larger than the last index corresponding to
|
||||
a point on the board.
|
||||
|
||||
Often one wants to traverse the board, carrying out some function
|
||||
at every vertex. Here are two possible ways of doing this:
|
||||
|
||||
@example
|
||||
int m, n;
|
||||
for (m = 0; m < board_size; m++)
|
||||
for (n = 0; n < board_size; n++) @{
|
||||
do_something(POS(m, n));
|
||||
@}
|
||||
@end example
|
||||
|
||||
Or:
|
||||
|
||||
@example
|
||||
int pos;
|
||||
for (pos = BOARDMIN; pos < BOARDMAX; pos++) @{
|
||||
if (ON_BOARD(pos))
|
||||
do_something(pos);
|
||||
@}
|
||||
@end example
|
||||
|
||||
|
||||
@node Incremental Board
|
||||
@section Incremental Board data structures
|
||||
|
||||
In addition to the global board state, the algorithms in @file{board.c}
|
||||
implement a method of incremental updates that keeps track of the
|
||||
following information for each string:
|
||||
|
||||
@itemize @bullet
|
||||
@item The color of the string.
|
||||
@item Number of stones in the string.
|
||||
@item Origin of the string, i.e. a canonical reference point, defined
|
||||
to be the stone with smallest 1D board coordinate.
|
||||
@item A list of the stones in the string.
|
||||
@item Number of liberties.
|
||||
@item A list of the liberties. If there are too many liberties the list is
|
||||
truncated.
|
||||
@item The number of neighbor strings.
|
||||
@item A list of the neighbor strings.
|
||||
@end itemize
|
||||
|
||||
The basic data structure is
|
||||
|
||||
@example
|
||||
struct string_data @{
|
||||
int color; /* Color of string, BLACK or WHITE */
|
||||
int size; /* Number of stones in string. */
|
||||
int origin; /* Coordinates of "origin", i.e. */
|
||||
/* "upper left" stone. */
|
||||
int liberties; /* Number of liberties. */
|
||||
int libs[MAX_LIBERTIES]; /* Coordinates of liberties. */
|
||||
int neighbors; /* Number of neighbor strings */
|
||||
int neighborlist[MAXCHAIN]; /* List of neighbor string numbers. */
|
||||
int mark; /* General purpose mark. */
|
||||
@};
|
||||
|
||||
struct string_data string[MAX_STRINGS];
|
||||
@end example
|
||||
|
||||
It should be clear that almost all information is stored in the
|
||||
@code{string} array. To get a mapping from the board coordinates to the
|
||||
@code{string} array we have
|
||||
|
||||
@example
|
||||
static int string_number[BOARDMAX];
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
which contains indices into the @code{string} array. This information is only
|
||||
valid at nonempty vertices, however, so it is necessary to first
|
||||
verify that @code{board[pos] != EMPTY}.
|
||||
|
||||
The @code{string_data} structure does not include an array of the stone
|
||||
coordinates. This information is stored in a separate array:
|
||||
|
||||
@example
|
||||
static int next_stone[BOARDMAX];
|
||||
@end example
|
||||
|
||||
This array implements cyclic linked lists of stones. Each vertex
|
||||
contains a pointer to another (possibly the same) vertex. Starting at
|
||||
an arbitrary stone on the board, following these pointers should
|
||||
traverse the entire string in an arbitrary order before coming back to
|
||||
the starting point. As for the 'string_number' array, this information
|
||||
is invalid at empty points on the board. This data structure has the
|
||||
good properties of requiring fixed space (regardless of the number of
|
||||
strings) and making it easy to add a new stone or join two strings.
|
||||
|
||||
Additionally the code makes use of some work variables:
|
||||
|
||||
@example
|
||||
static int ml[BOARDMAX];
|
||||
static int liberty_mark;
|
||||
static int string_mark;
|
||||
static int next_string;
|
||||
static int strings_initialized = 0;
|
||||
@end example
|
||||
|
||||
The @code{ml} array and @code{liberty_mark} are used to "mark" liberties on
|
||||
the board, e.g. to avoid counting the same liberty twice. The convention is
|
||||
that if @code{ml[pos]} has the same value as @code{liberty_mark}, then
|
||||
@code{pos} is marked. To clear all marks it suffices to increase the value
|
||||
of @code{liberty_mark}, since it is never allowed to decrease.
|
||||
|
||||
The same relation holds between the @code{mark} field of the @code{string_data}
|
||||
structure and @code{string_mark}. Of course these are used for marking
|
||||
individual strings.
|
||||
|
||||
@code{next_string} gives the number of the next available entry in the
|
||||
@code{string} array. Then @code{strings_initialized} is set to one when
|
||||
all data structures are known to be up to date. Given an arbitrary board
|
||||
position in the @samp{board} array, this is done by calling
|
||||
@code{incremental_board_init()}. It is not necessary to call this
|
||||
function explicitly since any other function that needs the information
|
||||
does this if it has not been done.
|
||||
|
||||
The interesting part of the code is the incremental update of the data
|
||||
structures when a stone is played and subsequently removed. To
|
||||
understand the strategies involved in adding a stone it is necessary
|
||||
to first know how undoing a move works. The idea is that as soon as
|
||||
some piece of information is about to be changed, the old value is
|
||||
pushed onto a stack which stores the value and its address. The stack
|
||||
is built from the following structures:
|
||||
|
||||
@example
|
||||
struct change_stack_entry @{
|
||||
int *address;
|
||||
int value;
|
||||
@};
|
||||
|
||||
struct change_stack_entry change_stack[STACK_SIZE];
|
||||
int change_stack_index;
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
and manipulated with the macros
|
||||
|
||||
@example
|
||||
BEGIN_CHANGE_RECORD()
|
||||
PUSH_VALUE(v)
|
||||
POP_MOVE()
|
||||
@end example
|
||||
|
||||
Calling @code{BEGIN_CHANGE_RECORD()} stores a null pointer in the address
|
||||
field to indicate the start of changes for a new move. As mentioned
|
||||
earlier @code{PUSH_VALUE()} stores a value and its corresponding address.
|
||||
Assuming that all changed information has been duly pushed onto the
|
||||
stack, undoing the move is only a matter of calling @code{POP_MOVE()},
|
||||
which simply assigns the values to the addresses in the reverse order
|
||||
until the null pointer is reached. This description is slightly
|
||||
simplified because this stack can only store 'int' values and we need
|
||||
to also store changes to the board. Thus we have two parallel stacks
|
||||
where one stores @code{int} values and the other one stores
|
||||
@code{Intersection} values.
|
||||
|
||||
When a new stone is played on the board, first captured opponent
|
||||
strings, if any, are removed. In this step we have to push the board
|
||||
values and the @code{next_stone} pointers for the removed stones, and
|
||||
update the liberties and neighbor lists for the neighbors of the
|
||||
removed strings. We do not have to push all information in the
|
||||
'string' entries of the removed strings however. As we do not reuse
|
||||
the entries they will remain intact until the move is pushed and they
|
||||
are back in use.
|
||||
|
||||
After this we put down the new stone and get three distinct cases:
|
||||
|
||||
@enumerate
|
||||
@item The new stone is isolated, i.e. it has no friendly neighbor.
|
||||
@item The new stone has exactly one friendly neighbor.
|
||||
@item The new stone has at least two friendly neighbors.
|
||||
@end enumerate
|
||||
|
||||
The first case is easiest. Then we create a new string by using the
|
||||
number given by @code{next_string} and increasing this variable. The string
|
||||
will have size one, @code{next_stone} points directly back on itself, the
|
||||
liberties can be found by looking for empty points in the four
|
||||
directions, possible neighbor strings are found in the same way, and
|
||||
those need also to remove one liberty and add one neighbor.
|
||||
|
||||
In the second case we do not create a new string but extend the
|
||||
neighbor with the new stone. This involves linking the new stone into
|
||||
the cyclic chain, if needed moving the origin, and updating liberties
|
||||
and neighbors. Liberty and neighbor information also needs updating
|
||||
for the neighbors of the new stone.
|
||||
|
||||
In the third case finally, we need to join already existing strings.
|
||||
In order not to have to store excessive amounts of information, we
|
||||
create a new string for the new stone and let it assimilate the
|
||||
neighbor strings. Thus all information about those can simply be left
|
||||
around in the 'string' array, exactly as for removed strings. Here it
|
||||
becomes a little more complex to keep track of liberties and neighbors
|
||||
since those may have been shared by more than one of the joined
|
||||
strings. Making good use of marks it all becomes rather
|
||||
straightforward anyway.
|
||||
|
||||
The often used construction
|
||||
|
||||
@example
|
||||
pos = FIRST_STONE(s);
|
||||
do @{
|
||||
...
|
||||
pos = NEXT_STONE(pos);
|
||||
@} while (!BACK_TO_FIRST_STONE(s, pos));
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
traverses the stones of the string with number @samp{s} exactly once,
|
||||
with @code{pos} holding the coordinates. In general @code{pos} is
|
||||
used as board coordinate and @samp{s} as an index into the
|
||||
@code{string} array or sometimes a pointer to an entry in the
|
||||
@code{string} array.
|
||||
|
||||
@node Some Board Functions
|
||||
@section Some Board Functions
|
||||
|
||||
@strong{Reading}, often called @strong{search} in computer game
|
||||
theory, is a fundamental process in GNU Go. This is the process
|
||||
of generating hypothetical future boards in order to determine
|
||||
the answer to some question, for example "can these stones live."
|
||||
Since these are hypothetical future positions, it is important
|
||||
to be able to undo them, ultimately returning to the present
|
||||
board. Thus a move stack is maintained during reading. When
|
||||
a move is tried, by the function @code{trymove}, or its
|
||||
variant @code{tryko}. This function pushes the current board
|
||||
on the stack and plays a move. The stack pointer @code{stackp},
|
||||
which keeps track of the position, is incremented. The function
|
||||
@code{popgo()} pops the move stack, decrementing @code{stackp} and
|
||||
undoing the last move made.
|
||||
|
||||
Every successful @code{trymove()} must be matched with a @code{popgo()}.
|
||||
Thus the correct way of using this function is:
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
if (trymove(pos, color, ... )) @{
|
||||
... [potentially lots of code here]
|
||||
popgo();
|
||||
@}
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
|
||||
In case the move is a ko capture, the legality of the capture is subject to
|
||||
the komaster scheme (@pxref{Ko}).
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{int trymove(int pos, int color, const char *message)}
|
||||
@findex trymove
|
||||
@quotation
|
||||
Returns true if @code{(pos)} is a legal move for @code{color}. In that
|
||||
case, it pushes the board on the stack and makes the move, incrementing
|
||||
@code{stackp}. If the reading code is recording reading variations (as
|
||||
with @option{--decide-string} or with @option{-o}), the string
|
||||
@code{*message} will be inserted in the SGF file as a comment. The
|
||||
comment will also refer to the string at @code{str} if this is not
|
||||
@code{0}. The value of @code{str} can be NO_MOVE if it is not needed but
|
||||
otherwise the location of @code{str} is included in the comment.
|
||||
@end quotation
|
||||
@item @code{int tryko(int pos, int color, const char *message)}
|
||||
@findex tryko
|
||||
@quotation
|
||||
@code{tryko()} pushes the position onto the stack, and makes a move
|
||||
@code{pos} of @code{color}. The move is allowed even if it is an
|
||||
illegal ko capture. It is to be imagined that @code{color} has made an
|
||||
intervening ko threat which was answered and now the continuation is to
|
||||
be explored. Return 1 if the move is legal with the above
|
||||
caveat. Returns zero if it is not legal because of suicide.
|
||||
@end quotation
|
||||
|
||||
@item @code{void popgo()}
|
||||
@findex popgo
|
||||
@quotation
|
||||
Pops the move stack. This function must (eventually) be called after a
|
||||
succesful @code{trymove} or @code{tryko} to restore the board
|
||||
position. It undoes all the changes done by the call to
|
||||
@code{trymove/tryko} and leaves the board in the same state as it was
|
||||
before the call.
|
||||
|
||||
@strong{NOTE}: If @code{trymove/tryko} returns @code{0}, i.e. the tried
|
||||
move was not legal, you must @strong{not} call @code{popgo}.
|
||||
@end quotation
|
||||
|
||||
@item @code{int komaster_trymove(int pos, int color, const char *message, int str, int *is_conditional_ko, int consider_conditional_ko)}
|
||||
@findex komaster_trymove
|
||||
@quotation
|
||||
Variation of @code{trymove}/@code{tryko} where ko captures (both
|
||||
conditional and unconditional) must follow a komaster scheme
|
||||
(@pxref{Ko}).
|
||||
@end quotation
|
||||
|
||||
@end itemize
|
||||
|
||||
As you see, @code{trymove()} plays a move which can be easily
|
||||
retracted (with @code{popgo()}) and it is call thousands of
|
||||
times per actual game move as GNU Go analyzes the board position.
|
||||
By contrast the function @code{play_move()} plays a move which
|
||||
is intended to be permanent, though it is still possible to
|
||||
undo it if, for example, the opponent retracts a move.
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{void play_move(int pos, int color)}
|
||||
@findex play_move
|
||||
@quotation
|
||||
Play a move. If you want to test for legality you should first call
|
||||
@code{is_legal()}. This function strictly follows the algorithm:
|
||||
@enumerate
|
||||
@item Place a stone of given color on the board.
|
||||
@item If there are any adjacent opponent strings without liberties,
|
||||
remove them and increase the prisoner count.
|
||||
@item If the newly placed stone is part of a string without liberties,
|
||||
remove it and increase the prisoner count.
|
||||
@end enumerate
|
||||
In spite of the name ``permanent move'', this move can (usually) be
|
||||
unplayed by @code{undo_move()}, but it is significantly more costly than
|
||||
unplaying a temporary move. There are limitations on the available
|
||||
move history, so under certain circumstances the move may not be
|
||||
possible to unplay at a later time.
|
||||
@end quotation
|
||||
@item @code{int undo_move(int n)}
|
||||
@findex undo_move
|
||||
@quotation
|
||||
Undo @samp{n} permanent moves. Returns 1 if successful and 0 if it fails.
|
||||
If @samp{n} moves cannot be undone, no move is undone.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
Other board functions are documented in @xref{Board Utilities}.
|
||||
|
930
gnugo/doc/cdfa.eps
Normal file
|
@ -0,0 +1,930 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: cdfa.eps
|
||||
%%Creator: fig2dev Version 3.2 Patchlevel 1
|
||||
%%CreationDate: Fri Jun 22 18:54:03 2001
|
||||
%%For: turvoy@semeai.irisa.fr (Tanguy Urvoy, DEA, Paragraphe)
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 411 113
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%Magnification: 0.5000
|
||||
%%EndComments
|
||||
/$F2psDict 200 dict def
|
||||
$F2psDict begin
|
||||
$F2psDict /mtrx matrix put
|
||||
/col-1 {0 setgray} bind def
|
||||
/col0 {0.000 0.000 0.000 srgb} bind def
|
||||
/col1 {0.000 0.000 1.000 srgb} bind def
|
||||
/col2 {0.000 1.000 0.000 srgb} bind def
|
||||
/col3 {0.000 1.000 1.000 srgb} bind def
|
||||
/col4 {1.000 0.000 0.000 srgb} bind def
|
||||
/col5 {1.000 0.000 1.000 srgb} bind def
|
||||
/col6 {1.000 1.000 0.000 srgb} bind def
|
||||
/col7 {1.000 1.000 1.000 srgb} bind def
|
||||
/col8 {0.000 0.000 0.560 srgb} bind def
|
||||
/col9 {0.000 0.000 0.690 srgb} bind def
|
||||
/col10 {0.000 0.000 0.820 srgb} bind def
|
||||
/col11 {0.530 0.810 1.000 srgb} bind def
|
||||
/col12 {0.000 0.560 0.000 srgb} bind def
|
||||
/col13 {0.000 0.690 0.000 srgb} bind def
|
||||
/col14 {0.000 0.820 0.000 srgb} bind def
|
||||
/col15 {0.000 0.560 0.560 srgb} bind def
|
||||
/col16 {0.000 0.690 0.690 srgb} bind def
|
||||
/col17 {0.000 0.820 0.820 srgb} bind def
|
||||
/col18 {0.560 0.000 0.000 srgb} bind def
|
||||
/col19 {0.690 0.000 0.000 srgb} bind def
|
||||
/col20 {0.820 0.000 0.000 srgb} bind def
|
||||
/col21 {0.560 0.000 0.560 srgb} bind def
|
||||
/col22 {0.690 0.000 0.690 srgb} bind def
|
||||
/col23 {0.820 0.000 0.820 srgb} bind def
|
||||
/col24 {0.500 0.190 0.000 srgb} bind def
|
||||
/col25 {0.630 0.250 0.000 srgb} bind def
|
||||
/col26 {0.750 0.380 0.000 srgb} bind def
|
||||
/col27 {1.000 0.500 0.500 srgb} bind def
|
||||
/col28 {1.000 0.630 0.630 srgb} bind def
|
||||
/col29 {1.000 0.750 0.750 srgb} bind def
|
||||
/col30 {1.000 0.880 0.880 srgb} bind def
|
||||
/col31 {1.000 0.840 0.000 srgb} bind def
|
||||
|
||||
end
|
||||
save
|
||||
-6.0 113.0 translate
|
||||
1 -1 scale
|
||||
|
||||
/cp {closepath} bind def
|
||||
/ef {eofill} bind def
|
||||
/gr {grestore} bind def
|
||||
/gs {gsave} bind def
|
||||
/sa {save} bind def
|
||||
/rs {restore} bind def
|
||||
/l {lineto} bind def
|
||||
/m {moveto} bind def
|
||||
/rm {rmoveto} bind def
|
||||
/n {newpath} bind def
|
||||
/s {stroke} bind def
|
||||
/sh {show} bind def
|
||||
/slc {setlinecap} bind def
|
||||
/slj {setlinejoin} bind def
|
||||
/slw {setlinewidth} bind def
|
||||
/srgb {setrgbcolor} bind def
|
||||
/rot {rotate} bind def
|
||||
/sc {scale} bind def
|
||||
/sd {setdash} bind def
|
||||
/ff {findfont} bind def
|
||||
/sf {setfont} bind def
|
||||
/scf {scalefont} bind def
|
||||
/sw {stringwidth} bind def
|
||||
/tr {translate} bind def
|
||||
/tnt {dup dup currentrgbcolor
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
|
||||
bind def
|
||||
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
|
||||
4 -2 roll mul srgb} bind def
|
||||
/DrawEllipse {
|
||||
/endangle exch def
|
||||
/startangle exch def
|
||||
/yrad exch def
|
||||
/xrad exch def
|
||||
/y exch def
|
||||
/x exch def
|
||||
/savematrix mtrx currentmatrix def
|
||||
x y tr xrad yrad sc 0 0 1 startangle endangle arc
|
||||
closepath
|
||||
savematrix setmatrix
|
||||
} def
|
||||
|
||||
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
|
||||
/$F2psEnd {$F2psEnteredState restore end} def
|
||||
%%EndProlog
|
||||
|
||||
$F2psBegin
|
||||
10 setmiterlimit
|
||||
n -1000 4750 m -1000 -1000 l 14886 -1000 l 14886 4750 l cp clip
|
||||
0.03000 0.03000 sc
|
||||
7.500 slw
|
||||
% Ellipse
|
||||
n 900 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 6300 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 4500 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2700 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 8100 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 9600 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 11100 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 12600 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2700 2700 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 4500 2700 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 6300 2700 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 9600 2700 300 300 0 360 DrawEllipse gs col21 s gr
|
||||
|
||||
% Polyline
|
||||
gs clippath
|
||||
5835 870 m 6000 900 l 5835 930 l 6015 930 l 6015 870 l cp
|
||||
clip
|
||||
n 4800 900 m 6000 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5835 870 m 6000 900 l 5835 930 l 5835 900 l 5835 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
5859 990 m 6000 900 l 5900 1034 l 6031 912 l 5991 868 l cp
|
||||
clip
|
||||
n 4800 900 m 4802 902 l 4807 906 l 4815 914 l 4828 926 l 4846 942 l
|
||||
4869 963 l 4896 986 l 4926 1013 l 4958 1041 l 4992 1070 l
|
||||
5027 1099 l 5061 1127 l 5095 1154 l 5128 1178 l 5159 1201 l
|
||||
5188 1221 l 5216 1238 l 5242 1254 l 5267 1267 l 5291 1277 l
|
||||
5314 1286 l 5336 1292 l 5358 1297 l 5379 1299 l 5400 1300 l
|
||||
5421 1299 l 5442 1297 l 5464 1292 l 5486 1286 l 5509 1277 l
|
||||
5533 1267 l 5558 1254 l 5584 1238 l 5612 1221 l 5641 1201 l
|
||||
5672 1178 l 5705 1154 l 5739 1127 l 5773 1099 l 5808 1070 l
|
||||
5842 1041 l 5874 1013 l 5904 986 l 5931 963 l 5954 942 l
|
||||
5972 926 l 6000 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5859 990 m 6000 900 l 5900 1034 l 5879 1012 l 5859 990 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
5900 758 m 6000 892 l 5859 802 l 5991 924 l 6031 880 l cp
|
||||
clip
|
||||
n 4800 892 m 4802 890 l 4807 886 l 4815 878 l 4828 866 l 4846 850 l
|
||||
4869 829 l 4896 806 l 4926 779 l 4958 751 l 4992 722 l
|
||||
5027 693 l 5061 665 l 5095 638 l 5128 614 l 5159 591 l
|
||||
5188 571 l 5216 554 l 5242 538 l 5267 525 l 5291 515 l
|
||||
5314 506 l 5336 500 l 5358 495 l 5379 493 l 5400 492 l
|
||||
5421 493 l 5442 495 l 5464 500 l 5486 506 l 5509 515 l
|
||||
5533 525 l 5558 538 l 5584 554 l 5612 571 l 5641 591 l
|
||||
5672 614 l 5705 638 l 5739 665 l 5773 693 l 5808 722 l
|
||||
5842 751 l 5874 779 l 5904 806 l 5931 829 l 5954 850 l
|
||||
5972 866 l 6000 892 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5900 758 m 6000 892 l 5859 802 l 5879 780 l 5900 758 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4035 870 m 4200 900 l 4035 930 l 4215 930 l 4215 870 l cp
|
||||
clip
|
||||
n 3000 900 m 4200 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4035 870 m 4200 900 l 4035 930 l 4035 900 l 4035 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4059 990 m 4200 900 l 4100 1034 l 4231 912 l 4191 868 l cp
|
||||
clip
|
||||
n 3000 900 m 3002 902 l 3007 906 l 3015 914 l 3028 926 l 3046 942 l
|
||||
3069 963 l 3096 986 l 3126 1013 l 3158 1041 l 3192 1070 l
|
||||
3227 1099 l 3261 1127 l 3295 1154 l 3328 1178 l 3359 1201 l
|
||||
3388 1221 l 3416 1238 l 3442 1254 l 3467 1267 l 3491 1277 l
|
||||
3514 1286 l 3536 1292 l 3558 1297 l 3579 1299 l 3600 1300 l
|
||||
3621 1299 l 3642 1297 l 3664 1292 l 3686 1286 l 3709 1277 l
|
||||
3733 1267 l 3758 1254 l 3784 1238 l 3812 1221 l 3841 1201 l
|
||||
3872 1178 l 3905 1154 l 3939 1127 l 3973 1099 l 4008 1070 l
|
||||
4042 1041 l 4074 1013 l 4104 986 l 4131 963 l 4154 942 l
|
||||
4172 926 l 4200 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4059 990 m 4200 900 l 4100 1034 l 4079 1012 l 4059 990 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4100 758 m 4200 892 l 4059 802 l 4191 924 l 4231 880 l cp
|
||||
clip
|
||||
n 3000 892 m 3002 890 l 3007 886 l 3015 878 l 3028 866 l 3046 850 l
|
||||
3069 829 l 3096 806 l 3126 779 l 3158 751 l 3192 722 l
|
||||
3227 693 l 3261 665 l 3295 638 l 3328 614 l 3359 591 l
|
||||
3388 571 l 3416 554 l 3442 538 l 3467 525 l 3491 515 l
|
||||
3514 506 l 3536 500 l 3558 495 l 3579 493 l 3600 492 l
|
||||
3621 493 l 3642 495 l 3664 500 l 3686 506 l 3709 515 l
|
||||
3733 525 l 3758 538 l 3784 554 l 3812 571 l 3841 591 l
|
||||
3872 614 l 3905 638 l 3939 665 l 3973 693 l 4008 722 l
|
||||
4042 751 l 4074 779 l 4104 806 l 4131 829 l 4154 850 l
|
||||
4172 866 l 4200 892 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4100 758 m 4200 892 l 4059 802 l 4079 780 l 4100 758 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2247 969 m 2400 900 l 2281 1018 l 2429 916 l 2395 867 l cp
|
||||
clip
|
||||
n 1200 900 m 1203 902 l 1209 906 l 1219 913 l 1235 924 l 1257 939 l
|
||||
1284 957 l 1315 978 l 1350 1000 l 1387 1024 l 1424 1047 l
|
||||
1461 1070 l 1498 1092 l 1533 1112 l 1566 1129 l 1598 1145 l
|
||||
1627 1159 l 1655 1170 l 1681 1180 l 1706 1187 l 1730 1193 l
|
||||
1754 1197 l 1777 1199 l 1800 1200 l 1823 1199 l 1846 1197 l
|
||||
1870 1193 l 1894 1187 l 1919 1180 l 1945 1170 l 1973 1159 l
|
||||
2002 1145 l 2034 1129 l 2067 1112 l 2102 1092 l 2139 1070 l
|
||||
2176 1047 l 2213 1024 l 2250 1000 l 2285 978 l 2316 957 l
|
||||
2343 939 l 2365 924 l 2400 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2247 969 m 2400 900 l 2281 1018 l 2264 993 l 2247 969 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
435 870 m 600 900 l 435 930 l 615 930 l 615 870 l cp
|
||||
clip
|
||||
n 225 900 m 600 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 435 870 m 600 900 l 435 930 l 435 900 l 435 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
7635 870 m 7800 900 l 7635 930 l 7815 930 l 7815 870 l cp
|
||||
clip
|
||||
n 6600 900 m 7800 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 7635 870 m 7800 900 l 7635 930 l 7635 900 l 7635 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
7659 990 m 7800 900 l 7700 1034 l 7831 912 l 7791 868 l cp
|
||||
clip
|
||||
n 6600 900 m 6602 902 l 6607 906 l 6615 914 l 6628 926 l 6646 942 l
|
||||
6669 963 l 6696 986 l 6726 1013 l 6758 1041 l 6792 1070 l
|
||||
6827 1099 l 6861 1127 l 6895 1154 l 6928 1178 l 6959 1201 l
|
||||
6988 1221 l 7016 1238 l 7042 1254 l 7067 1267 l 7091 1277 l
|
||||
7114 1286 l 7136 1292 l 7158 1297 l 7179 1299 l 7200 1300 l
|
||||
7221 1299 l 7242 1297 l 7264 1292 l 7286 1286 l 7309 1277 l
|
||||
7333 1267 l 7358 1254 l 7384 1238 l 7412 1221 l 7441 1201 l
|
||||
7472 1178 l 7505 1154 l 7539 1127 l 7573 1099 l 7608 1070 l
|
||||
7642 1041 l 7674 1013 l 7704 986 l 7731 963 l 7754 942 l
|
||||
7772 926 l 7800 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 7659 990 m 7800 900 l 7700 1034 l 7679 1012 l 7659 990 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
7700 758 m 7800 892 l 7659 802 l 7791 924 l 7831 880 l cp
|
||||
clip
|
||||
n 6600 892 m 6602 890 l 6607 886 l 6615 878 l 6628 866 l 6646 850 l
|
||||
6669 829 l 6696 806 l 6726 779 l 6758 751 l 6792 722 l
|
||||
6827 693 l 6861 665 l 6895 638 l 6928 614 l 6959 591 l
|
||||
6988 571 l 7016 554 l 7042 538 l 7067 525 l 7091 515 l
|
||||
7114 506 l 7136 500 l 7158 495 l 7179 493 l 7200 492 l
|
||||
7221 493 l 7242 495 l 7264 500 l 7286 506 l 7309 515 l
|
||||
7333 525 l 7358 538 l 7384 554 l 7412 571 l 7441 591 l
|
||||
7472 614 l 7505 638 l 7539 665 l 7573 693 l 7608 722 l
|
||||
7642 751 l 7674 779 l 7704 806 l 7731 829 l 7754 850 l
|
||||
7772 866 l 7800 892 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 7700 758 m 7800 892 l 7659 802 l 7679 780 l 7700 758 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
9135 870 m 9300 900 l 9135 930 l 9315 930 l 9315 870 l cp
|
||||
clip
|
||||
n 8400 900 m 9300 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 9135 870 m 9300 900 l 9135 930 l 9135 900 l 9135 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
10635 870 m 10800 900 l 10635 930 l 10815 930 l 10815 870 l cp
|
||||
clip
|
||||
n 9900 900 m 10800 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 10635 870 m 10800 900 l 10635 930 l 10635 900 l 10635 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
12135 870 m 12300 900 l 12135 930 l 12315 930 l 12315 870 l cp
|
||||
clip
|
||||
n 11400 900 m 12300 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 12135 870 m 12300 900 l 12135 930 l 12135 900 l 12135 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2281 782 m 2400 900 l 2247 831 l 2395 933 l 2429 884 l cp
|
||||
clip
|
||||
n 1200 900 m 1203 898 l 1209 894 l 1219 887 l 1235 876 l 1257 861 l
|
||||
1284 843 l 1315 822 l 1350 800 l 1387 776 l 1424 753 l
|
||||
1461 730 l 1498 708 l 1533 688 l 1566 671 l 1598 655 l
|
||||
1627 641 l 1655 630 l 1681 620 l 1706 613 l 1730 607 l
|
||||
1754 603 l 1777 601 l 1800 600 l 1823 601 l 1846 603 l
|
||||
1870 607 l 1894 613 l 1919 620 l 1945 630 l 1973 641 l
|
||||
2002 655 l 2034 671 l 2067 688 l 2102 708 l 2139 730 l
|
||||
2176 753 l 2213 776 l 2250 800 l 2285 822 l 2316 843 l
|
||||
2343 861 l 2365 876 l 2400 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2281 782 m 2400 900 l 2247 831 l 2264 807 l 2281 782 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2210 2613 m 2359 2688 l 2193 2671 l 2406 2733 l 2423 2675 l cp
|
||||
clip
|
||||
n 900 1200 m 901 1202 l 902 1207 l 905 1217 l 909 1231 l 915 1252 l
|
||||
923 1278 l 932 1310 l 944 1348 l 957 1391 l 971 1438 l
|
||||
987 1488 l 1004 1540 l 1021 1592 l 1039 1645 l 1057 1697 l
|
||||
1075 1748 l 1093 1796 l 1111 1843 l 1128 1887 l 1146 1929 l
|
||||
1163 1968 l 1181 2005 l 1198 2039 l 1216 2071 l 1233 2101 l
|
||||
1251 2130 l 1270 2156 l 1289 2181 l 1309 2205 l 1329 2228 l
|
||||
1350 2250 l 1372 2271 l 1395 2291 l 1419 2311 l 1444 2330 l
|
||||
1470 2349 l 1499 2367 l 1529 2384 l 1561 2402 l 1595 2419 l
|
||||
1632 2437 l 1671 2454 l 1713 2472 l 1757 2489 l 1804 2507 l
|
||||
1852 2525 l 1903 2543 l 1955 2561 l 2008 2579 l 2060 2596 l
|
||||
2112 2613 l 2162 2629 l 2209 2643 l 2252 2656 l 2290 2668 l
|
||||
2322 2677 l 2348 2685 l 2369 2691 l 2400 2700 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 2210 2613 m 2359 2688 l 2193 2671 l 2201 2642 l 2210 2613 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
4035 2670 m 4200 2700 l 4035 2730 l 4215 2730 l 4215 2670 l cp
|
||||
clip
|
||||
n 3000 2700 m 4200 2700 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4035 2670 m 4200 2700 l 4035 2730 l 4035 2700 l 4035 2670 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4176 1309 m 4260 1164 l 4232 1330 l 4308 1121 l 4252 1101 l cp
|
||||
clip
|
||||
n 2925 2475 m 2927 2474 l 2931 2473 l 2940 2469 l 2952 2464 l 2970 2457 l
|
||||
2993 2448 l 3022 2437 l 3055 2424 l 3093 2408 l 3134 2391 l
|
||||
3177 2373 l 3223 2354 l 3269 2335 l 3315 2314 l 3361 2294 l
|
||||
3406 2274 l 3448 2255 l 3489 2235 l 3528 2216 l 3565 2197 l
|
||||
3599 2179 l 3632 2161 l 3662 2144 l 3690 2126 l 3717 2109 l
|
||||
3742 2091 l 3766 2074 l 3788 2056 l 3810 2038 l 3830 2019 l
|
||||
3850 2000 l 3870 1979 l 3890 1957 l 3909 1935 l 3927 1911 l
|
||||
3945 1886 l 3963 1860 l 3980 1832 l 3997 1802 l 4015 1770 l
|
||||
4032 1736 l 4050 1699 l 4068 1661 l 4086 1620 l 4104 1577 l
|
||||
4123 1533 l 4141 1487 l 4159 1441 l 4177 1395 l 4194 1350 l
|
||||
4210 1307 l 4225 1267 l 4238 1231 l 4249 1200 l 4258 1175 l
|
||||
4264 1155 l 4275 1125 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 4176 1309 m 4260 1164 l 4232 1330 l 4204 1319 l 4176 1309 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
4099 1238 m 4243 1152 l 4138 1283 l 4306 1138 l 4267 1092 l cp
|
||||
clip
|
||||
n 2925 2475 m 2927 2473 l 2930 2469 l 2937 2462 l 2947 2451 l 2961 2436 l
|
||||
2979 2416 l 3001 2392 l 3026 2364 l 3055 2332 l 3086 2298 l
|
||||
3118 2263 l 3152 2226 l 3186 2189 l 3219 2152 l 3252 2117 l
|
||||
3284 2082 l 3315 2049 l 3344 2017 l 3372 1987 l 3399 1958 l
|
||||
3424 1931 l 3449 1906 l 3472 1881 l 3495 1858 l 3516 1835 l
|
||||
3538 1813 l 3559 1792 l 3579 1771 l 3600 1750 l 3621 1729 l
|
||||
3641 1709 l 3662 1688 l 3684 1668 l 3705 1647 l 3728 1625 l
|
||||
3751 1603 l 3776 1580 l 3801 1556 l 3828 1531 l 3856 1505 l
|
||||
3885 1478 l 3916 1450 l 3948 1421 l 3981 1391 l 4014 1360 l
|
||||
4048 1330 l 4082 1299 l 4114 1270 l 4145 1242 l 4174 1216 l
|
||||
4199 1193 l 4221 1173 l 4239 1157 l 4253 1144 l 4275 1125 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 4099 1238 m 4243 1152 l 4138 1283 l 4118 1260 l 4099 1238 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
5907 1250 m 6045 1154 l 5950 1293 l 6107 1136 l 6064 1093 l cp
|
||||
clip
|
||||
n 4725 2475 m 6075 1125 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 5907 1250 m 6045 1154 l 5950 1293 l 5929 1271 l 5907 1250 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
5862 2604 m 6000 2700 l 5837 2659 l 6001 2734 l 6026 2679 l cp
|
||||
clip
|
||||
n 4800 2700 m 4803 2699 l 4809 2696 l 4819 2691 l 4835 2684 l 4857 2674 l
|
||||
4884 2662 l 4915 2648 l 4950 2633 l 4987 2617 l 5024 2602 l
|
||||
5061 2586 l 5098 2572 l 5133 2559 l 5166 2547 l 5198 2537 l
|
||||
5227 2527 l 5255 2520 l 5281 2513 l 5306 2508 l 5330 2505 l
|
||||
5354 2502 l 5377 2500 l 5400 2500 l 5423 2500 l 5446 2502 l
|
||||
5470 2505 l 5494 2508 l 5519 2513 l 5545 2520 l 5573 2527 l
|
||||
5602 2537 l 5634 2547 l 5667 2559 l 5702 2572 l 5739 2586 l
|
||||
5776 2602 l 5813 2617 l 5850 2633 l 5885 2648 l 5916 2662 l
|
||||
5943 2674 l 5965 2684 l 6000 2700 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5862 2604 m 6000 2700 l 5837 2659 l 5850 2631 l 5862 2604 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
5837 2741 m 6000 2700 l 5862 2796 l 6026 2721 l 6001 2666 l cp
|
||||
clip
|
||||
n 4800 2700 m 4803 2701 l 4809 2704 l 4819 2709 l 4835 2716 l 4857 2726 l
|
||||
4884 2738 l 4915 2752 l 4950 2767 l 4987 2783 l 5024 2798 l
|
||||
5061 2814 l 5098 2828 l 5133 2841 l 5166 2853 l 5198 2863 l
|
||||
5227 2873 l 5255 2880 l 5281 2887 l 5306 2892 l 5330 2895 l
|
||||
5354 2898 l 5377 2900 l 5400 2900 l 5423 2900 l 5446 2898 l
|
||||
5470 2895 l 5494 2892 l 5519 2887 l 5545 2880 l 5573 2873 l
|
||||
5602 2863 l 5634 2853 l 5667 2841 l 5702 2828 l 5739 2814 l
|
||||
5776 2798 l 5813 2783 l 5850 2767 l 5885 2752 l 5916 2738 l
|
||||
5943 2726 l 5965 2716 l 6000 2700 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5837 2741 m 6000 2700 l 5862 2796 l 5850 2769 l 5837 2741 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
6330 3135 m 6300 3300 l 6270 3135 l 6270 3315 l 6330 3315 l cp
|
||||
clip
|
||||
n 6300 3000 m 6300 3300 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 6330 3135 m 6300 3300 l 6270 3135 l 6300 3135 l 6330 3135 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
7674 1182 m 7836 1142 l 7698 1236 l 7901 1146 l 7877 1091 l cp
|
||||
clip
|
||||
n 6525 2475 m 6526 2473 l 6527 2468 l 6531 2460 l 6536 2447 l 6542 2428 l
|
||||
6551 2405 l 6562 2376 l 6575 2343 l 6590 2306 l 6606 2266 l
|
||||
6623 2225 l 6641 2182 l 6659 2138 l 6677 2096 l 6696 2054 l
|
||||
6714 2014 l 6732 1976 l 6750 1939 l 6768 1905 l 6785 1873 l
|
||||
6803 1843 l 6820 1814 l 6837 1787 l 6855 1762 l 6873 1738 l
|
||||
6891 1714 l 6910 1692 l 6930 1671 l 6950 1650 l 6970 1631 l
|
||||
6990 1612 l 7012 1594 l 7034 1575 l 7058 1557 l 7083 1539 l
|
||||
7110 1520 l 7138 1502 l 7168 1482 l 7201 1463 l 7235 1443 l
|
||||
7272 1422 l 7311 1401 l 7352 1379 l 7394 1357 l 7439 1334 l
|
||||
7485 1311 l 7531 1288 l 7577 1265 l 7623 1243 l 7666 1222 l
|
||||
7707 1203 l 7745 1185 l 7778 1170 l 7807 1156 l 7830 1146 l
|
||||
7848 1137 l 7875 1125 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 7674 1182 m 7836 1142 l 7698 1236 l 7686 1209 l 7674 1182 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
7840 1378 m 7933 1238 l 7895 1402 l 7983 1198 l 7928 1174 l cp
|
||||
clip
|
||||
n 6525 2475 m 6527 2474 l 6531 2473 l 6540 2470 l 6552 2466 l 6570 2461 l
|
||||
6594 2453 l 6622 2444 l 6655 2433 l 6693 2420 l 6734 2406 l
|
||||
6778 2391 l 6824 2375 l 6871 2359 l 6917 2342 l 6963 2325 l
|
||||
7008 2308 l 7051 2291 l 7093 2274 l 7132 2258 l 7169 2242 l
|
||||
7204 2226 l 7237 2210 l 7268 2195 l 7297 2179 l 7324 2163 l
|
||||
7350 2147 l 7375 2131 l 7398 2115 l 7420 2098 l 7442 2080 l
|
||||
7463 2063 l 7484 2043 l 7505 2022 l 7525 2000 l 7545 1978 l
|
||||
7564 1953 l 7584 1928 l 7603 1900 l 7622 1871 l 7642 1840 l
|
||||
7662 1806 l 7682 1770 l 7703 1732 l 7724 1692 l 7745 1650 l
|
||||
7767 1606 l 7789 1560 l 7811 1514 l 7832 1468 l 7852 1424 l
|
||||
7871 1381 l 7889 1341 l 7905 1306 l 7918 1275 l 7929 1250 l
|
||||
7937 1230 l 7950 1200 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 7840 1378 m 7933 1238 l 7895 1402 l 7868 1390 l 7840 1378 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
7704 1320 m 7844 1228 l 7745 1364 l 7907 1212 l 7865 1168 l cp
|
||||
clip
|
||||
n 6525 2475 m 7875 1200 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 7704 1320 m 7844 1228 l 7745 1364 l 7725 1342 l 7704 1320 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
12570 465 m 12600 300 l 12630 465 l 12630 285 l 12570 285 l cp
|
||||
clip
|
||||
n 12600 600 m 12600 300 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 12570 465 m 12600 300 l 12630 465 l 12600 465 l 12570 465 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
9179 2380 m 9271 2519 l 9135 2421 l 9289 2582 l 9332 2540 l cp
|
||||
clip
|
||||
n 8250 1200 m 8251 1202 l 8254 1206 l 8258 1214 l 8265 1226 l 8275 1243 l
|
||||
8287 1264 l 8302 1290 l 8319 1319 l 8338 1352 l 8358 1386 l
|
||||
8379 1422 l 8401 1458 l 8422 1494 l 8443 1529 l 8464 1563 l
|
||||
8484 1596 l 8504 1627 l 8522 1657 l 8540 1685 l 8558 1712 l
|
||||
8575 1737 l 8592 1762 l 8608 1785 l 8625 1808 l 8641 1831 l
|
||||
8658 1853 l 8675 1875 l 8691 1896 l 8708 1916 l 8725 1937 l
|
||||
8743 1959 l 8761 1980 l 8781 2003 l 8801 2026 l 8823 2051 l
|
||||
8846 2076 l 8870 2103 l 8896 2131 l 8924 2160 l 8953 2191 l
|
||||
8983 2223 l 9014 2256 l 9047 2289 l 9079 2323 l 9112 2357 l
|
||||
9143 2389 l 9173 2420 l 9201 2449 l 9226 2474 l 9247 2496 l
|
||||
9265 2514 l 9279 2528 l 9300 2550 l gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 9179 2380 m 9271 2519 l 9135 2421 l 9157 2400 l 9179 2380 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
9267 2344 m 9287 2509 l 9210 2361 l 9276 2573 l 9333 2555 l cp
|
||||
clip
|
||||
n 8325 1125 m 8327 1126 l 8331 1130 l 8338 1135 l 8348 1144 l 8363 1157 l
|
||||
8383 1173 l 8406 1193 l 8434 1216 l 8464 1242 l 8497 1271 l
|
||||
8531 1300 l 8567 1331 l 8602 1362 l 8637 1393 l 8671 1423 l
|
||||
8703 1453 l 8734 1482 l 8764 1509 l 8791 1536 l 8817 1561 l
|
||||
8841 1586 l 8863 1609 l 8884 1632 l 8904 1654 l 8923 1676 l
|
||||
8940 1698 l 8957 1719 l 8972 1741 l 8988 1763 l 9003 1786 l
|
||||
9018 1810 l 9033 1834 l 9047 1860 l 9061 1886 l 9075 1913 l
|
||||
9088 1942 l 9102 1973 l 9115 2005 l 9129 2040 l 9143 2076 l
|
||||
9158 2115 l 9172 2155 l 9187 2197 l 9202 2240 l 9216 2283 l
|
||||
9230 2326 l 9243 2367 l 9256 2406 l 9267 2442 l 9276 2473 l
|
||||
9284 2498 l 9290 2518 l 9300 2550 l gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 9267 2344 m 9287 2509 l 9210 2361 l 9238 2352 l 9267 2344 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
9583 2192 m 9590 2359 l 9525 2205 l 9574 2421 l 9633 2408 l cp
|
||||
clip
|
||||
n 9600 1200 m 9599 1203 l 9598 1209 l 9596 1219 l 9592 1235 l 9587 1257 l
|
||||
9581 1284 l 9574 1315 l 9567 1350 l 9559 1387 l 9551 1424 l
|
||||
9543 1461 l 9536 1498 l 9529 1533 l 9524 1566 l 9518 1598 l
|
||||
9514 1627 l 9510 1655 l 9507 1681 l 9504 1706 l 9502 1730 l
|
||||
9501 1754 l 9500 1777 l 9500 1800 l 9500 1823 l 9501 1846 l
|
||||
9502 1870 l 9504 1894 l 9507 1919 l 9510 1945 l 9514 1973 l
|
||||
9518 2002 l 9524 2034 l 9529 2067 l 9536 2102 l 9543 2139 l
|
||||
9551 2176 l 9559 2213 l 9567 2250 l 9574 2285 l 9581 2316 l
|
||||
9587 2343 l 9592 2365 l 9600 2400 l gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 9583 2192 m 9590 2359 l 9525 2205 l 9554 2198 l 9583 2192 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
9695 2214 m 9613 2360 l 9639 2195 l 9567 2404 l 9624 2424 l cp
|
||||
clip
|
||||
n 9600 1200 m 9601 1203 l 9603 1209 l 9607 1219 l 9612 1235 l 9620 1257 l
|
||||
9629 1284 l 9639 1315 l 9650 1350 l 9662 1387 l 9674 1424 l
|
||||
9685 1461 l 9696 1498 l 9706 1533 l 9715 1566 l 9723 1598 l
|
||||
9729 1627 l 9735 1655 l 9740 1681 l 9744 1706 l 9747 1730 l
|
||||
9749 1754 l 9750 1777 l 9750 1800 l 9750 1823 l 9749 1846 l
|
||||
9747 1870 l 9744 1894 l 9740 1919 l 9735 1945 l 9729 1973 l
|
||||
9723 2002 l 9715 2034 l 9706 2067 l 9696 2102 l 9685 2139 l
|
||||
9674 2176 l 9662 2213 l 9650 2250 l 9639 2285 l 9629 2316 l
|
||||
9620 2343 l 9612 2365 l 9600 2400 l gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 9695 2214 m 9613 2360 l 9639 2195 l 9667 2204 l 9695 2214 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
10094 2397 m 9936 2453 l 10064 2345 l 9872 2457 l 9902 2508 l cp
|
||||
clip
|
||||
n 10950 1200 m 10949 1202 l 10948 1207 l 10945 1217 l 10940 1231 l 10934 1251 l
|
||||
10926 1277 l 10916 1307 l 10905 1342 l 10892 1381 l 10879 1422 l
|
||||
10865 1464 l 10850 1507 l 10835 1549 l 10820 1590 l 10805 1629 l
|
||||
10790 1667 l 10775 1702 l 10761 1735 l 10747 1767 l 10732 1796 l
|
||||
10718 1823 l 10703 1849 l 10689 1874 l 10674 1897 l 10658 1920 l
|
||||
10642 1941 l 10625 1962 l 10625 1963 l 10607 1983 l 10589 2003 l
|
||||
10570 2024 l 10549 2043 l 10527 2064 l 10504 2084 l 10478 2104 l
|
||||
10451 2126 l 10422 2147 l 10390 2170 l 10356 2193 l 10320 2218 l
|
||||
10282 2243 l 10242 2268 l 10201 2294 l 10160 2320 l 10118 2345 l
|
||||
10078 2370 l 10041 2392 l 10006 2413 l 9976 2431 l 9951 2445 l
|
||||
9931 2457 l 9900 2475 l gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 10094 2397 m 9936 2453 l 10064 2345 l 10079 2371 l 10094 2397 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
9984 2340 m 9852 2443 l 9939 2300 l 9793 2466 l 9838 2506 l cp
|
||||
clip
|
||||
n 10950 1200 m 9825 2475 l gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 9984 2340 m 9852 2443 l 9939 2300 l 9962 2320 l 9984 2340 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
9100 2760 m 9261 2717 l 9125 2814 l 9326 2721 l 9301 2666 l cp
|
||||
clip
|
||||
n 9300 2700 m 9297 2699 l 9289 2696 l 9277 2692 l 9257 2686 l 9232 2677 l
|
||||
9202 2667 l 9167 2657 l 9130 2645 l 9093 2634 l 9056 2623 l
|
||||
9020 2614 l 8987 2606 l 8957 2599 l 8929 2593 l 8904 2590 l
|
||||
8881 2588 l 8861 2587 l 8844 2588 l 8828 2590 l 8813 2594 l
|
||||
8800 2600 l 8789 2606 l 8779 2614 l 8770 2622 l 8761 2632 l
|
||||
8754 2642 l 8747 2654 l 8741 2666 l 8736 2679 l 8733 2693 l
|
||||
8730 2707 l 8728 2721 l 8728 2736 l 8728 2750 l 8730 2764 l
|
||||
8733 2778 l 8736 2791 l 8741 2804 l 8747 2815 l 8754 2826 l
|
||||
8761 2836 l 8770 2844 l 8779 2851 l 8789 2858 l 8800 2863 l
|
||||
8813 2866 l 8828 2869 l 8844 2869 l 8861 2868 l 8881 2865 l
|
||||
8904 2860 l 8929 2853 l 8957 2844 l 8987 2833 l 9020 2821 l
|
||||
9056 2807 l 9093 2792 l 9130 2776 l 9167 2760 l 9202 2745 l
|
||||
9232 2731 l 9257 2720 l 9300 2700 l cp gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 9100 2760 m 9261 2717 l 9125 2814 l 9112 2787 l 9100 2760 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
9295 3118 m 9364 2965 l 9353 3133 l 9408 2918 l 9350 2903 l cp
|
||||
clip
|
||||
n 9375 2925 m 9372 2926 l 9365 2929 l 9352 2935 l 9334 2942 l 9309 2953 l
|
||||
9280 2966 l 9248 2980 l 9213 2996 l 9178 3013 l 9144 3030 l
|
||||
9111 3046 l 9082 3062 l 9055 3077 l 9032 3092 l 9012 3106 l
|
||||
8995 3120 l 8980 3133 l 8969 3147 l 8960 3160 l 8954 3174 l
|
||||
8950 3188 l 8948 3202 l 8948 3216 l 8949 3232 l 8952 3247 l
|
||||
8957 3263 l 8964 3279 l 8972 3295 l 8981 3310 l 8992 3326 l
|
||||
9004 3340 l 9017 3354 l 9031 3367 l 9046 3379 l 9061 3389 l
|
||||
9076 3398 l 9091 3406 l 9106 3412 l 9121 3416 l 9135 3418 l
|
||||
9149 3418 l 9162 3416 l 9175 3413 l 9187 3407 l 9199 3399 l
|
||||
9210 3388 l 9221 3374 l 9232 3358 l 9243 3338 l 9254 3315 l
|
||||
9266 3288 l 9277 3257 l 9289 3224 l 9301 3187 l 9313 3148 l
|
||||
9325 3108 l 9336 3069 l 9347 3032 l 9356 2999 l 9363 2972 l
|
||||
9375 2925 l cp gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 9295 3118 m 9364 2965 l 9353 3133 l 9324 3125 l 9295 3118 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
9660 3200 m 9617 3038 l 9714 3175 l 9621 2974 l 9566 2999 l cp
|
||||
clip
|
||||
n 9600 3000 m 9599 3003 l 9596 3011 l 9592 3023 l 9586 3043 l 9577 3068 l
|
||||
9567 3098 l 9557 3133 l 9545 3170 l 9534 3207 l 9523 3244 l
|
||||
9514 3280 l 9506 3313 l 9499 3343 l 9493 3371 l 9490 3396 l
|
||||
9488 3419 l 9487 3439 l 9488 3456 l 9490 3472 l 9494 3487 l
|
||||
9500 3500 l 9506 3511 l 9514 3521 l 9522 3530 l 9532 3539 l
|
||||
9542 3546 l 9554 3553 l 9566 3559 l 9579 3564 l 9593 3567 l
|
||||
9607 3570 l 9621 3572 l 9636 3572 l 9650 3572 l 9664 3570 l
|
||||
9678 3567 l 9691 3564 l 9704 3559 l 9715 3553 l 9726 3546 l
|
||||
9736 3539 l 9744 3530 l 9751 3521 l 9758 3511 l 9763 3500 l
|
||||
9766 3487 l 9769 3472 l 9769 3456 l 9768 3439 l 9765 3419 l
|
||||
9760 3396 l 9753 3371 l 9744 3343 l 9733 3313 l 9721 3280 l
|
||||
9707 3244 l 9692 3207 l 9676 3170 l 9660 3133 l 9645 3098 l
|
||||
9631 3068 l 9620 3043 l 9600 3000 l cp gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 9660 3200 m 9617 3038 l 9714 3175 l 9687 3188 l 9660 3200 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
10102 2905 m 9941 2855 l 10109 2846 l 9889 2818 l 9881 2878 l cp
|
||||
clip
|
||||
n 12600 1200 m 12599 1202 l 12598 1206 l 12595 1214 l 12590 1226 l 12583 1244 l
|
||||
12574 1267 l 12563 1296 l 12549 1331 l 12534 1372 l 12516 1417 l
|
||||
12496 1467 l 12475 1521 l 12452 1578 l 12428 1637 l 12404 1696 l
|
||||
12379 1757 l 12355 1817 l 12330 1876 l 12306 1934 l 12282 1990 l
|
||||
12258 2043 l 12235 2095 l 12213 2144 l 12192 2190 l 12171 2234 l
|
||||
12151 2275 l 12131 2314 l 12112 2351 l 12093 2385 l 12075 2418 l
|
||||
12057 2448 l 12039 2477 l 12021 2504 l 12004 2530 l 11986 2555 l
|
||||
11968 2578 l 11950 2600 l 11928 2625 l 11906 2649 l 11884 2672 l
|
||||
11861 2694 l 11837 2715 l 11813 2735 l 11788 2754 l 11763 2772 l
|
||||
11737 2789 l 11710 2805 l 11682 2821 l 11654 2835 l 11625 2849 l
|
||||
11596 2861 l 11566 2873 l 11536 2883 l 11506 2893 l 11475 2902 l
|
||||
11444 2910 l 11413 2917 l 11383 2923 l 11352 2929 l 11321 2934 l
|
||||
11290 2938 l 11260 2941 l 11230 2944 l 11199 2946 l 11169 2947 l
|
||||
11140 2949 l 11110 2949 l 11080 2950 l 11050 2950 l 11020 2950 l
|
||||
10989 2949 l 10958 2949 l 10926 2948 l 10893 2946 l 10859 2945 l
|
||||
10823 2943 l 10786 2940 l 10747 2937 l 10706 2934 l 10663 2930 l
|
||||
10617 2926 l 10570 2922 l 10520 2917 l 10468 2912 l 10414 2907 l
|
||||
10360 2901 l 10305 2895 l 10250 2889 l 10196 2883 l 10144 2878 l
|
||||
10096 2872 l 10052 2867 l 10013 2863 l 9980 2859 l 9953 2856 l
|
||||
9932 2854 l 9900 2850 l gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 10102 2905 m 9941 2855 l 10109 2846 l 10105 2876 l 10102 2905 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
10107 2805 m 9941 2775 l 10107 2745 l 9885 2745 l 9885 2805 l cp
|
||||
clip
|
||||
n 12600 1200 m 12599 1202 l 12597 1206 l 12593 1214 l 12586 1226 l 12577 1244 l
|
||||
12564 1267 l 12549 1295 l 12531 1328 l 12510 1366 l 12487 1408 l
|
||||
12462 1453 l 12435 1501 l 12407 1550 l 12379 1600 l 12350 1650 l
|
||||
12321 1699 l 12293 1747 l 12265 1794 l 12237 1838 l 12210 1881 l
|
||||
12184 1921 l 12159 1959 l 12134 1995 l 12110 2029 l 12086 2061 l
|
||||
12063 2091 l 12040 2119 l 12017 2146 l 11994 2171 l 11971 2195 l
|
||||
11948 2219 l 11924 2241 l 11900 2263 l 11874 2285 l 11847 2306 l
|
||||
11820 2327 l 11792 2348 l 11763 2368 l 11733 2388 l 11702 2407 l
|
||||
11671 2426 l 11638 2444 l 11605 2462 l 11571 2480 l 11536 2497 l
|
||||
11501 2513 l 11466 2529 l 11429 2545 l 11393 2560 l 11357 2574 l
|
||||
11320 2588 l 11284 2601 l 11247 2613 l 11211 2624 l 11176 2635 l
|
||||
11141 2646 l 11106 2655 l 11072 2664 l 11038 2673 l 11006 2681 l
|
||||
10974 2688 l 10942 2695 l 10911 2701 l 10880 2707 l 10850 2713 l
|
||||
10818 2718 l 10786 2723 l 10755 2728 l 10723 2732 l 10690 2737 l
|
||||
10657 2740 l 10623 2744 l 10588 2747 l 10552 2750 l 10514 2753 l
|
||||
10474 2756 l 10433 2758 l 10391 2760 l 10346 2762 l 10301 2764 l
|
||||
10255 2766 l 10208 2768 l 10162 2769 l 10118 2770 l 10076 2771 l
|
||||
10037 2772 l 10002 2773 l 9973 2774 l 9948 2774 l 9929 2775 l
|
||||
9900 2775 l gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 10107 2805 m 9941 2775 l 10107 2745 l 10107 2775 l 10107 2805 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
10109 2689 m 9941 2691 l 10097 2630 l 9879 2674 l 9891 2732 l cp
|
||||
clip
|
||||
n 12600 1200 m 12599 1201 l 12596 1204 l 12591 1209 l 12583 1217 l 12571 1228 l
|
||||
12556 1243 l 12536 1261 l 12512 1284 l 12485 1310 l 12453 1340 l
|
||||
12418 1373 l 12380 1409 l 12339 1448 l 12296 1488 l 12252 1529 l
|
||||
12206 1571 l 12160 1614 l 12114 1656 l 12068 1697 l 12023 1738 l
|
||||
11979 1777 l 11936 1815 l 11893 1852 l 11853 1887 l 11813 1921 l
|
||||
11775 1953 l 11738 1983 l 11702 2012 l 11667 2039 l 11633 2065 l
|
||||
11600 2089 l 11567 2113 l 11536 2135 l 11504 2156 l 11473 2176 l
|
||||
11442 2196 l 11412 2215 l 11381 2233 l 11350 2250 l 11317 2268 l
|
||||
11284 2285 l 11251 2302 l 11217 2318 l 11182 2334 l 11147 2349 l
|
||||
11110 2365 l 11073 2380 l 11034 2394 l 10993 2409 l 10951 2424 l
|
||||
10907 2438 l 10861 2453 l 10813 2468 l 10763 2483 l 10711 2498 l
|
||||
10657 2513 l 10602 2528 l 10545 2543 l 10487 2559 l 10429 2574 l
|
||||
10371 2588 l 10313 2603 l 10257 2616 l 10203 2630 l 10152 2642 l
|
||||
10104 2653 l 10061 2663 l 10023 2672 l 9990 2680 l 9963 2686 l
|
||||
9941 2691 l 9925 2695 l 9900 2700 l gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 10109 2689 m 9941 2691 l 10097 2630 l 10103 2659 l 10109 2689 l cp gs col21 1.00 shd ef gr col21 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
10000 3057 m 10095 3195 l 9957 3100 l 10114 3257 l 10157 3214 l cp
|
||||
clip
|
||||
n 9825 2925 m 10125 3225 l gs col21 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 10000 3057 m 10095 3195 l 9957 3100 l 9979 3079 l 10000 3057 l cp gs col21 1.00 shd ef gr col21 s
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
817 960 m
|
||||
gs 1 -1 sc (1) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5400 825 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5325 1200 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5325 442 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3600 825 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3525 1200 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3525 442 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
2625 945 m
|
||||
gs 1 -1 sc (2) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
4425 945 m
|
||||
gs 1 -1 sc (3) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
6225 945 m
|
||||
gs 1 -1 sc (4) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7200 825 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7125 1200 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7125 442 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
8025 945 m
|
||||
gs 1 -1 sc (5) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
8775 750 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
9525 975 m
|
||||
gs 1 -1 sc (6) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
10275 750 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
11025 975 m
|
||||
gs 1 -1 sc (7) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
11700 825 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
12525 975 m
|
||||
gs 1 -1 sc (8) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
1725 1125 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
1800 525 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
1425 2175 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
2625 2775 m
|
||||
gs 1 -1 sc (9) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
4425 2775 m
|
||||
gs 1 -1 sc (A) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3525 2625 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
6225 2775 m
|
||||
gs 1 -1 sc (B) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5325 2400 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5400 2775 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5325 3600 m
|
||||
gs 1 -1 sc (Pattern "XXo") col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3675 1950 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5100 1800 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3300 1800 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
6525 1800 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7275 2025 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7050 1800 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
11625 225 m
|
||||
gs 1 -1 sc (Pattern "????..X") col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
8325 1950 m
|
||||
gs 1 -1 sc (O) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
8925 1575 m
|
||||
gs 1 -1 sc (X) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
9225 1875 m
|
||||
gs 1 -1 sc (O) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
9825 1875 m
|
||||
gs 1 -1 sc (X) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
10200 1800 m
|
||||
gs 1 -1 sc (O) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
10725 2100 m
|
||||
gs 1 -1 sc (.) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
9525 2775 m
|
||||
gs 1 -1 sc (0) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
8475 2775 m
|
||||
gs 1 -1 sc (O) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
8775 3600 m
|
||||
gs 1 -1 sc (X) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
9600 3750 m
|
||||
gs 1 -1 sc (.) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
11325 2100 m
|
||||
gs 1 -1 sc (O) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
11625 2325 m
|
||||
gs 1 -1 sc (.) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
12000 2850 m
|
||||
gs 1 -1 sc (X) col21 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
10200 3450 m
|
||||
gs 1 -1 sc (Error) col21 sh gr
|
||||
$F2psEnd
|
||||
rs
|
232
gnugo/doc/cdfa.fig
Normal file
|
@ -0,0 +1,232 @@
|
|||
#FIG 3.2
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
50.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 900 900 300 300 900 900 1200 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 6300 900 300 300 6300 900 6600 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 4500 900 300 300 4500 900 4800 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2700 900 300 300 2700 900 3000 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 8100 900 300 300 8100 900 8400 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 9600 900 300 300 9600 900 9900 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 11100 900 300 300 11100 900 11400 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 12600 900 300 300 12600 900 12900 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2700 2700 300 300 2700 2700 3000 2700
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 4500 2700 300 300 4500 2700 4800 2700
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 6300 2700 300 300 6300 2700 6600 2700
|
||||
1 3 0 1 21 7 100 0 -1 0.000 1 0.0000 9600 2700 300 300 9600 2700 9900 2700
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 900 6000 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 900 5400 1500 6000 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 892 5400 292 6000 892
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
3000 900 4200 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
3000 900 3600 1500 4200 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
3000 892 3600 292 4200 892
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
1200 900 1800 1350 2400 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
225 900 600 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
6600 900 7800 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
6600 900 7200 1500 7800 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
6600 892 7200 292 7800 892
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
8400 900 9300 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
9900 900 10800 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
11400 900 12300 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
1200 900 1800 450 2400 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
900 1200 1200 2400 2400 2700
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
3000 2700 4200 2700
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
2925 2475 3975 2100 4275 1125
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
2925 2475 3600 1725 4275 1125
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 2.00 60.00 165.00
|
||||
4725 2475 6075 1125
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 2700 5400 2400 6000 2700
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 2700 5400 3000 6000 2700
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
6300 3000 6300 3300
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
6525 2475 6825 1575 7875 1125
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
6525 2475 7575 2175 7950 1200
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 2.00 60.00 165.00
|
||||
6525 2475 7875 1200
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
12600 600 12600 300
|
||||
0.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
8250 1200 8625 1875 9300 2550
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
8325 1125 9075 1725 9300 2550
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
9600 1200 9450 1800 9600 2400
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
9600 1200 9825 1800 9600 2400
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
10950 1200 10725 2025 9900 2475
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 2.00 60.00 165.00
|
||||
10950 1200 9825 2475
|
||||
0.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 2.00 60.00 165.00
|
||||
9300 2700 8700 2475 8700 3000 9300 2700
|
||||
0.000 1.000 1.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 2.00 60.00 165.00
|
||||
9375 2925 8775 3150 9225 3600 9375 2925
|
||||
0.000 1.000 1.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 2.00 60.00 165.00
|
||||
9600 3000 9375 3600 9900 3600 9600 3000
|
||||
0.000 1.000 1.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 2.00 60.00 165.00
|
||||
12600 1200 12000 2850 11100 3000 9900 2850
|
||||
0.000 1.000 1.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 2.00 60.00 165.00
|
||||
12600 1200 12000 2400 10800 2775 9900 2775
|
||||
0.000 1.000 1.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
12600 1200 11400 2400 9900 2700
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 21 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 2.00 60.00 165.00
|
||||
9825 2925 10125 3225
|
||||
0.000 0.000
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 817 960 1\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 5400 825 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 5325 1200 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 5325 442 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 3600 825 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 3525 1200 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 3525 442 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 2625 945 2\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 4425 945 3\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 6225 945 4\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 7200 825 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 7125 1200 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 7125 442 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 8025 945 5\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 8775 750 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 9525 975 6\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 10275 750 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 11025 975 7\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 11700 825 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 12525 975 8\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 1725 1125 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 1800 525 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 1425 2175 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 2625 2775 9\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 4425 2775 A\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 3525 2625 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 195 6225 2775 B\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 5325 2400 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 5400 2775 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 1860 5325 3600 Pattern "XXo"\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 3675 1950 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 5100 1800 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 3300 1800 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 6525 1800 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 7275 2025 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 7050 1800 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 2205 11625 225 Pattern "????..X"\001
|
||||
4 0 21 100 0 2 19 0.0000 4 195 225 8325 1950 O\001
|
||||
4 0 21 100 0 2 19 0.0000 4 195 210 8925 1575 X\001
|
||||
4 0 21 100 0 2 19 0.0000 4 195 225 9225 1875 O\001
|
||||
4 0 21 100 0 2 19 0.0000 4 195 210 9825 1875 X\001
|
||||
4 0 21 100 0 2 19 0.0000 4 195 225 10200 1800 O\001
|
||||
4 0 21 100 0 2 19 0.0000 4 45 75 10725 2100 .\001
|
||||
4 0 21 100 0 2 19 0.0000 4 195 135 9525 2775 0\001
|
||||
4 0 21 100 0 2 19 0.0000 4 195 225 8475 2775 O\001
|
||||
4 0 21 100 0 2 19 0.0000 4 195 210 8775 3600 X\001
|
||||
4 0 21 100 0 2 19 0.0000 4 45 75 9600 3750 .\001
|
||||
4 0 21 100 0 2 19 0.0000 4 195 225 11325 2100 O\001
|
||||
4 0 21 100 0 2 19 0.0000 4 45 75 11625 2325 .\001
|
||||
4 0 21 100 0 2 19 0.0000 4 195 210 12000 2850 X\001
|
||||
4 0 21 100 0 2 19 0.0000 4 195 690 10200 3450 Error\001
|
BIN
gnugo/doc/cdfa.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
gnugo/doc/cdfa.pdf
Normal file
BIN
gnugo/doc/cdfa.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
1272
gnugo/doc/copying.texi
Normal file
413
gnugo/doc/dfa.eps
Normal file
|
@ -0,0 +1,413 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: dfa.eps
|
||||
%%Creator: fig2dev Version 3.2 Patchlevel 1
|
||||
%%CreationDate: Fri Jun 22 17:21:06 2001
|
||||
%%For: turvoy@semeai.irisa.fr (Tanguy Urvoy, DEA, Paragraphe)
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 411 47
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%Magnification: 0.5000
|
||||
%%EndComments
|
||||
/$F2psDict 200 dict def
|
||||
$F2psDict begin
|
||||
$F2psDict /mtrx matrix put
|
||||
/col-1 {0 setgray} bind def
|
||||
/col0 {0.000 0.000 0.000 srgb} bind def
|
||||
/col1 {0.000 0.000 1.000 srgb} bind def
|
||||
/col2 {0.000 1.000 0.000 srgb} bind def
|
||||
/col3 {0.000 1.000 1.000 srgb} bind def
|
||||
/col4 {1.000 0.000 0.000 srgb} bind def
|
||||
/col5 {1.000 0.000 1.000 srgb} bind def
|
||||
/col6 {1.000 1.000 0.000 srgb} bind def
|
||||
/col7 {1.000 1.000 1.000 srgb} bind def
|
||||
/col8 {0.000 0.000 0.560 srgb} bind def
|
||||
/col9 {0.000 0.000 0.690 srgb} bind def
|
||||
/col10 {0.000 0.000 0.820 srgb} bind def
|
||||
/col11 {0.530 0.810 1.000 srgb} bind def
|
||||
/col12 {0.000 0.560 0.000 srgb} bind def
|
||||
/col13 {0.000 0.690 0.000 srgb} bind def
|
||||
/col14 {0.000 0.820 0.000 srgb} bind def
|
||||
/col15 {0.000 0.560 0.560 srgb} bind def
|
||||
/col16 {0.000 0.690 0.690 srgb} bind def
|
||||
/col17 {0.000 0.820 0.820 srgb} bind def
|
||||
/col18 {0.560 0.000 0.000 srgb} bind def
|
||||
/col19 {0.690 0.000 0.000 srgb} bind def
|
||||
/col20 {0.820 0.000 0.000 srgb} bind def
|
||||
/col21 {0.560 0.000 0.560 srgb} bind def
|
||||
/col22 {0.690 0.000 0.690 srgb} bind def
|
||||
/col23 {0.820 0.000 0.820 srgb} bind def
|
||||
/col24 {0.500 0.190 0.000 srgb} bind def
|
||||
/col25 {0.630 0.250 0.000 srgb} bind def
|
||||
/col26 {0.750 0.380 0.000 srgb} bind def
|
||||
/col27 {1.000 0.500 0.500 srgb} bind def
|
||||
/col28 {1.000 0.630 0.630 srgb} bind def
|
||||
/col29 {1.000 0.750 0.750 srgb} bind def
|
||||
/col30 {1.000 0.880 0.880 srgb} bind def
|
||||
/col31 {1.000 0.840 0.000 srgb} bind def
|
||||
|
||||
end
|
||||
save
|
||||
-6.0 54.0 translate
|
||||
1 -1 scale
|
||||
|
||||
/cp {closepath} bind def
|
||||
/ef {eofill} bind def
|
||||
/gr {grestore} bind def
|
||||
/gs {gsave} bind def
|
||||
/sa {save} bind def
|
||||
/rs {restore} bind def
|
||||
/l {lineto} bind def
|
||||
/m {moveto} bind def
|
||||
/rm {rmoveto} bind def
|
||||
/n {newpath} bind def
|
||||
/s {stroke} bind def
|
||||
/sh {show} bind def
|
||||
/slc {setlinecap} bind def
|
||||
/slj {setlinejoin} bind def
|
||||
/slw {setlinewidth} bind def
|
||||
/srgb {setrgbcolor} bind def
|
||||
/rot {rotate} bind def
|
||||
/sc {scale} bind def
|
||||
/sd {setdash} bind def
|
||||
/ff {findfont} bind def
|
||||
/sf {setfont} bind def
|
||||
/scf {scalefont} bind def
|
||||
/sw {stringwidth} bind def
|
||||
/tr {translate} bind def
|
||||
/tnt {dup dup currentrgbcolor
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
|
||||
bind def
|
||||
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
|
||||
4 -2 roll mul srgb} bind def
|
||||
/DrawEllipse {
|
||||
/endangle exch def
|
||||
/startangle exch def
|
||||
/yrad exch def
|
||||
/xrad exch def
|
||||
/y exch def
|
||||
/x exch def
|
||||
/savematrix mtrx currentmatrix def
|
||||
x y tr xrad yrad sc 0 0 1 startangle endangle arc
|
||||
closepath
|
||||
savematrix setmatrix
|
||||
} def
|
||||
|
||||
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
|
||||
/$F2psEnd {$F2psEnteredState restore end} def
|
||||
%%EndProlog
|
||||
|
||||
$F2psBegin
|
||||
10 setmiterlimit
|
||||
n -1000 2800 m -1000 -1000 l 14886 -1000 l 14886 2800 l cp clip
|
||||
0.03000 0.03000 sc
|
||||
7.500 slw
|
||||
% Ellipse
|
||||
n 900 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 6300 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 4500 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2700 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 8100 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 9600 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 11100 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 12600 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Polyline
|
||||
gs clippath
|
||||
5835 870 m 6000 900 l 5835 930 l 6015 930 l 6015 870 l cp
|
||||
clip
|
||||
n 4800 900 m 6000 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5835 870 m 6000 900 l 5835 930 l 5835 900 l 5835 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
5859 990 m 6000 900 l 5900 1034 l 6031 912 l 5991 868 l cp
|
||||
clip
|
||||
n 4800 900 m 4802 902 l 4807 906 l 4815 914 l 4828 926 l 4846 942 l
|
||||
4869 963 l 4896 986 l 4926 1013 l 4958 1041 l 4992 1070 l
|
||||
5027 1099 l 5061 1127 l 5095 1154 l 5128 1178 l 5159 1201 l
|
||||
5188 1221 l 5216 1238 l 5242 1254 l 5267 1267 l 5291 1277 l
|
||||
5314 1286 l 5336 1292 l 5358 1297 l 5379 1299 l 5400 1300 l
|
||||
5421 1299 l 5442 1297 l 5464 1292 l 5486 1286 l 5509 1277 l
|
||||
5533 1267 l 5558 1254 l 5584 1238 l 5612 1221 l 5641 1201 l
|
||||
5672 1178 l 5705 1154 l 5739 1127 l 5773 1099 l 5808 1070 l
|
||||
5842 1041 l 5874 1013 l 5904 986 l 5931 963 l 5954 942 l
|
||||
5972 926 l 6000 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5859 990 m 6000 900 l 5900 1034 l 5879 1012 l 5859 990 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
5900 758 m 6000 892 l 5859 802 l 5991 924 l 6031 880 l cp
|
||||
clip
|
||||
n 4800 892 m 4802 890 l 4807 886 l 4815 878 l 4828 866 l 4846 850 l
|
||||
4869 829 l 4896 806 l 4926 779 l 4958 751 l 4992 722 l
|
||||
5027 693 l 5061 665 l 5095 638 l 5128 614 l 5159 591 l
|
||||
5188 571 l 5216 554 l 5242 538 l 5267 525 l 5291 515 l
|
||||
5314 506 l 5336 500 l 5358 495 l 5379 493 l 5400 492 l
|
||||
5421 493 l 5442 495 l 5464 500 l 5486 506 l 5509 515 l
|
||||
5533 525 l 5558 538 l 5584 554 l 5612 571 l 5641 591 l
|
||||
5672 614 l 5705 638 l 5739 665 l 5773 693 l 5808 722 l
|
||||
5842 751 l 5874 779 l 5904 806 l 5931 829 l 5954 850 l
|
||||
5972 866 l 6000 892 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5900 758 m 6000 892 l 5859 802 l 5879 780 l 5900 758 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4035 870 m 4200 900 l 4035 930 l 4215 930 l 4215 870 l cp
|
||||
clip
|
||||
n 3000 900 m 4200 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4035 870 m 4200 900 l 4035 930 l 4035 900 l 4035 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4059 990 m 4200 900 l 4100 1034 l 4231 912 l 4191 868 l cp
|
||||
clip
|
||||
n 3000 900 m 3002 902 l 3007 906 l 3015 914 l 3028 926 l 3046 942 l
|
||||
3069 963 l 3096 986 l 3126 1013 l 3158 1041 l 3192 1070 l
|
||||
3227 1099 l 3261 1127 l 3295 1154 l 3328 1178 l 3359 1201 l
|
||||
3388 1221 l 3416 1238 l 3442 1254 l 3467 1267 l 3491 1277 l
|
||||
3514 1286 l 3536 1292 l 3558 1297 l 3579 1299 l 3600 1300 l
|
||||
3621 1299 l 3642 1297 l 3664 1292 l 3686 1286 l 3709 1277 l
|
||||
3733 1267 l 3758 1254 l 3784 1238 l 3812 1221 l 3841 1201 l
|
||||
3872 1178 l 3905 1154 l 3939 1127 l 3973 1099 l 4008 1070 l
|
||||
4042 1041 l 4074 1013 l 4104 986 l 4131 963 l 4154 942 l
|
||||
4172 926 l 4200 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4059 990 m 4200 900 l 4100 1034 l 4079 1012 l 4059 990 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4100 758 m 4200 892 l 4059 802 l 4191 924 l 4231 880 l cp
|
||||
clip
|
||||
n 3000 892 m 3002 890 l 3007 886 l 3015 878 l 3028 866 l 3046 850 l
|
||||
3069 829 l 3096 806 l 3126 779 l 3158 751 l 3192 722 l
|
||||
3227 693 l 3261 665 l 3295 638 l 3328 614 l 3359 591 l
|
||||
3388 571 l 3416 554 l 3442 538 l 3467 525 l 3491 515 l
|
||||
3514 506 l 3536 500 l 3558 495 l 3579 493 l 3600 492 l
|
||||
3621 493 l 3642 495 l 3664 500 l 3686 506 l 3709 515 l
|
||||
3733 525 l 3758 538 l 3784 554 l 3812 571 l 3841 591 l
|
||||
3872 614 l 3905 638 l 3939 665 l 3973 693 l 4008 722 l
|
||||
4042 751 l 4074 779 l 4104 806 l 4131 829 l 4154 850 l
|
||||
4172 866 l 4200 892 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4100 758 m 4200 892 l 4059 802 l 4079 780 l 4100 758 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2235 870 m 2400 900 l 2235 930 l 2415 930 l 2415 870 l cp
|
||||
clip
|
||||
n 1200 900 m 2400 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2235 870 m 2400 900 l 2235 930 l 2235 900 l 2235 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2259 990 m 2400 900 l 2300 1034 l 2431 912 l 2391 868 l cp
|
||||
clip
|
||||
n 1200 900 m 1202 902 l 1207 906 l 1215 914 l 1228 926 l 1246 942 l
|
||||
1269 963 l 1296 986 l 1326 1013 l 1358 1041 l 1392 1070 l
|
||||
1427 1099 l 1461 1127 l 1495 1154 l 1528 1178 l 1559 1201 l
|
||||
1588 1221 l 1616 1238 l 1642 1254 l 1667 1267 l 1691 1277 l
|
||||
1714 1286 l 1736 1292 l 1758 1297 l 1779 1299 l 1800 1300 l
|
||||
1821 1299 l 1842 1297 l 1864 1292 l 1886 1286 l 1909 1277 l
|
||||
1933 1267 l 1958 1254 l 1984 1238 l 2012 1221 l 2041 1201 l
|
||||
2072 1178 l 2105 1154 l 2139 1127 l 2173 1099 l 2208 1070 l
|
||||
2242 1041 l 2274 1013 l 2304 986 l 2331 963 l 2354 942 l
|
||||
2372 926 l 2400 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2259 990 m 2400 900 l 2300 1034 l 2279 1012 l 2259 990 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2300 758 m 2400 892 l 2259 802 l 2391 924 l 2431 880 l cp
|
||||
clip
|
||||
n 1200 892 m 1202 890 l 1207 886 l 1215 878 l 1228 866 l 1246 850 l
|
||||
1269 829 l 1296 806 l 1326 779 l 1358 751 l 1392 722 l
|
||||
1427 693 l 1461 665 l 1495 638 l 1528 614 l 1559 591 l
|
||||
1588 571 l 1616 554 l 1642 538 l 1667 525 l 1691 515 l
|
||||
1714 506 l 1736 500 l 1758 495 l 1779 493 l 1800 492 l
|
||||
1821 493 l 1842 495 l 1864 500 l 1886 506 l 1909 515 l
|
||||
1933 525 l 1958 538 l 1984 554 l 2012 571 l 2041 591 l
|
||||
2072 614 l 2105 638 l 2139 665 l 2173 693 l 2208 722 l
|
||||
2242 751 l 2274 779 l 2304 806 l 2331 829 l 2354 850 l
|
||||
2372 866 l 2400 892 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2300 758 m 2400 892 l 2259 802 l 2279 780 l 2300 758 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
435 870 m 600 900 l 435 930 l 615 930 l 615 870 l cp
|
||||
clip
|
||||
n 225 900 m 600 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 435 870 m 600 900 l 435 930 l 435 900 l 435 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
7635 870 m 7800 900 l 7635 930 l 7815 930 l 7815 870 l cp
|
||||
clip
|
||||
n 6600 900 m 7800 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 7635 870 m 7800 900 l 7635 930 l 7635 900 l 7635 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
7659 990 m 7800 900 l 7700 1034 l 7831 912 l 7791 868 l cp
|
||||
clip
|
||||
n 6600 900 m 6602 902 l 6607 906 l 6615 914 l 6628 926 l 6646 942 l
|
||||
6669 963 l 6696 986 l 6726 1013 l 6758 1041 l 6792 1070 l
|
||||
6827 1099 l 6861 1127 l 6895 1154 l 6928 1178 l 6959 1201 l
|
||||
6988 1221 l 7016 1238 l 7042 1254 l 7067 1267 l 7091 1277 l
|
||||
7114 1286 l 7136 1292 l 7158 1297 l 7179 1299 l 7200 1300 l
|
||||
7221 1299 l 7242 1297 l 7264 1292 l 7286 1286 l 7309 1277 l
|
||||
7333 1267 l 7358 1254 l 7384 1238 l 7412 1221 l 7441 1201 l
|
||||
7472 1178 l 7505 1154 l 7539 1127 l 7573 1099 l 7608 1070 l
|
||||
7642 1041 l 7674 1013 l 7704 986 l 7731 963 l 7754 942 l
|
||||
7772 926 l 7800 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 7659 990 m 7800 900 l 7700 1034 l 7679 1012 l 7659 990 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
7700 758 m 7800 892 l 7659 802 l 7791 924 l 7831 880 l cp
|
||||
clip
|
||||
n 6600 892 m 6602 890 l 6607 886 l 6615 878 l 6628 866 l 6646 850 l
|
||||
6669 829 l 6696 806 l 6726 779 l 6758 751 l 6792 722 l
|
||||
6827 693 l 6861 665 l 6895 638 l 6928 614 l 6959 591 l
|
||||
6988 571 l 7016 554 l 7042 538 l 7067 525 l 7091 515 l
|
||||
7114 506 l 7136 500 l 7158 495 l 7179 493 l 7200 492 l
|
||||
7221 493 l 7242 495 l 7264 500 l 7286 506 l 7309 515 l
|
||||
7333 525 l 7358 538 l 7384 554 l 7412 571 l 7441 591 l
|
||||
7472 614 l 7505 638 l 7539 665 l 7573 693 l 7608 722 l
|
||||
7642 751 l 7674 779 l 7704 806 l 7731 829 l 7754 850 l
|
||||
7772 866 l 7800 892 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 7700 758 m 7800 892 l 7659 802 l 7679 780 l 7700 758 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
9135 870 m 9300 900 l 9135 930 l 9315 930 l 9315 870 l cp
|
||||
clip
|
||||
n 8400 900 m 9300 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 9135 870 m 9300 900 l 9135 930 l 9135 900 l 9135 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
10635 870 m 10800 900 l 10635 930 l 10815 930 l 10815 870 l cp
|
||||
clip
|
||||
n 9900 900 m 10800 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 10635 870 m 10800 900 l 10635 930 l 10635 900 l 10635 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
12135 870 m 12300 900 l 12135 930 l 12315 930 l 12315 870 l cp
|
||||
clip
|
||||
n 11400 900 m 12300 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 12135 870 m 12300 900 l 12135 930 l 12135 900 l 12135 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
12630 1335 m 12600 1500 l 12570 1335 l 12570 1515 l 12630 1515 l cp
|
||||
clip
|
||||
n 12600 1200 m 12600 1500 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 12630 1335 m 12600 1500 l 12570 1335 l 12600 1335 l 12630 1335 l cp gs 0.00 setgray ef gr col0 s
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
817 960 m
|
||||
gs 1 -1 sc (1) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5400 825 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5325 1200 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5325 442 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3600 825 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3525 1200 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3525 442 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
2625 945 m
|
||||
gs 1 -1 sc (2) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
1800 825 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
1725 1200 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
1725 442 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
4425 945 m
|
||||
gs 1 -1 sc (3) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
6225 945 m
|
||||
gs 1 -1 sc (4) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7200 825 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7125 1200 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7125 442 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
8025 945 m
|
||||
gs 1 -1 sc (5) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
8775 750 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
9525 975 m
|
||||
gs 1 -1 sc (6) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
10275 750 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
11025 975 m
|
||||
gs 1 -1 sc (7) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
11700 825 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
12525 975 m
|
||||
gs 1 -1 sc (8) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
11625 1800 m
|
||||
gs 1 -1 sc (Pattern "????..X") col0 sh gr
|
||||
$F2psEnd
|
||||
rs
|
111
gnugo/doc/dfa.fig
Normal file
|
@ -0,0 +1,111 @@
|
|||
#FIG 3.2
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
50.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
6 225 225 13875 1800
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 900 900 300 300 900 900 1200 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 6300 900 300 300 6300 900 6600 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 4500 900 300 300 4500 900 4800 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2700 900 300 300 2700 900 3000 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 8100 900 300 300 8100 900 8400 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 9600 900 300 300 9600 900 9900 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 11100 900 300 300 11100 900 11400 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 12600 900 300 300 12600 900 12900 900
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 900 6000 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 900 5400 1500 6000 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 892 5400 292 6000 892
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
3000 900 4200 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
3000 900 3600 1500 4200 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
3000 892 3600 292 4200 892
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
1200 900 2400 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
1200 900 1800 1500 2400 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
1200 892 1800 292 2400 892
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
225 900 600 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
6600 900 7800 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
6600 900 7200 1500 7800 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
6600 892 7200 292 7800 892
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
8400 900 9300 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
9900 900 10800 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
11400 900 12300 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
12600 1200 12600 1500
|
||||
0.000 0.000
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 817 960 1\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 5400 825 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 5325 1200 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 5325 442 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 3600 825 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 3525 1200 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 3525 442 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 2625 945 2\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 1800 825 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 1725 1200 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 1725 442 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 4425 945 3\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 6225 945 4\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 7200 825 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 7125 1200 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 7125 442 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 8025 945 5\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 8775 750 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 9525 975 6\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 10275 750 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 11025 975 7\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 11700 825 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 12525 975 8\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 2205 11625 1800 Pattern "????..X"\001
|
||||
-6
|
BIN
gnugo/doc/dfa.jpg
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
gnugo/doc/dfa.pdf
Normal file
BIN
gnugo/doc/dfa.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
441
gnugo/doc/dfa.texi
Normal file
|
@ -0,0 +1,441 @@
|
|||
In this chapter, we describe the principles of the GNU Go DFA
|
||||
pattern matcher. The aim of this system is to permit a fast
|
||||
pattern matching when it becomes time critical like in owl
|
||||
module (@ref{The Owl Code}). Since GNU Go 3.2, this is enabled
|
||||
by default. You can still get back the traditional pattern matcher
|
||||
by running @command{configure --disable-dfa} and then recompiling
|
||||
GNU Go.
|
||||
|
||||
Otherwise, a finite state machine called a Deterministic Finite
|
||||
State Automaton (@ref{What is a DFA}) will be built off line from the
|
||||
pattern database. This is used at runtime to speedup pattern matching
|
||||
(@ref{Pattern matching with DFA} and @ref{Incremental Algorithm}). The
|
||||
runtime speedup is at the cost of an increase in memory use and
|
||||
compile time.
|
||||
|
||||
|
||||
@menu
|
||||
* Introduction to the DFA:: Scanning the board along a path
|
||||
* What is a DFA:: A recall of language theory.
|
||||
* Pattern matching with DFA:: How to retrieve go patterns with a DFA?
|
||||
* Building the DFA:: Playing with explosives.
|
||||
* Incremental Algorithm:: The joy of determinism.
|
||||
* DFA Optimizations:: Some possible optimizations.
|
||||
@end menu
|
||||
|
||||
|
||||
@cindex pattern matching
|
||||
@cindex fast pattern matching
|
||||
@cindex pattern database
|
||||
@cindex finite state automaton
|
||||
@cindex automaton
|
||||
@cindex dfa
|
||||
@cindex dfa.h
|
||||
@cindex dfa.c
|
||||
@cindex matchpat.c
|
||||
@cindex product
|
||||
|
||||
|
||||
@node Introduction to the DFA
|
||||
@section Introduction to the DFA
|
||||
|
||||
The general idea is as follows:
|
||||
|
||||
For each intersection of the board, its neighbourhood is scanned following
|
||||
a predefined path. The actual path used does not matter very much; GNU Go
|
||||
uses a spiral as shown below.
|
||||
|
||||
@ifinfo
|
||||
@example
|
||||
+---B--------------+
|
||||
| C 4 A . . . . . .|
|
||||
D 5 1 3 9 . . . . .|
|
||||
E 6 2 8 . . X . . .|
|
||||
| F 7 . . . . . . .|
|
||||
| . +-> . . . . . .|
|
||||
| . . . . . . . . .|
|
||||
| . O . . . X . . .|
|
||||
| . . . . . . . . .|
|
||||
| . . . . . . . . .|
|
||||
+------------------+
|
||||
@end example
|
||||
@end ifinfo
|
||||
@ifnotinfo
|
||||
@image{path}
|
||||
@end ifnotinfo
|
||||
|
||||
In each step of the path, the pattern matcher jumps into a state
|
||||
determined by what it has found on the board so far. If we have
|
||||
successfully matched one or several patterns in this step, this state
|
||||
immediately tells us so (in its @dfn{attribute}).
|
||||
But the state also implicitly encodes which further patterns can still
|
||||
get matched: The information stored in the state contains in which state
|
||||
to jump next, depending on whether we find a black, white or empty
|
||||
intersection (or an intersection out of board) in the next step of the
|
||||
path. The state will also immediately tell us if we cannot find any
|
||||
further pattern (by telling us to jump into the @dfn{error} state).
|
||||
|
||||
These sloppy explanations may become clearer with the definitions in
|
||||
the next section (@ref{What is a DFA}).
|
||||
|
||||
Reading the board following a predefined path reduces
|
||||
the two dimentional pattern matching to a linear text searching problem.
|
||||
For example, this pattern
|
||||
|
||||
@example
|
||||
?X?
|
||||
.O?
|
||||
?OO
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
scanned following the path
|
||||
|
||||
@example
|
||||
B
|
||||
C4A
|
||||
5139
|
||||
628
|
||||
7
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
gives the string @b{"OO?X.?*O*?*?"}
|
||||
where @b{"?"} means @b{'don't care'} and @b{"*"} means @b{'don't care, can
|
||||
even be out of board'}.
|
||||
|
||||
So we can forget that we are dealing with two dimensional patterns and
|
||||
consider linear patterns.
|
||||
|
||||
|
||||
@node What is a DFA
|
||||
@section What is a DFA
|
||||
|
||||
The acronym DFA means Deterministic Finite state Automaton
|
||||
(See @uref{http://www.eti.pg.gda.pl/~jandac/thesis/node12.html}
|
||||
or @cite{Hopcroft & Ullman "Introduction to Language Theory"}
|
||||
for more details).
|
||||
DFA are common tools in compilers design
|
||||
(Read @cite{Aho, Ravi Sethi, Ullman "COMPILERS: Principles, Techniques and Tools"}
|
||||
for a complete introduction), a lot of
|
||||
powerfull text searching algorithm like @cite{Knuth-Morris-Pratt}
|
||||
or @cite{Boyer-Moore} algorithms are based on DFA's
|
||||
(See @uref{http://www-igm.univ-mlv.fr/~lecroq/string/} for a bibliography
|
||||
of pattern matching algorithms).
|
||||
|
||||
Basically,
|
||||
a DFA is a set of @dfn{states} connected by labeled @dfn{transitions}.
|
||||
The labels are the values read on the board,
|
||||
in GNU Go these values are EMPTY, WHITE, BLACK or OUT_BOARD, denoted
|
||||
respectively by '.','O','X' and '#'.
|
||||
|
||||
|
||||
The best way to represent a DFA is to draw its transition graph:
|
||||
the pattern @b{"????..X"} is recognized by the following DFA:
|
||||
|
||||
@ifinfo
|
||||
@example
|
||||
@group
|
||||
.,X,O .,X,O .,X,O .,X,O . . X
|
||||
[1]------>[2]----->[3]----->[4]----->[5]--->[6]--->[7]--->[8 OK!]
|
||||
Start
|
||||
@end group
|
||||
@end example
|
||||
@end ifinfo
|
||||
|
||||
@ifnotinfo
|
||||
@image{dfa}
|
||||
@end ifnotinfo
|
||||
|
||||
|
||||
This means that
|
||||
starting from state [1], if you read '.','X' or 'O' on the board,
|
||||
go to state [2] and so on until you reach state [5].
|
||||
From state [5], if you read '.', go to state [6]
|
||||
otherwise go to error state [0].
|
||||
And so on until you reach state [8].
|
||||
As soon as you reach state [8],
|
||||
you recognize Pattern @b{"????..X"}
|
||||
|
||||
Adding a pattern like @b{"XXo"} ('o' is a wildcard for not 'X')
|
||||
will transform directly the automaton
|
||||
by synchronization product (@ref{Building the DFA}).
|
||||
Consider the following DFA:
|
||||
|
||||
@ifinfo
|
||||
@example
|
||||
@group
|
||||
Start .,O .,X,O .,O,X .,X,O . . X
|
||||
[1]---->[2]----->[3]----->[4]------>[5]--->[6]---->[7]--->[8 OK!]
|
||||
| ^ ^ ^
|
||||
| .,O | | |
|
||||
| ---- | |
|
||||
| | X | |
|
||||
| | --- .,X,O |
|
||||
| | | |
|
||||
| X | X | O,. |
|
||||
--------->[9]------>[A]--->[B OK!]-
|
||||
@end group
|
||||
@end example
|
||||
@end ifinfo
|
||||
|
||||
@ifnotinfo
|
||||
@image{dfa2}
|
||||
@end ifnotinfo
|
||||
|
||||
By adding a special @dfn{error} state and completing each state
|
||||
by a transition to error state when there is none, we transform
|
||||
easily a DFA in a @dfn{Complete Deterministic Finite state
|
||||
Automaton} (CDFA). The synchronization product
|
||||
(@ref{Building the DFA}) is only possible on CDFA's.
|
||||
|
||||
|
||||
@ifinfo
|
||||
@example
|
||||
@group
|
||||
Start .,O .,X,O .,O,X .,X,O . . X
|
||||
[1]---->[2]----->[3]----->[4]------>[5]--->[6]---->[7]--->[8 OK!]
|
||||
| ^ ^ ^ | | |
|
||||
| .,O | | | | | |
|
||||
| ---- | | | | |
|
||||
| | X | | |X,O | .,O |X,.,O
|
||||
| | --- .,X,O | | | |
|
||||
| | | | | | |
|
||||
| X | X | O,. | \ / \ / \ /
|
||||
--------->[9]------>[A]--->[B OK!]- [0 Error state !]
|
||||
@end group
|
||||
@end example
|
||||
@end ifinfo
|
||||
@ifnotinfo
|
||||
@image{cdfa}
|
||||
@end ifnotinfo
|
||||
|
||||
The graph of a CDFA is coded by an array of states:
|
||||
The 0 state is the "error" state and
|
||||
the start state is 1.
|
||||
|
||||
@example
|
||||
@group
|
||||
----------------------------------------------------
|
||||
state | . | O | X | # | att
|
||||
----------------------------------------------------
|
||||
1 | 2 | 2 | 9 | 0 |
|
||||
2 | 3 | 3 | 3 | 0 |
|
||||
3 | 4 | 4 | 4 | 0 |
|
||||
5 | 6 | 0 | 0 | 0 |
|
||||
6 | 7 | 0 | 0 | 0 |
|
||||
7 | 0 | 0 | 8 | 0 |
|
||||
8 | 0 | 0 | 0 | 0 | Found pattern "????..X"
|
||||
9 | 3 | 3 | A | 0 |
|
||||
A | B | B | 4 | 0 |
|
||||
B | 5 | 5 | 5 | 0 | Found pattern "XXo"
|
||||
----------------------------------------------------
|
||||
@end group
|
||||
@end example
|
||||
|
||||
To each state we associate an often empty
|
||||
list of attributes which is the
|
||||
list of pattern indexes recognized when this state is reached.
|
||||
In '@file{dfa.h}' this is basically represented by two stuctures:
|
||||
|
||||
@example
|
||||
@group
|
||||
@code{
|
||||
/* dfa state */
|
||||
typedef struct state
|
||||
@{
|
||||
int next[4]; /* transitions for EMPTY, BLACK, WHITE and OUT_BOARD */
|
||||
attrib_t *att;
|
||||
@}
|
||||
state_t;
|
||||
|
||||
/* dfa */
|
||||
typedef struct dfa
|
||||
@{
|
||||
attrib_t *indexes; /* Array of pattern indexes */
|
||||
int maxIndexes;
|
||||
|
||||
state_t *states; /* Array of states */
|
||||
int maxStates;
|
||||
@}
|
||||
dfa_t;}
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@node Pattern matching with DFA
|
||||
@section Pattern matching with DFA
|
||||
|
||||
Recognizing with a DFA is very simple
|
||||
and thus very fast
|
||||
(See '@code{scan_for_pattern()}' in the '@file{engine/matchpat.c}' file).
|
||||
|
||||
|
||||
Starting from the start state, we only need to read the board
|
||||
following the spiral path, jump from states to states following
|
||||
the transitions labelled by the values read on the board and
|
||||
collect the patterns indexes on the way. If we reach the error
|
||||
state (zero), it means that no more patterns will be matched.
|
||||
The worst case complexity of this algorithm is o(m) where m is
|
||||
the size of the biggest pattern.
|
||||
|
||||
Here is an example of scan:
|
||||
|
||||
First we build a minimal DFA recognizing these patterns:
|
||||
@b{"X..X"}, @b{"X???"}, @b{"X.OX"} and @b{"X?oX"}.
|
||||
Note that wildcards like '?','o', or 'x' give multiple out-transitions.
|
||||
|
||||
@example
|
||||
@group
|
||||
----------------------------------------------------
|
||||
state | . | O | X | # | att
|
||||
----------------------------------------------------
|
||||
1 | 0 | 0 | 2 | 0 |
|
||||
2 | 3 | 10 | 10 | 0 |
|
||||
3 | 4 | 7 | 9 | 0 |
|
||||
4 | 5 | 5 | 6 | 0 |
|
||||
5 | 0 | 0 | 0 | 0 | 2
|
||||
6 | 0 | 0 | 0 | 0 | 4 2 1
|
||||
7 | 5 | 5 | 8 | 0 |
|
||||
8 | 0 | 0 | 0 | 0 | 4 2 3
|
||||
9 | 5 | 5 | 5 | 0 |
|
||||
10 | 11 | 11 | 9 | 0 |
|
||||
11 | 5 | 5 | 12 | 0 |
|
||||
12 | 0 | 0 | 0 | 0 | 4 2
|
||||
----------------------------------------------------
|
||||
@end group
|
||||
@end example
|
||||
|
||||
We perform the scan of the string
|
||||
@b{"X..XXO...."} starting from state 1:
|
||||
|
||||
Current state: 1, substring to scan :@b{ X..XXO....}
|
||||
|
||||
We read an 'X' value, so from state 1 we must go to
|
||||
state 2.
|
||||
|
||||
Current state: 2, substring to scan : @b{..XXO....}
|
||||
|
||||
We read a '.' value, so from state 2 we must go to
|
||||
state 3 and so on ...
|
||||
|
||||
@example
|
||||
Current state: 3, substring to scan : .XXO....
|
||||
Current state: 4, substring to scan : XXO....
|
||||
Current state: 6, substring to scan : XO....
|
||||
Found pattern 4
|
||||
Found pattern 2
|
||||
Found pattern 1
|
||||
@end example
|
||||
|
||||
After reaching state 6 where we match patterns
|
||||
1,2 and 4, there is no out-transitions so we stop the matching.
|
||||
To keep the same match order as in the standard algorithm,
|
||||
the patterns indexes are collected in an array and sorted by indexes.
|
||||
|
||||
@node Building the DFA
|
||||
@section Building the DFA
|
||||
|
||||
The most flavouring point is the building of the minimal DFA
|
||||
recognizing a given set of patterns.
|
||||
To perform the insertion of a new
|
||||
pattern into an already existing DFA one must completly rebuild
|
||||
the DFA: the principle is to build the minimal CDFA recognizing
|
||||
the new pattern to replace the original CDFA with its
|
||||
@dfn{synchronised product} by the new one.
|
||||
|
||||
We first give a formal definition:
|
||||
Let @b{L} be the left CDFA and @b{R} be the right one.
|
||||
Let @b{B} be the @dfn{synchronised product} of @b{L} by @b{R}.
|
||||
Its states are the couples @b{(l,r)} where @b{l} is a state of @b{L} and
|
||||
@b{r} is a state of @b{R}.
|
||||
The state @b{(0,0)} is the error state of @b{B} and the state
|
||||
@b{(1,1)} is its initial state.
|
||||
To each couple @b{(l,r)} we associate the union of patterns
|
||||
recognized in both @b{l} and @b{r}.
|
||||
The transitions set of @b{B} is the set of transitions
|
||||
@b{(l1,r1)---a--->(l2,r2)} for
|
||||
each symbol @b{'a'} such that both @b{l1---a--->l2} in @b{L}
|
||||
and @b{r1---a--->r2} in @b{R}.
|
||||
|
||||
The maximal number of states of @b{B} is the product of the
|
||||
number of states of @b{L} and @b{R} but almost all this states
|
||||
are non reachable from the initial state @b{(1,1)}.
|
||||
|
||||
The algorithm used in function '@code{sync_product()}' builds
|
||||
the minimal product DFA only by keeping the reachable states.
|
||||
It recursively scans the product CDFA by following simultaneously
|
||||
the transitions of @b{L} and @b{R}. A hast table
|
||||
(@code{gtest}) is used to check if a state @b{(l,r)} has
|
||||
already been reached, the reachable states are remapped on
|
||||
a new DFA. The CDFA thus obtained is minimal and recognizes the
|
||||
union of the two patterns sets.
|
||||
|
||||
@ifnotinfo
|
||||
For example these two CDFA's:
|
||||
|
||||
|
||||
@image{sync-prod1}
|
||||
|
||||
Give by synchronization product the following one:
|
||||
|
||||
|
||||
@image{sync-prod2}
|
||||
@end ifnotinfo
|
||||
|
||||
It is possible to construct a special pattern database that
|
||||
generates an "explosive" automaton: the size of the DFA is in
|
||||
the worst case exponential in the number of patterns it
|
||||
recognizes. But it doesn't occur in pratical situations:
|
||||
the DFA size tends to be @dfn{stable}. By @dfn{stable} we mean that if we
|
||||
add a pattern which greatly increases the size of the DFA it
|
||||
also increases the chance that the next added pattern does not
|
||||
increase its size at all. Nevertheless there are many ways to
|
||||
reduce the size of the DFA. Good compression methods are
|
||||
explained in @cite{Aho, Ravi Sethi, Ullman "COMPILERS:
|
||||
Principles, Techniques and Tools" chapter Optimization of
|
||||
DFA-based pattern matchers}.
|
||||
|
||||
@node Incremental Algorithm
|
||||
@section Incremental Algorithm
|
||||
|
||||
The incremental version of the DFA pattern matcher is not yet implemented
|
||||
in GNU Go but we explain here how it will work.
|
||||
By definition of a deterministic automaton, scanning the same
|
||||
string will reach the same states every time.
|
||||
|
||||
Each reached state during pattern matching is stored in a stack
|
||||
@code{top_stack[i][j]} and @code{state_stack[i][j][stack_idx]}
|
||||
We use one stack by intersection @code{(i,j)}. A precomputed reverse
|
||||
path list allows to know for each couple of board intersections
|
||||
@code{(x,y)} its position @code{reverse(x,y)} in the spiral scan path
|
||||
starting from @code{(0,0)}.
|
||||
|
||||
When a new stone is put on the board at @code{(lx,ly)}, the only work
|
||||
of the pattern matcher is:
|
||||
|
||||
@example
|
||||
@group
|
||||
@code{
|
||||
for(each stone on the board at (i,j))
|
||||
if(reverse(lx-i,ly-j) < top_stack[i][j])
|
||||
@{
|
||||
begin the dfa scan from the state
|
||||
state_stack[i][j][reverse(lx-i,ly-j)];
|
||||
@}
|
||||
}
|
||||
@end group
|
||||
@end example
|
||||
|
||||
In most situations reverse(lx-i,ly-j) will be inferior to
|
||||
top_stack[i][j]. This should speedup a lot pattern matching.
|
||||
|
||||
@node DFA Optimizations
|
||||
@section Some DFA Optimizations
|
||||
|
||||
The DFA is constructed to minimize jumps in memory making some
|
||||
assumptions about the frequencies of the values: the EMPTY
|
||||
value is supposed to appear often on the board, so the the '.'
|
||||
transition are almost always successors in memory. The
|
||||
OUT_BOARD are supposed to be rare, so '#' transitions will
|
||||
almost always imply a big jump.
|
||||
|
622
gnugo/doc/dfa2.eps
Normal file
|
@ -0,0 +1,622 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: dfa2.eps
|
||||
%%Creator: fig2dev Version 3.2 Patchlevel 1
|
||||
%%CreationDate: Fri Jun 22 17:40:37 2001
|
||||
%%For: turvoy@semeai.irisa.fr (Tanguy Urvoy, DEA, Paragraphe)
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 411 101
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%Magnification: 0.5000
|
||||
%%EndComments
|
||||
/$F2psDict 200 dict def
|
||||
$F2psDict begin
|
||||
$F2psDict /mtrx matrix put
|
||||
/col-1 {0 setgray} bind def
|
||||
/col0 {0.000 0.000 0.000 srgb} bind def
|
||||
/col1 {0.000 0.000 1.000 srgb} bind def
|
||||
/col2 {0.000 1.000 0.000 srgb} bind def
|
||||
/col3 {0.000 1.000 1.000 srgb} bind def
|
||||
/col4 {1.000 0.000 0.000 srgb} bind def
|
||||
/col5 {1.000 0.000 1.000 srgb} bind def
|
||||
/col6 {1.000 1.000 0.000 srgb} bind def
|
||||
/col7 {1.000 1.000 1.000 srgb} bind def
|
||||
/col8 {0.000 0.000 0.560 srgb} bind def
|
||||
/col9 {0.000 0.000 0.690 srgb} bind def
|
||||
/col10 {0.000 0.000 0.820 srgb} bind def
|
||||
/col11 {0.530 0.810 1.000 srgb} bind def
|
||||
/col12 {0.000 0.560 0.000 srgb} bind def
|
||||
/col13 {0.000 0.690 0.000 srgb} bind def
|
||||
/col14 {0.000 0.820 0.000 srgb} bind def
|
||||
/col15 {0.000 0.560 0.560 srgb} bind def
|
||||
/col16 {0.000 0.690 0.690 srgb} bind def
|
||||
/col17 {0.000 0.820 0.820 srgb} bind def
|
||||
/col18 {0.560 0.000 0.000 srgb} bind def
|
||||
/col19 {0.690 0.000 0.000 srgb} bind def
|
||||
/col20 {0.820 0.000 0.000 srgb} bind def
|
||||
/col21 {0.560 0.000 0.560 srgb} bind def
|
||||
/col22 {0.690 0.000 0.690 srgb} bind def
|
||||
/col23 {0.820 0.000 0.820 srgb} bind def
|
||||
/col24 {0.500 0.190 0.000 srgb} bind def
|
||||
/col25 {0.630 0.250 0.000 srgb} bind def
|
||||
/col26 {0.750 0.380 0.000 srgb} bind def
|
||||
/col27 {1.000 0.500 0.500 srgb} bind def
|
||||
/col28 {1.000 0.630 0.630 srgb} bind def
|
||||
/col29 {1.000 0.750 0.750 srgb} bind def
|
||||
/col30 {1.000 0.880 0.880 srgb} bind def
|
||||
/col31 {1.000 0.840 0.000 srgb} bind def
|
||||
|
||||
end
|
||||
save
|
||||
-6.0 108.0 translate
|
||||
1 -1 scale
|
||||
|
||||
/cp {closepath} bind def
|
||||
/ef {eofill} bind def
|
||||
/gr {grestore} bind def
|
||||
/gs {gsave} bind def
|
||||
/sa {save} bind def
|
||||
/rs {restore} bind def
|
||||
/l {lineto} bind def
|
||||
/m {moveto} bind def
|
||||
/rm {rmoveto} bind def
|
||||
/n {newpath} bind def
|
||||
/s {stroke} bind def
|
||||
/sh {show} bind def
|
||||
/slc {setlinecap} bind def
|
||||
/slj {setlinejoin} bind def
|
||||
/slw {setlinewidth} bind def
|
||||
/srgb {setrgbcolor} bind def
|
||||
/rot {rotate} bind def
|
||||
/sc {scale} bind def
|
||||
/sd {setdash} bind def
|
||||
/ff {findfont} bind def
|
||||
/sf {setfont} bind def
|
||||
/scf {scalefont} bind def
|
||||
/sw {stringwidth} bind def
|
||||
/tr {translate} bind def
|
||||
/tnt {dup dup currentrgbcolor
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
|
||||
bind def
|
||||
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
|
||||
4 -2 roll mul srgb} bind def
|
||||
/DrawEllipse {
|
||||
/endangle exch def
|
||||
/startangle exch def
|
||||
/yrad exch def
|
||||
/xrad exch def
|
||||
/y exch def
|
||||
/x exch def
|
||||
/savematrix mtrx currentmatrix def
|
||||
x y tr xrad yrad sc 0 0 1 startangle endangle arc
|
||||
closepath
|
||||
savematrix setmatrix
|
||||
} def
|
||||
|
||||
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
|
||||
/$F2psEnd {$F2psEnteredState restore end} def
|
||||
%%EndProlog
|
||||
|
||||
$F2psBegin
|
||||
10 setmiterlimit
|
||||
n -1000 4600 m -1000 -1000 l 14886 -1000 l 14886 4600 l cp clip
|
||||
0.03000 0.03000 sc
|
||||
7.500 slw
|
||||
% Ellipse
|
||||
n 900 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 6300 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 4500 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2700 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 8100 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 9600 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 11100 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 12600 900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2700 2700 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 4500 2700 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 6300 2700 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Polyline
|
||||
gs clippath
|
||||
5835 870 m 6000 900 l 5835 930 l 6015 930 l 6015 870 l cp
|
||||
clip
|
||||
n 4800 900 m 6000 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5835 870 m 6000 900 l 5835 930 l 5835 900 l 5835 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
5859 990 m 6000 900 l 5900 1034 l 6031 912 l 5991 868 l cp
|
||||
clip
|
||||
n 4800 900 m 4802 902 l 4807 906 l 4815 914 l 4828 926 l 4846 942 l
|
||||
4869 963 l 4896 986 l 4926 1013 l 4958 1041 l 4992 1070 l
|
||||
5027 1099 l 5061 1127 l 5095 1154 l 5128 1178 l 5159 1201 l
|
||||
5188 1221 l 5216 1238 l 5242 1254 l 5267 1267 l 5291 1277 l
|
||||
5314 1286 l 5336 1292 l 5358 1297 l 5379 1299 l 5400 1300 l
|
||||
5421 1299 l 5442 1297 l 5464 1292 l 5486 1286 l 5509 1277 l
|
||||
5533 1267 l 5558 1254 l 5584 1238 l 5612 1221 l 5641 1201 l
|
||||
5672 1178 l 5705 1154 l 5739 1127 l 5773 1099 l 5808 1070 l
|
||||
5842 1041 l 5874 1013 l 5904 986 l 5931 963 l 5954 942 l
|
||||
5972 926 l 6000 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5859 990 m 6000 900 l 5900 1034 l 5879 1012 l 5859 990 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
5900 758 m 6000 892 l 5859 802 l 5991 924 l 6031 880 l cp
|
||||
clip
|
||||
n 4800 892 m 4802 890 l 4807 886 l 4815 878 l 4828 866 l 4846 850 l
|
||||
4869 829 l 4896 806 l 4926 779 l 4958 751 l 4992 722 l
|
||||
5027 693 l 5061 665 l 5095 638 l 5128 614 l 5159 591 l
|
||||
5188 571 l 5216 554 l 5242 538 l 5267 525 l 5291 515 l
|
||||
5314 506 l 5336 500 l 5358 495 l 5379 493 l 5400 492 l
|
||||
5421 493 l 5442 495 l 5464 500 l 5486 506 l 5509 515 l
|
||||
5533 525 l 5558 538 l 5584 554 l 5612 571 l 5641 591 l
|
||||
5672 614 l 5705 638 l 5739 665 l 5773 693 l 5808 722 l
|
||||
5842 751 l 5874 779 l 5904 806 l 5931 829 l 5954 850 l
|
||||
5972 866 l 6000 892 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5900 758 m 6000 892 l 5859 802 l 5879 780 l 5900 758 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4035 870 m 4200 900 l 4035 930 l 4215 930 l 4215 870 l cp
|
||||
clip
|
||||
n 3000 900 m 4200 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4035 870 m 4200 900 l 4035 930 l 4035 900 l 4035 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4059 990 m 4200 900 l 4100 1034 l 4231 912 l 4191 868 l cp
|
||||
clip
|
||||
n 3000 900 m 3002 902 l 3007 906 l 3015 914 l 3028 926 l 3046 942 l
|
||||
3069 963 l 3096 986 l 3126 1013 l 3158 1041 l 3192 1070 l
|
||||
3227 1099 l 3261 1127 l 3295 1154 l 3328 1178 l 3359 1201 l
|
||||
3388 1221 l 3416 1238 l 3442 1254 l 3467 1267 l 3491 1277 l
|
||||
3514 1286 l 3536 1292 l 3558 1297 l 3579 1299 l 3600 1300 l
|
||||
3621 1299 l 3642 1297 l 3664 1292 l 3686 1286 l 3709 1277 l
|
||||
3733 1267 l 3758 1254 l 3784 1238 l 3812 1221 l 3841 1201 l
|
||||
3872 1178 l 3905 1154 l 3939 1127 l 3973 1099 l 4008 1070 l
|
||||
4042 1041 l 4074 1013 l 4104 986 l 4131 963 l 4154 942 l
|
||||
4172 926 l 4200 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4059 990 m 4200 900 l 4100 1034 l 4079 1012 l 4059 990 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4100 758 m 4200 892 l 4059 802 l 4191 924 l 4231 880 l cp
|
||||
clip
|
||||
n 3000 892 m 3002 890 l 3007 886 l 3015 878 l 3028 866 l 3046 850 l
|
||||
3069 829 l 3096 806 l 3126 779 l 3158 751 l 3192 722 l
|
||||
3227 693 l 3261 665 l 3295 638 l 3328 614 l 3359 591 l
|
||||
3388 571 l 3416 554 l 3442 538 l 3467 525 l 3491 515 l
|
||||
3514 506 l 3536 500 l 3558 495 l 3579 493 l 3600 492 l
|
||||
3621 493 l 3642 495 l 3664 500 l 3686 506 l 3709 515 l
|
||||
3733 525 l 3758 538 l 3784 554 l 3812 571 l 3841 591 l
|
||||
3872 614 l 3905 638 l 3939 665 l 3973 693 l 4008 722 l
|
||||
4042 751 l 4074 779 l 4104 806 l 4131 829 l 4154 850 l
|
||||
4172 866 l 4200 892 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4100 758 m 4200 892 l 4059 802 l 4079 780 l 4100 758 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2247 969 m 2400 900 l 2281 1018 l 2429 916 l 2395 867 l cp
|
||||
clip
|
||||
n 1200 900 m 1203 902 l 1209 906 l 1219 913 l 1235 924 l 1257 939 l
|
||||
1284 957 l 1315 978 l 1350 1000 l 1387 1024 l 1424 1047 l
|
||||
1461 1070 l 1498 1092 l 1533 1112 l 1566 1129 l 1598 1145 l
|
||||
1627 1159 l 1655 1170 l 1681 1180 l 1706 1187 l 1730 1193 l
|
||||
1754 1197 l 1777 1199 l 1800 1200 l 1823 1199 l 1846 1197 l
|
||||
1870 1193 l 1894 1187 l 1919 1180 l 1945 1170 l 1973 1159 l
|
||||
2002 1145 l 2034 1129 l 2067 1112 l 2102 1092 l 2139 1070 l
|
||||
2176 1047 l 2213 1024 l 2250 1000 l 2285 978 l 2316 957 l
|
||||
2343 939 l 2365 924 l 2400 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2247 969 m 2400 900 l 2281 1018 l 2264 993 l 2247 969 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
435 870 m 600 900 l 435 930 l 615 930 l 615 870 l cp
|
||||
clip
|
||||
n 225 900 m 600 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 435 870 m 600 900 l 435 930 l 435 900 l 435 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
7635 870 m 7800 900 l 7635 930 l 7815 930 l 7815 870 l cp
|
||||
clip
|
||||
n 6600 900 m 7800 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 7635 870 m 7800 900 l 7635 930 l 7635 900 l 7635 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
7659 990 m 7800 900 l 7700 1034 l 7831 912 l 7791 868 l cp
|
||||
clip
|
||||
n 6600 900 m 6602 902 l 6607 906 l 6615 914 l 6628 926 l 6646 942 l
|
||||
6669 963 l 6696 986 l 6726 1013 l 6758 1041 l 6792 1070 l
|
||||
6827 1099 l 6861 1127 l 6895 1154 l 6928 1178 l 6959 1201 l
|
||||
6988 1221 l 7016 1238 l 7042 1254 l 7067 1267 l 7091 1277 l
|
||||
7114 1286 l 7136 1292 l 7158 1297 l 7179 1299 l 7200 1300 l
|
||||
7221 1299 l 7242 1297 l 7264 1292 l 7286 1286 l 7309 1277 l
|
||||
7333 1267 l 7358 1254 l 7384 1238 l 7412 1221 l 7441 1201 l
|
||||
7472 1178 l 7505 1154 l 7539 1127 l 7573 1099 l 7608 1070 l
|
||||
7642 1041 l 7674 1013 l 7704 986 l 7731 963 l 7754 942 l
|
||||
7772 926 l 7800 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 7659 990 m 7800 900 l 7700 1034 l 7679 1012 l 7659 990 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
7700 758 m 7800 892 l 7659 802 l 7791 924 l 7831 880 l cp
|
||||
clip
|
||||
n 6600 892 m 6602 890 l 6607 886 l 6615 878 l 6628 866 l 6646 850 l
|
||||
6669 829 l 6696 806 l 6726 779 l 6758 751 l 6792 722 l
|
||||
6827 693 l 6861 665 l 6895 638 l 6928 614 l 6959 591 l
|
||||
6988 571 l 7016 554 l 7042 538 l 7067 525 l 7091 515 l
|
||||
7114 506 l 7136 500 l 7158 495 l 7179 493 l 7200 492 l
|
||||
7221 493 l 7242 495 l 7264 500 l 7286 506 l 7309 515 l
|
||||
7333 525 l 7358 538 l 7384 554 l 7412 571 l 7441 591 l
|
||||
7472 614 l 7505 638 l 7539 665 l 7573 693 l 7608 722 l
|
||||
7642 751 l 7674 779 l 7704 806 l 7731 829 l 7754 850 l
|
||||
7772 866 l 7800 892 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 7700 758 m 7800 892 l 7659 802 l 7679 780 l 7700 758 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
9135 870 m 9300 900 l 9135 930 l 9315 930 l 9315 870 l cp
|
||||
clip
|
||||
n 8400 900 m 9300 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 9135 870 m 9300 900 l 9135 930 l 9135 900 l 9135 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
10635 870 m 10800 900 l 10635 930 l 10815 930 l 10815 870 l cp
|
||||
clip
|
||||
n 9900 900 m 10800 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 10635 870 m 10800 900 l 10635 930 l 10635 900 l 10635 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
12135 870 m 12300 900 l 12135 930 l 12315 930 l 12315 870 l cp
|
||||
clip
|
||||
n 11400 900 m 12300 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 12135 870 m 12300 900 l 12135 930 l 12135 900 l 12135 870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
12630 1335 m 12600 1500 l 12570 1335 l 12570 1515 l 12630 1515 l cp
|
||||
clip
|
||||
n 12600 1200 m 12600 1500 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 12630 1335 m 12600 1500 l 12570 1335 l 12600 1335 l 12630 1335 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2281 782 m 2400 900 l 2247 831 l 2395 933 l 2429 884 l cp
|
||||
clip
|
||||
n 1200 900 m 1203 898 l 1209 894 l 1219 887 l 1235 876 l 1257 861 l
|
||||
1284 843 l 1315 822 l 1350 800 l 1387 776 l 1424 753 l
|
||||
1461 730 l 1498 708 l 1533 688 l 1566 671 l 1598 655 l
|
||||
1627 641 l 1655 630 l 1681 620 l 1706 613 l 1730 607 l
|
||||
1754 603 l 1777 601 l 1800 600 l 1823 601 l 1846 603 l
|
||||
1870 607 l 1894 613 l 1919 620 l 1945 630 l 1973 641 l
|
||||
2002 655 l 2034 671 l 2067 688 l 2102 708 l 2139 730 l
|
||||
2176 753 l 2213 776 l 2250 800 l 2285 822 l 2316 843 l
|
||||
2343 861 l 2365 876 l 2400 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2281 782 m 2400 900 l 2247 831 l 2264 807 l 2281 782 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2210 2613 m 2359 2688 l 2193 2671 l 2406 2733 l 2423 2675 l cp
|
||||
clip
|
||||
n 900 1200 m 901 1202 l 902 1207 l 905 1217 l 909 1231 l 915 1252 l
|
||||
923 1278 l 932 1310 l 944 1348 l 957 1391 l 971 1438 l
|
||||
987 1488 l 1004 1540 l 1021 1592 l 1039 1645 l 1057 1697 l
|
||||
1075 1748 l 1093 1796 l 1111 1843 l 1128 1887 l 1146 1929 l
|
||||
1163 1968 l 1181 2005 l 1198 2039 l 1216 2071 l 1233 2101 l
|
||||
1251 2130 l 1270 2156 l 1289 2181 l 1309 2205 l 1329 2228 l
|
||||
1350 2250 l 1372 2271 l 1395 2291 l 1419 2311 l 1444 2330 l
|
||||
1470 2349 l 1499 2367 l 1529 2384 l 1561 2402 l 1595 2419 l
|
||||
1632 2437 l 1671 2454 l 1713 2472 l 1757 2489 l 1804 2507 l
|
||||
1852 2525 l 1903 2543 l 1955 2561 l 2008 2579 l 2060 2596 l
|
||||
2112 2613 l 2162 2629 l 2209 2643 l 2252 2656 l 2290 2668 l
|
||||
2322 2677 l 2348 2685 l 2369 2691 l 2400 2700 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 2210 2613 m 2359 2688 l 2193 2671 l 2201 2642 l 2210 2613 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
4035 2670 m 4200 2700 l 4035 2730 l 4215 2730 l 4215 2670 l cp
|
||||
clip
|
||||
n 3000 2700 m 4200 2700 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4035 2670 m 4200 2700 l 4035 2730 l 4035 2700 l 4035 2670 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4176 1309 m 4260 1164 l 4232 1330 l 4308 1121 l 4252 1101 l cp
|
||||
clip
|
||||
n 2925 2475 m 2927 2474 l 2931 2473 l 2940 2469 l 2952 2464 l 2970 2457 l
|
||||
2993 2448 l 3022 2437 l 3055 2424 l 3093 2408 l 3134 2391 l
|
||||
3177 2373 l 3223 2354 l 3269 2335 l 3315 2314 l 3361 2294 l
|
||||
3406 2274 l 3448 2255 l 3489 2235 l 3528 2216 l 3565 2197 l
|
||||
3599 2179 l 3632 2161 l 3662 2144 l 3690 2126 l 3717 2109 l
|
||||
3742 2091 l 3766 2074 l 3788 2056 l 3810 2038 l 3830 2019 l
|
||||
3850 2000 l 3870 1979 l 3890 1957 l 3909 1935 l 3927 1911 l
|
||||
3945 1886 l 3963 1860 l 3980 1832 l 3997 1802 l 4015 1770 l
|
||||
4032 1736 l 4050 1699 l 4068 1661 l 4086 1620 l 4104 1577 l
|
||||
4123 1533 l 4141 1487 l 4159 1441 l 4177 1395 l 4194 1350 l
|
||||
4210 1307 l 4225 1267 l 4238 1231 l 4249 1200 l 4258 1175 l
|
||||
4264 1155 l 4275 1125 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 4176 1309 m 4260 1164 l 4232 1330 l 4204 1319 l 4176 1309 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
4099 1238 m 4243 1152 l 4138 1283 l 4306 1138 l 4267 1092 l cp
|
||||
clip
|
||||
n 2925 2475 m 2927 2473 l 2930 2469 l 2937 2462 l 2947 2451 l 2961 2436 l
|
||||
2979 2416 l 3001 2392 l 3026 2364 l 3055 2332 l 3086 2298 l
|
||||
3118 2263 l 3152 2226 l 3186 2189 l 3219 2152 l 3252 2117 l
|
||||
3284 2082 l 3315 2049 l 3344 2017 l 3372 1987 l 3399 1958 l
|
||||
3424 1931 l 3449 1906 l 3472 1881 l 3495 1858 l 3516 1835 l
|
||||
3538 1813 l 3559 1792 l 3579 1771 l 3600 1750 l 3621 1729 l
|
||||
3641 1709 l 3662 1688 l 3684 1668 l 3705 1647 l 3728 1625 l
|
||||
3751 1603 l 3776 1580 l 3801 1556 l 3828 1531 l 3856 1505 l
|
||||
3885 1478 l 3916 1450 l 3948 1421 l 3981 1391 l 4014 1360 l
|
||||
4048 1330 l 4082 1299 l 4114 1270 l 4145 1242 l 4174 1216 l
|
||||
4199 1193 l 4221 1173 l 4239 1157 l 4253 1144 l 4275 1125 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 4099 1238 m 4243 1152 l 4138 1283 l 4118 1260 l 4099 1238 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
5907 1250 m 6045 1154 l 5950 1293 l 6107 1136 l 6064 1093 l cp
|
||||
clip
|
||||
n 4725 2475 m 6075 1125 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 5907 1250 m 6045 1154 l 5950 1293 l 5929 1271 l 5907 1250 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
5862 2604 m 6000 2700 l 5837 2659 l 6001 2734 l 6026 2679 l cp
|
||||
clip
|
||||
n 4800 2700 m 4803 2699 l 4809 2696 l 4819 2691 l 4835 2684 l 4857 2674 l
|
||||
4884 2662 l 4915 2648 l 4950 2633 l 4987 2617 l 5024 2602 l
|
||||
5061 2586 l 5098 2572 l 5133 2559 l 5166 2547 l 5198 2537 l
|
||||
5227 2527 l 5255 2520 l 5281 2513 l 5306 2508 l 5330 2505 l
|
||||
5354 2502 l 5377 2500 l 5400 2500 l 5423 2500 l 5446 2502 l
|
||||
5470 2505 l 5494 2508 l 5519 2513 l 5545 2520 l 5573 2527 l
|
||||
5602 2537 l 5634 2547 l 5667 2559 l 5702 2572 l 5739 2586 l
|
||||
5776 2602 l 5813 2617 l 5850 2633 l 5885 2648 l 5916 2662 l
|
||||
5943 2674 l 5965 2684 l 6000 2700 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5862 2604 m 6000 2700 l 5837 2659 l 5850 2631 l 5862 2604 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
5837 2741 m 6000 2700 l 5862 2796 l 6026 2721 l 6001 2666 l cp
|
||||
clip
|
||||
n 4800 2700 m 4803 2701 l 4809 2704 l 4819 2709 l 4835 2716 l 4857 2726 l
|
||||
4884 2738 l 4915 2752 l 4950 2767 l 4987 2783 l 5024 2798 l
|
||||
5061 2814 l 5098 2828 l 5133 2841 l 5166 2853 l 5198 2863 l
|
||||
5227 2873 l 5255 2880 l 5281 2887 l 5306 2892 l 5330 2895 l
|
||||
5354 2898 l 5377 2900 l 5400 2900 l 5423 2900 l 5446 2898 l
|
||||
5470 2895 l 5494 2892 l 5519 2887 l 5545 2880 l 5573 2873 l
|
||||
5602 2863 l 5634 2853 l 5667 2841 l 5702 2828 l 5739 2814 l
|
||||
5776 2798 l 5813 2783 l 5850 2767 l 5885 2752 l 5916 2738 l
|
||||
5943 2726 l 5965 2716 l 6000 2700 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5837 2741 m 6000 2700 l 5862 2796 l 5850 2769 l 5837 2741 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
6330 3135 m 6300 3300 l 6270 3135 l 6270 3315 l 6330 3315 l cp
|
||||
clip
|
||||
n 6300 3000 m 6300 3300 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 6330 3135 m 6300 3300 l 6270 3135 l 6300 3135 l 6330 3135 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
7674 1182 m 7836 1142 l 7698 1236 l 7901 1146 l 7877 1091 l cp
|
||||
clip
|
||||
n 6525 2475 m 6526 2473 l 6527 2468 l 6531 2460 l 6536 2447 l 6542 2428 l
|
||||
6551 2405 l 6562 2376 l 6575 2343 l 6590 2306 l 6606 2266 l
|
||||
6623 2225 l 6641 2182 l 6659 2138 l 6677 2096 l 6696 2054 l
|
||||
6714 2014 l 6732 1976 l 6750 1939 l 6768 1905 l 6785 1873 l
|
||||
6803 1843 l 6820 1814 l 6837 1787 l 6855 1762 l 6873 1738 l
|
||||
6891 1714 l 6910 1692 l 6930 1671 l 6950 1650 l 6970 1631 l
|
||||
6990 1612 l 7012 1594 l 7034 1575 l 7058 1557 l 7083 1539 l
|
||||
7110 1520 l 7138 1502 l 7168 1482 l 7201 1463 l 7235 1443 l
|
||||
7272 1422 l 7311 1401 l 7352 1379 l 7394 1357 l 7439 1334 l
|
||||
7485 1311 l 7531 1288 l 7577 1265 l 7623 1243 l 7666 1222 l
|
||||
7707 1203 l 7745 1185 l 7778 1170 l 7807 1156 l 7830 1146 l
|
||||
7848 1137 l 7875 1125 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 7674 1182 m 7836 1142 l 7698 1236 l 7686 1209 l 7674 1182 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
7840 1378 m 7933 1238 l 7895 1402 l 7983 1198 l 7928 1174 l cp
|
||||
clip
|
||||
n 6525 2475 m 6527 2474 l 6531 2473 l 6540 2470 l 6552 2466 l 6570 2461 l
|
||||
6594 2453 l 6622 2444 l 6655 2433 l 6693 2420 l 6734 2406 l
|
||||
6778 2391 l 6824 2375 l 6871 2359 l 6917 2342 l 6963 2325 l
|
||||
7008 2308 l 7051 2291 l 7093 2274 l 7132 2258 l 7169 2242 l
|
||||
7204 2226 l 7237 2210 l 7268 2195 l 7297 2179 l 7324 2163 l
|
||||
7350 2147 l 7375 2131 l 7398 2115 l 7420 2098 l 7442 2080 l
|
||||
7463 2063 l 7484 2043 l 7505 2022 l 7525 2000 l 7545 1978 l
|
||||
7564 1953 l 7584 1928 l 7603 1900 l 7622 1871 l 7642 1840 l
|
||||
7662 1806 l 7682 1770 l 7703 1732 l 7724 1692 l 7745 1650 l
|
||||
7767 1606 l 7789 1560 l 7811 1514 l 7832 1468 l 7852 1424 l
|
||||
7871 1381 l 7889 1341 l 7905 1306 l 7918 1275 l 7929 1250 l
|
||||
7937 1230 l 7950 1200 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 7840 1378 m 7933 1238 l 7895 1402 l 7868 1390 l 7840 1378 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
7.500 slw
|
||||
gs clippath
|
||||
7704 1320 m 7844 1228 l 7745 1364 l 7907 1212 l 7865 1168 l cp
|
||||
clip
|
||||
n 6525 2475 m 7875 1200 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
15.000 slw
|
||||
n 7704 1320 m 7844 1228 l 7745 1364 l 7725 1342 l 7704 1320 l cp gs 0.00 setgray ef gr col0 s
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
817 960 m
|
||||
gs 1 -1 sc (1) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5400 825 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5325 1200 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5325 442 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3600 825 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3525 1200 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3525 442 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
2625 945 m
|
||||
gs 1 -1 sc (2) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
4425 945 m
|
||||
gs 1 -1 sc (3) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
6225 945 m
|
||||
gs 1 -1 sc (4) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7200 825 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7125 1200 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7125 442 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
8025 945 m
|
||||
gs 1 -1 sc (5) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
8775 750 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
9525 975 m
|
||||
gs 1 -1 sc (6) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
10275 750 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
11025 975 m
|
||||
gs 1 -1 sc (7) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
11700 825 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
12525 975 m
|
||||
gs 1 -1 sc (8) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
11625 1800 m
|
||||
gs 1 -1 sc (Pattern "????..X") col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
1725 1125 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
1800 525 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
1425 2175 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
2625 2775 m
|
||||
gs 1 -1 sc (9) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
4425 2775 m
|
||||
gs 1 -1 sc (A) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3525 2625 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
6225 2775 m
|
||||
gs 1 -1 sc (B) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5325 2400 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5400 2775 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5325 3600 m
|
||||
gs 1 -1 sc (Pattern "XXo") col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3675 1950 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
5100 1800 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
3300 1800 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
6525 1800 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7275 2025 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Bold ff 285.00 scf sf
|
||||
7050 1800 m
|
||||
gs 1 -1 sc (.) col0 sh gr
|
||||
$F2psEnd
|
||||
rs
|
165
gnugo/doc/dfa2.fig
Normal file
|
@ -0,0 +1,165 @@
|
|||
#FIG 3.2
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
50.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 900 900 300 300 900 900 1200 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 6300 900 300 300 6300 900 6600 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 4500 900 300 300 4500 900 4800 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2700 900 300 300 2700 900 3000 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 8100 900 300 300 8100 900 8400 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 9600 900 300 300 9600 900 9900 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 11100 900 300 300 11100 900 11400 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 12600 900 300 300 12600 900 12900 900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2700 2700 300 300 2700 2700 3000 2700
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 4500 2700 300 300 4500 2700 4800 2700
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 6300 2700 300 300 6300 2700 6600 2700
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 900 6000 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 900 5400 1500 6000 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 892 5400 292 6000 892
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
3000 900 4200 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
3000 900 3600 1500 4200 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
3000 892 3600 292 4200 892
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
1200 900 1800 1350 2400 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
225 900 600 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
6600 900 7800 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
6600 900 7200 1500 7800 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
6600 892 7200 292 7800 892
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
8400 900 9300 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
9900 900 10800 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
11400 900 12300 900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
12600 1200 12600 1500
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
1200 900 1800 450 2400 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
900 1200 1200 2400 2400 2700
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
3000 2700 4200 2700
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
2925 2475 3975 2100 4275 1125
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
2925 2475 3600 1725 4275 1125
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 2.00 60.00 165.00
|
||||
4725 2475 6075 1125
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 2700 5400 2400 6000 2700
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 165.00
|
||||
4800 2700 5400 3000 6000 2700
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 165.00
|
||||
6300 3000 6300 3300
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
6525 2475 6825 1575 7875 1125
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 2.00 60.00 165.00
|
||||
6525 2475 7575 2175 7950 1200
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 2.00 60.00 165.00
|
||||
6525 2475 7875 1200
|
||||
0.000 0.000
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 817 960 1\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 5400 825 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 5325 1200 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 5325 442 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 3600 825 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 3525 1200 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 3525 442 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 2625 945 2\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 4425 945 3\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 6225 945 4\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 7200 825 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 7125 1200 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 7125 442 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 8025 945 5\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 8775 750 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 9525 975 6\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 10275 750 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 11025 975 7\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 11700 825 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 12525 975 8\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 2205 11625 1800 Pattern "????..X"\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 1725 1125 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 1800 525 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 1425 2175 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 135 2625 2775 9\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 4425 2775 A\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 3525 2625 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 195 6225 2775 B\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 5325 2400 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 5400 2775 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 1860 5325 3600 Pattern "XXo"\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 3675 1950 .\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 5100 1800 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 3300 1800 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 210 6525 1800 X\001
|
||||
4 0 0 100 0 2 19 0.0000 4 195 225 7275 2025 O\001
|
||||
4 0 0 100 0 2 19 0.0000 4 45 75 7050 1800 .\001
|
BIN
gnugo/doc/dfa2.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
gnugo/doc/dfa2.pdf
Normal file
BIN
gnugo/doc/dfa2.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
894
gnugo/doc/dragon.texi
Normal file
|
@ -0,0 +1,894 @@
|
|||
@menu
|
||||
* Worms:: Worms
|
||||
* Amalgamation:: How two Worms are amalgamated.
|
||||
* Connection:: Connections.
|
||||
* Half Eyes:: Half Eyes and False Eyes.
|
||||
* Dragons:: Union of WORMS.
|
||||
* Dragons in Color:: Colored display of DRAGONS.
|
||||
@end menu
|
||||
|
||||
Before considering its move, GNU Go collects some data in several
|
||||
arrays. Two of these arrays, called @code{worm} and @code{dragon}, are
|
||||
discussed in this document. Others are discussed in @xref{Eyes}.
|
||||
|
||||
This information is intended to help evaluate the connectedness, eye
|
||||
shape, escape potential and life status of each group.
|
||||
|
||||
Later routines called by @code{genmove()} will then have access to this
|
||||
information. This document attempts to explain the philosophy and
|
||||
algorithms of this preliminary analysis, which is carried out by the
|
||||
two routines @code{make_worm()} and @code{make_dragon()} in
|
||||
@file{dragon.c}.
|
||||
|
||||
@cindex dragon
|
||||
@cindex worm
|
||||
@cindex string
|
||||
A @dfn{worm} is a maximal set of stones on the board which are connected
|
||||
along the horizontal and vertical lines, and are of the same color.
|
||||
We often say @dfn{string} instead of worm.
|
||||
|
||||
A @dfn{dragon} is a union of strings of the same color which will be
|
||||
treated as a unit. The dragons are generated anew at each move. If two strings
|
||||
are in the dragon, it is the computer's working hypothesis that they will live
|
||||
or die together and are effectively connected.
|
||||
|
||||
The purpose of the dragon code is to allow the computer to formulate
|
||||
meaningful statements about life and death. To give one example,
|
||||
consider the following situation:
|
||||
@example
|
||||
|
||||
OOOOO
|
||||
OOXXXOO
|
||||
OX...XO
|
||||
OXXXXXO
|
||||
OOOOO
|
||||
|
||||
@end example
|
||||
|
||||
The X's here should be considered a single group with one three-space
|
||||
eye, but they consist of two separate strings. Thus we must
|
||||
amalgamate these two strings into a single dragon. Then the assertion
|
||||
makes sense, that playing at the center will kill or save the dragon,
|
||||
and is a vital point for both players. It would be difficult to
|
||||
formulate this statement if the X's are not perceived as a unit.
|
||||
|
||||
The present implementation of the dragon code involves simplifying
|
||||
assumptions which can be refined in later implementations.
|
||||
|
||||
@node Worms
|
||||
@section Worms
|
||||
@cindex worm
|
||||
|
||||
The array @code{struct worm_data worm[MAX_BOARD]} collects information about
|
||||
the worms. We will give definitions of the various fields. Each field has
|
||||
constant value at each vertex of the worm. We will define each field.
|
||||
|
||||
@example
|
||||
|
||||
struct worm_data @{
|
||||
int color;
|
||||
int size;
|
||||
float effective_size;
|
||||
int origin;
|
||||
int liberties;
|
||||
int liberties2;
|
||||
int liberties3;
|
||||
int liberties4;
|
||||
int lunch;
|
||||
int cutstone;
|
||||
int cutstone2;
|
||||
int genus;
|
||||
int inessential;
|
||||
int invincible;
|
||||
int unconditional_status;
|
||||
int attack_points[MAX_TACTICAL_POINTS];
|
||||
int attack_codes[MAX_TACTICAL_POINTS];
|
||||
int defense_points[MAX_TACTICAL_POINTS];
|
||||
int defend_codes[MAX_TACTICAL_POINTS];
|
||||
int attack_threat_points[MAX_TACTICAL_POINTS];
|
||||
int attack_threat_codes[MAX_TACTICAL_POINTS];
|
||||
int defense_threat_points[MAX_TACTICAL_POINTS];
|
||||
int defense_threat_codes[MAX_TACTICAL_POINTS];
|
||||
@};
|
||||
@end example
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{color}
|
||||
@quotation
|
||||
The color of the worm.
|
||||
@end quotation
|
||||
@item @code{size}
|
||||
@quotation
|
||||
This field contains the cardinality of the worm.
|
||||
@end quotation
|
||||
@item @code{effective_size}
|
||||
@quotation
|
||||
@cindex effective size (worm)
|
||||
This is the number of stones in a worm plus the number
|
||||
of empty intersections that are at least as close to this worm as to any
|
||||
other worm. Intersections that are shared are counted with equal
|
||||
fractional values for each worm. This measures the direct territorial
|
||||
value of capturing a worm. @dfn{effective_size} is a floating point number.
|
||||
Only intersections at a distance of 4 or less are counted.
|
||||
@end quotation
|
||||
@item @code{origin}
|
||||
@quotation
|
||||
@cindex origin (worm)
|
||||
Each worm has a distinguished member, called its @dfn{origin}.
|
||||
The purpose of this field is to make it easy to determine when two vertices
|
||||
lie in the same worm: we compare their origin. Also if we wish to perform some
|
||||
test once for each worm, we simply perform it at the origin and ignore the
|
||||
other vertices. The origin is characterized by the test:
|
||||
@example
|
||||
worm[pos].origin == pos.
|
||||
@end example
|
||||
@end quotation
|
||||
@item @code{liberties}
|
||||
@item @code{liberties2}
|
||||
@item @code{liberties3}
|
||||
@item @code{liberties4}
|
||||
@quotation
|
||||
@cindex liberties (worm)
|
||||
@cindex liberties, higher order (worm)
|
||||
For a nonempty worm the field liberties is the number of liberties of the
|
||||
string. This is supplemented by @code{LIBERTIES2}, @code{LIBERTIES3} and
|
||||
@code{LIBERTIES4}, which are the number of second order, third order, and
|
||||
fourth order liberties, respectively.
|
||||
The definition of liberties of order >1 is adapted to the
|
||||
problem of detecting the shape of the surrounding
|
||||
empty space. In particular we want to be able to see if a group
|
||||
is loosely surrounded. A @dfn{liberty of order n} is an empty
|
||||
vertex which may be connected to the string by placing n
|
||||
stones of the same color on the board, but no fewer. The
|
||||
path of connection may pass through an intervening group
|
||||
of the same color. The stones placed at distance >1 may
|
||||
not touch a group of the opposite color. Connections through
|
||||
ko are not permitted. Thus in the following configuration:
|
||||
@example
|
||||
|
||||
.XX... We label the .XX.4.
|
||||
XO.... liberties of XO1234
|
||||
XO.... order < 5 of XO1234
|
||||
...... the O group: .12.4.
|
||||
.X.X.. .X.X..
|
||||
|
||||
@end example
|
||||
|
||||
The convention that liberties of order >1 may not touch a
|
||||
group of the opposite color means that knight's moves and
|
||||
one space jumps are perceived as impenetrable barriers.
|
||||
This is useful in determining when the string is becoming
|
||||
surrounded.
|
||||
|
||||
The path may also not pass through a liberty at distance
|
||||
1 if that liberty is flanked by two stones of the opposing color. This
|
||||
reflects the fact that the O stone is blocked from expansion to the
|
||||
left by the two X stones in the following situation:
|
||||
@example
|
||||
|
||||
X.
|
||||
.O
|
||||
X.
|
||||
|
||||
@end example
|
||||
@cindex distance from liberty to dragon
|
||||
We say that n is the @dfn{distance} of the liberty of order n from the dragon.
|
||||
@end quotation
|
||||
@item @code{lunch}
|
||||
@quotation
|
||||
@cindex lunch (worm)
|
||||
If nonzero, @code{lunch} points to a boundary worm which can be easily
|
||||
captured. (It does not matter whether or not the string can be
|
||||
defended.)
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
We have two distinct notions of cutting stone, which we keep track
|
||||
of in the separate fields @code{worm.cutstone} and @code{worm.cutstone2}.
|
||||
We use currently use both concepts in parallel.
|
||||
|
||||
@itemize
|
||||
@item @code{cutstone}
|
||||
@quotation
|
||||
@cindex cutting stone
|
||||
This field is equal to 2 for cutting stones, 1 for potential cutting
|
||||
stones. Otherwise it is zero. Definitions for this field: a @dfn{cutting
|
||||
stone} is one adjacent to two enemy strings, which do not have a liberty in
|
||||
common. The most common type of cutting string is in this situation:
|
||||
|
||||
@example
|
||||
|
||||
XO
|
||||
OX
|
||||
|
||||
@end example
|
||||
@cindex cutting stone, potential
|
||||
@cindex potential cutting stone
|
||||
|
||||
A @dfn{potential cutting stone} is adjacent to two enemy strings which do
|
||||
share a liberty. For example, X in:
|
||||
|
||||
@example
|
||||
|
||||
XO
|
||||
O.
|
||||
|
||||
@end example
|
||||
|
||||
For cutting strings we set @code{worm[].cutstone=2}. For
|
||||
potential cutting strings we set @code{worm[].cutstone=1}.
|
||||
@end quotation
|
||||
@item @code{cutstone2}
|
||||
@quotation
|
||||
Cutting points are identified by the patterns in the connections
|
||||
database. Proper cuts are handled by the fact that attacking and
|
||||
defending moves also count as moves cutting or connecting the
|
||||
surrounding dragons. The @code{cutstone2} field is set during
|
||||
@code{find_cuts()}, called from @code{make_domains()}.
|
||||
@end quotation
|
||||
@findex find_cuts
|
||||
@findex make_domains
|
||||
@item @code{genus}
|
||||
@quotation
|
||||
@cindex genus (worm)
|
||||
There are two separate notions of @dfn{genus} for worms and
|
||||
dragons. The dragon notion is more important, so
|
||||
@code{dragon[pos].genus} is a far more useful field than
|
||||
@code{worm[pos].genus}. Both fields are intended as approximations
|
||||
to the number of eyes. The @dfn{genus} of a string is the number
|
||||
of connected components of its complement, minus one. It is
|
||||
an approximation to the number of eyes of the string.
|
||||
@end quotation
|
||||
@item @code{inessential}
|
||||
@quotation
|
||||
@cindex inessential string
|
||||
An @dfn{inessential} string is one which meets a
|
||||
criterion designed to guarantee that it has no life
|
||||
potential unless a particular surrounding string of the
|
||||
opposite color can be killed. More precisely an
|
||||
@dfn{inessential string} is a string S of genus zero,
|
||||
not adjacent to any opponent string which can be easily
|
||||
captured, and which has no edge liberties or second
|
||||
order liberties, and which satisfies the following
|
||||
further property: If the string is removed from the
|
||||
board, then the remaining cavity only borders worms of the
|
||||
opposite color.
|
||||
|
||||
@end quotation
|
||||
@findex unconditional_life
|
||||
@item @code{invincible}
|
||||
@quotation
|
||||
@cindex invincible worm
|
||||
An @dfn{invincible} worm is one which GNU Go thinks
|
||||
cannot be captured. Invincible worms are computed by the
|
||||
function @code{unconditional_life()} which tries to
|
||||
find those worms of the given color that can never be captured,
|
||||
even if the opponent is allowed an arbitrary number of consecutive
|
||||
moves.
|
||||
@end quotation
|
||||
@item unconditional_status
|
||||
@quotation
|
||||
Unconditional status is also set by the function
|
||||
@code{unconditional_life}. This is set @code{ALIVE} for stones which are
|
||||
invincible. Stones which can not be turned invincible even if the
|
||||
defender is allowed an arbitrary number of consecutive moves are given
|
||||
an unconditional status of @code{DEAD}. Empty points where the opponent
|
||||
cannot form an invincible worm are called unconditional territory. The
|
||||
unconditional status is set to @code{WHITE_TERRITORY} or
|
||||
@code{BLACK_TERRITORY} depending on who owns the territory. Finally, if
|
||||
a stone can be captured but is adjacent to unconditional territory of
|
||||
its own color, it is also given the unconditional status @code{ALIVE}.
|
||||
In all other cases the unconditional status is @code{UNKNOWN}.
|
||||
|
||||
To make sense of these definitions it is important to notice that any
|
||||
stone which is alive in the ordinary sense (even if only in seki) can be
|
||||
transformed into an invincible group by some number of consecutive
|
||||
moves. Well, this is not entirely true because there is a rare class of
|
||||
seki groups not satisfying this condition. Exactly which these are is
|
||||
left as an exercise for the reader. Currently @code{unconditional_life},
|
||||
which strictly follows the definitions above, calls such seki groups
|
||||
unconditionally dead, which of course is a misfeature. It is possible to
|
||||
avoid this problem by making the algorithm slightly more complex, but
|
||||
this is left for a later revision.
|
||||
@end quotation
|
||||
@item @code{int attack_points[MAX_TACTICAL_POINTS]}
|
||||
@item @code{attack_codes[MAX_TACTICAL_POINTS]}
|
||||
@item @code{int defense_points[MAX_TACTICAL_POINTS];}
|
||||
@item @code{int defend_codes[MAX_TACTICAL_POINTS];}
|
||||
@quotation
|
||||
If the tactical reading code (@pxref{Tactical Reading}) finds that the
|
||||
worm can be attacked, @code{attack_points[0]} is a point of attack, and
|
||||
@code{attack_codes[0]} is the attack code, @code{WIN}, @code{KO_A} or
|
||||
@code{KO_B}. If multiple attacks are known, @code{attack_points[k]} and
|
||||
@code{attack_codes[k]} are used. Similarly with the defense
|
||||
codes and defense points.
|
||||
@end quotation
|
||||
@item @code{int attack_threat_points[MAX_TACTICAL_POINTS];}
|
||||
@item @code{int attack_threat_codes[MAX_TACTICAL_POINTS];}
|
||||
@item @code{int defense_threat_points[MAX_TACTICAL_POINTS];}
|
||||
@item @code{int defense_threat_codes[MAX_TACTICAL_POINTS];}
|
||||
@quotation
|
||||
These are points that threaten to attack or defend a worm.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
The function @code{makeworms()} will generate data for all worms.
|
||||
|
||||
@node Amalgamation
|
||||
@section Amalgamation
|
||||
@cindex amalgamation of worms into dragons
|
||||
|
||||
A dragon, we have said, is a group of stones which are treated as a
|
||||
unit. It is a working hypothesis that these stones will live or die
|
||||
together. Thus the program will not expect to disconnect an opponent's
|
||||
strings if they have been amalgamated into a single dragon.
|
||||
|
||||
The function @code{make_dragons()} will amalgamate worms into dragons by
|
||||
maintaining separate arrays @code{worm[]} and @code{dragon[]} containing
|
||||
similar data. Each dragon is a union of worms. Just as the data maintained in
|
||||
@code{worm[]} is constant on each worm, the data in
|
||||
@code{dragon[]} is constant on each dragon.
|
||||
|
||||
Amalgamation of worms in GNU Go proceeds as follows.
|
||||
First we amalgamate all boundary components of an eyeshape. Thus in
|
||||
the following example:
|
||||
|
||||
@example
|
||||
|
||||
.OOOO. The four X strings are amalgamated into a
|
||||
OOXXO. single dragon because they are the boundary
|
||||
OX..XO components of a blackbordered cave. The
|
||||
OX..XO cave could contain an inessential string
|
||||
OOXXO. with no effect on this amalgamation.
|
||||
XXX...
|
||||
|
||||
@end example
|
||||
@findex dragon_eye
|
||||
|
||||
The code for this type of amalgamation is in the routine
|
||||
@code{dragon_eye()}, discussed further in EYES.
|
||||
|
||||
Next, we amalgamate strings which seem uncuttable. We amalgamate dragons
|
||||
which either share two or more common liberties, or share one liberty
|
||||
into the which the opponent cannot play without being
|
||||
captured. (ignores ko rule).
|
||||
|
||||
@example
|
||||
|
||||
X. X.X XXXX.XXX X.O
|
||||
.X X.X X......X X.X
|
||||
XXXXXX.X OXX
|
||||
|
||||
@end example
|
||||
|
||||
A database of connection patterns may be found in @file{patterns/conn.db}.
|
||||
|
||||
@node Connection
|
||||
@section Connection
|
||||
@cindex connections
|
||||
|
||||
The fields @code{black_eye.cut} and @code{white_eye.cut} are set where the
|
||||
opponent can cut, and this is done by the B (break) class patterns in
|
||||
@file{conn.db}. There are two important uses for this field, which can be
|
||||
accessed by the autohelper functions @code{xcut()} and @code{ocut()}. The
|
||||
first use is to stop amalgamation in positions like
|
||||
|
||||
@example
|
||||
|
||||
..X..
|
||||
OO*OO
|
||||
X.O.X
|
||||
..O..
|
||||
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
where X can play at * to cut off either branch. What happens
|
||||
here is that first connection pattern CB1 finds the double cut
|
||||
and marks * as a cutting point. Later the C (connection) class
|
||||
patterns in conn.db are searched to find secure connections
|
||||
over which to amalgamate dragons. Normally a diagonal
|
||||
connection would be deemed secure and amalgamated by connection
|
||||
pattern CC101, but there is a constraint requiring that neither of
|
||||
the empty intersections is a cutting point.
|
||||
@findex amalgamate_most_valuable_helper
|
||||
|
||||
A weakness with this scheme is that X can only cut one connection, not
|
||||
both, so we should be allowed to amalgamate over one of the connections.
|
||||
This is performed by connection pattern CC401, which with the help of
|
||||
@code{amalgamate_most_valuable_helper()} decides which connection to
|
||||
prefer.
|
||||
|
||||
The other use is to simplify making alternative connection patterns to
|
||||
the solid connection. Positions where the diag_miai helper thinks a
|
||||
connection is necessary are marked as cutting points by connection
|
||||
pattern 12. Thus we can write a connection pattern like @code{CC6}:
|
||||
|
||||
@example
|
||||
|
||||
?xxx? straight extension to connect
|
||||
XOO*?
|
||||
O...?
|
||||
|
||||
:8,C,NULL
|
||||
|
||||
?xxx?
|
||||
XOOb?
|
||||
Oa..?
|
||||
|
||||
;xcut(a) && odefend_against(b,a)
|
||||
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
where we verify that a move at @code{*} would stop the enemy from safely
|
||||
playing at the cutting point, thus defending against the cut.
|
||||
|
||||
@node Half Eyes
|
||||
@section Half Eyes and False Eyes
|
||||
@cindex half eye
|
||||
@cindex false eye
|
||||
|
||||
A @dfn{half eye} is a place where, if the defender plays first, an eye
|
||||
will materialize, but where if the attacker plays first, no eye will
|
||||
materialize. A @dfn{false eye} is a vertex which is surrounded by a
|
||||
dragon yet is not an eye. Here is a half eye:
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
XXXXX
|
||||
OO..X
|
||||
O.O.X
|
||||
OOXXX
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Here is a false eye:
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
XXXXX
|
||||
XOO.X
|
||||
O.O.X
|
||||
OOXXX
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
The "topological" algorithm for determining half and false eyes
|
||||
is described elsewhere (@pxref{Eye Topology}).
|
||||
|
||||
The half eye data is collected in the dragon array. Before this is done,
|
||||
however, an auxiliary array called half_eye_data is filled with
|
||||
information. The field @code{type} is 0, or else @code{HALF_EYE} or
|
||||
@code{FALSE_EYE} depending on which type is found; the fields
|
||||
@code{attack_point[]} point to up to 4 points to attack
|
||||
the half eye, and similarly @code{defense_point[]} gives points
|
||||
to defend the half eye.
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
struct half_eye_data half_eye[MAX_BOARD];
|
||||
|
||||
struct half_eye_data @{
|
||||
float value; /* Topological eye value */
|
||||
int type; /* HALF_EYE or FALSE_EYE */
|
||||
int num_attacks; /* Number of attacking points */
|
||||
int attack_point[4]; /* The moves to attack a topological halfeye */
|
||||
int num_defends; /* Number of defending points */
|
||||
int defense_point[4]; /* The moves to defend a topological halfeye */
|
||||
@};
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
The array @code{struct half_eye_data half_eye[MAX_BOARD]}
|
||||
contains information about half and false eyes. If the type is
|
||||
@code{HALF_EYE} then up to four moves are recorded which can
|
||||
either attack or defend the eye. In rare cases the attack points
|
||||
could be different from the defense points.
|
||||
|
||||
@node Dragons
|
||||
@section Dragons
|
||||
@cindex dragons
|
||||
|
||||
The array @code{struct dragon_data dragon[MAX_BOARD]}
|
||||
collects information about the dragons. We will give definitions of the
|
||||
various fields. Each field has constant value at each vertex of the
|
||||
dragon. (Fields will be discussed below.)
|
||||
|
||||
@example
|
||||
|
||||
struct dragon_data @{
|
||||
int color; /* its color */
|
||||
int id; /* the index into the dragon2 array */
|
||||
int origin; /* the origin of the dragon. Two vertices */
|
||||
/* are in the same dragon iff they have */
|
||||
/* same origin. */
|
||||
int size; /* size of the dragon */
|
||||
float effective_size; /* stones and surrounding spaces */
|
||||
int crude_status; /* (ALIVE, DEAD, UNKNOWN, CRITICAL)*/
|
||||
int status; /* best trusted status */
|
||||
@};
|
||||
|
||||
extern struct dragon_data dragon[BOARDMAX];
|
||||
|
||||
@end example
|
||||
|
||||
Other fields attached to the dragon are contained in the @code{dragon_data2}
|
||||
struct array. (Fields will be discussed below.)
|
||||
|
||||
@example
|
||||
|
||||
struct dragon_data2 @{
|
||||
int origin;
|
||||
int adjacent[MAX_NEIGHBOR_DRAGONS];
|
||||
int neighbors;
|
||||
int hostile_neighbors;
|
||||
int moyo_size;
|
||||
float moyo_territorial_value;
|
||||
int safety;
|
||||
float weakness;
|
||||
float weakness_pre_owl;
|
||||
int escape_route;
|
||||
struct eyevalue genus;
|
||||
int heye;
|
||||
int lunch;
|
||||
int surround_status;
|
||||
int surround_size;
|
||||
int semeais;
|
||||
int semeai_margin_of_safety;
|
||||
int semeai_defense_point;
|
||||
int semeai_defense_certain;
|
||||
int semeai_attack_point;
|
||||
int semeai_attack_certain;
|
||||
int owl_threat_status;
|
||||
int owl_status;
|
||||
int owl_attack_point;
|
||||
int owl_attack_code;
|
||||
int owl_attack_certain;
|
||||
int owl_second_attack_point;
|
||||
int owl_defense_point;
|
||||
int owl_defense_code;
|
||||
int owl_defense_certain;
|
||||
int owl_second_defense_point;
|
||||
int owl_attack_kworm;
|
||||
int owl_defense_kworm;
|
||||
@};
|
||||
|
||||
extern struct dragon_data2 *dragon2;
|
||||
|
||||
@end example
|
||||
|
||||
The difference between the two arrays is that the @code{dragon} array
|
||||
is indexed by the board, and there is a copy of the dragon data
|
||||
at every stone in the dragon, while there is only one copy of
|
||||
the dragon2 data. The dragons are numbered, and the @code{id} field
|
||||
of the dragon is a key into the dragon2 array. Two macros DRAGON
|
||||
and DRAGON2 are provided for gaining access to the two arrays.
|
||||
|
||||
@example
|
||||
#define DRAGON2(pos) dragon2[dragon[pos].id]
|
||||
#define DRAGON(d) dragon[dragon2[d].origin]
|
||||
@end example
|
||||
|
||||
Thus if you know the position @code{pos} of a stone in the dragon
|
||||
you can access the dragon array directly, for example accessing the
|
||||
origin with @code{dragon[pos].origin}. However if you need a field
|
||||
from the dragon2 array, you can access it using the DRAGON2 macro,
|
||||
for example you can access its neighor dragons by
|
||||
|
||||
@example
|
||||
for (k = 0; k < DRAGON2(pos).neighbors; k++) @{
|
||||
int d = DRAGON2(pos).adjacent[k];
|
||||
int apos = dragon2[d].origin;
|
||||
do_something(apos);
|
||||
@}
|
||||
@end example
|
||||
|
||||
Similarly if you know the dragon number (which is @code{dragon[pos].id})
|
||||
then you can access the @code{dragon2} array directly, or you can
|
||||
access the @code{dragon} array using the DRAGON macro.
|
||||
|
||||
Here are the definitions of each field in the @code{dragon} arrray.
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{color}
|
||||
@quotation
|
||||
@cindex color (dragon)
|
||||
The color of the dragon.
|
||||
@end quotation
|
||||
@item @code{id}
|
||||
@cindex dragon number
|
||||
@quotation
|
||||
The dragon number, used as a key into the @code{dragon2} array.
|
||||
@end quotation
|
||||
@item origin
|
||||
@cindex dragon origin
|
||||
@quotation
|
||||
The origin of the dragon is a unique particular vertex
|
||||
of the dragon, useful for determining when two vertices belong
|
||||
to the same dragon. Before amalgamation the worm origins are
|
||||
copied to the dragon origins. Amalgamation of two dragons
|
||||
amounts to changing the origin of one.
|
||||
@end quotation
|
||||
@item size
|
||||
@cindex dragon size
|
||||
@quotation
|
||||
The number of stones in the dragon.
|
||||
@end quotation
|
||||
@item effective size
|
||||
@cindex effective size
|
||||
@quotation
|
||||
The sum of the effective sizes of the constituent worms.
|
||||
Remembering that vertices equidistant between two or more worms are
|
||||
counted fractionally in @code{worm.effective_size}, this equals the
|
||||
cardinality of the dragon plus the number of empty vertices which are
|
||||
nearer this dragon than any other.
|
||||
@end quotation
|
||||
@item crude_status
|
||||
@quotation
|
||||
(ALIVE, DEAD, UNKNOWN, CRITICAL). An early measure of the life
|
||||
potential of the dragon. It is computed before the owl code is
|
||||
run and is superceded by the status as soon as that becomes
|
||||
available.
|
||||
@end quotation
|
||||
@item status
|
||||
@cindex dragon status
|
||||
@quotation
|
||||
The dragon status is the best measure of the dragon's health.
|
||||
It is computed after the owl code is run, then revised again
|
||||
when the semeai code is run.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
Here are definitions of the fields in the @code{dragon2} array.
|
||||
|
||||
@itemize @bullet
|
||||
@item origin
|
||||
@quotation
|
||||
The origin field is duplicated here.
|
||||
@end quotation
|
||||
@item adjacent
|
||||
@item @code{adjacent[MAX_NEIGHBOR_DRAGONS]}
|
||||
@cindex neighbor dragons
|
||||
@cindex adjacent dragons
|
||||
@findex find_neighbor_dragons
|
||||
@quotation
|
||||
Dragons of either color near the given one are called @dfn{neighbors}.
|
||||
They are computed by the function @code{find_neighbor_dragons()}.
|
||||
The @code{dragon2.adjacent} array gives the dragon numbers of
|
||||
these dragons.
|
||||
@end quotation
|
||||
@item @code{neighbors}
|
||||
@cindex neighbor dragons
|
||||
@cindex adjacent dragons
|
||||
@findex find_neighbor_dragons
|
||||
@quotation
|
||||
Dragons of either color near the given one are called @dfn{neighbors}.
|
||||
They are computed by the function @code{find_neighbor_dragons()}.
|
||||
The @code{dragon2.adjacent} array gives the dragon numbers of
|
||||
these dragons.
|
||||
@end quotation
|
||||
@item neighbors
|
||||
@quotation
|
||||
The number of neighbor dragons.
|
||||
@end quotation
|
||||
@item hostile_neighbors
|
||||
@quotation
|
||||
The number of neighbor dragons of the opposite color.
|
||||
@end quotation
|
||||
@item moyo_size
|
||||
@item float moyo_territorial_value
|
||||
@findex compute_surrounding_moyo_sizes
|
||||
@quotation
|
||||
The function @code{compute_surrounding_moyo_sizes()} assigns
|
||||
a size and a territorial value to the moyo around
|
||||
each dragon (@pxref{Territory and Moyo}). This is the
|
||||
moyo size. They are recorded in these fields.
|
||||
@end quotation
|
||||
@item safety
|
||||
@cindex dragon safety
|
||||
@quotation
|
||||
The dragon safety can take on one of the values
|
||||
@itemize @minus
|
||||
@item TACTICALLY_DEAD - a dragon consisting of a single worm found dead by the
|
||||
reading code (very reliable)
|
||||
@item ALIVE - found alive by the owl or semeai code
|
||||
@item STRONGLY_ALIVE - alive without much question
|
||||
@item INVINCIBLE - definitively alive even after many tenukis
|
||||
@item ALIVE_IN_SEKI - determined to be seki by the semeai code
|
||||
@item CRITICAL - lives or dies depending on who moves first
|
||||
@item DEAD - found to be dead by the owl code
|
||||
@item INESSENTIAL - the dragon is unimportant (e.g. nakade stones) and dead
|
||||
@end itemize
|
||||
@end quotation
|
||||
@item weakness
|
||||
@item weakness_pre_owl
|
||||
@cindex dragon weakness
|
||||
@cindex weakness
|
||||
@quotation
|
||||
A floating point measure of the safety of a dragon. The dragon
|
||||
weakness is a number between 0. and 1., higher numbers for
|
||||
dragons in greater need of safety. The field @code{weakness_pre_owl}
|
||||
is a preliminary computation before the owl code is run.
|
||||
@end quotation
|
||||
@item escape_route
|
||||
@cindex dragon escape_route
|
||||
@cindex escape_route
|
||||
@findex compute_escape
|
||||
@quotation
|
||||
A measure of the dragon's potential to escape towards safety,
|
||||
in case it cannot make two eyes locally. Documentation
|
||||
may be found in @ref{Escape}.
|
||||
@end quotation
|
||||
@item struct eyevalue genus
|
||||
@cindex dragon genus
|
||||
@cindex genus
|
||||
@quotation
|
||||
The approximate number of eyes the dragon can be expected to
|
||||
get. Not guaranteed to be accurate. The eyevalue struct, which
|
||||
is used throughout the engine, is declared thus:
|
||||
@example
|
||||
|
||||
struct eyevalue @{
|
||||
unsigned char a; /* # of eyes if attacker plays twice */
|
||||
unsigned char b; /* # of eyes if attacker plays first */
|
||||
unsigned char c; /* # of eyes if defender plays first */
|
||||
unsigned char d; /* # of eyes if defender plays twice */
|
||||
@};
|
||||
|
||||
@end example
|
||||
@end quotation
|
||||
@item heye
|
||||
@quotation
|
||||
Location of a half eye attached to the dragon.
|
||||
@end quotation
|
||||
@item lunch
|
||||
@cindex dragon lunch
|
||||
@cindex lunch
|
||||
@quotation
|
||||
If nonzero, this is the location of a boundary string which
|
||||
can be captured. In contrast with worm lunches, a dragon
|
||||
lunch must be able to defend itself.
|
||||
@end quotation
|
||||
@item surround_status
|
||||
@item surround_size
|
||||
@cindex surround_status
|
||||
@cindex surround_size
|
||||
@cindex surround
|
||||
@quotation
|
||||
In estimating the safety of a dragon it is useful to know if
|
||||
it is @dfn{surrounded}. See @ref{Surrounded Dragons} and
|
||||
the comments in @file{surround.c} for more information about the
|
||||
algorithm. Used in computing the escape_route, and also callable
|
||||
from patterns (currently used by CB258).
|
||||
@end quotation
|
||||
@item semeais
|
||||
@item semeai_defense_point
|
||||
@item semeai_defense_certain
|
||||
@item semeai_attack_point
|
||||
@item semeai_attack_certain
|
||||
@cindex semeai
|
||||
@cindex semeai_defense_point
|
||||
@cindex semeai_defense_certain
|
||||
@cindex semeai_attack_point
|
||||
@cindex semeai_attack_certain
|
||||
@quotation
|
||||
If two dragons of opposite color both have the status CRITICAL
|
||||
or DEAD they are in a @dfn{semeai} (capturing race), and their
|
||||
status must be adjudicated by the function
|
||||
@code{owl_analyze_semeai()} in @file{owl.c}, which attempts to
|
||||
determine which is alive, which dead, or if the result is
|
||||
seki, and whether it is important who moves first. The
|
||||
function @file{new_semeai()} in @file{semeai.c} attempts
|
||||
to revise the statuses and to generate move reasons based
|
||||
on these results. The field @code{dragon2.semeais} is nonzero
|
||||
if the dragon is an element of a semeai, and equals the
|
||||
number of semeais (seldom more than one). The semeai defense
|
||||
and attack points are locations the defender or attacker
|
||||
must move to win the semeai. The field @code{semeai_margin_of_safety}
|
||||
is intended to indicate whether the semeai is close or not
|
||||
but currently this field is not maintained. The fields
|
||||
@code{semeai_defense_certain} and @code{semeai_attack_certain}
|
||||
indicate that the semeai code was able to finish analysis
|
||||
without running out of nodes.
|
||||
@end quotation
|
||||
@item owl_status
|
||||
@quotation
|
||||
This is a classification similar to @code{dragon.crude_status}, but
|
||||
based on the life and death reading in @file{owl.c}.
|
||||
The owl code (@pxref{The Owl Code}) is skipped for dragons
|
||||
which appear safe by certain heuristics. If the owl code
|
||||
is not run, the owl status is @code{UNCHECKED}.
|
||||
If @code{owl_attack()} determines that the dragon cannot be
|
||||
attacked, it is classified as @code{ALIVE}. Otherwise,
|
||||
@code{owl_defend()} is run, and if it can be defended it
|
||||
is classified as @code{CRITICAL}, and if not, as @code{DEAD}.
|
||||
@end quotation
|
||||
@item owl_attack_point
|
||||
@cindex owl_attack_point
|
||||
@quotation
|
||||
If the dragon can be attacked this is the point to attack the dragon.
|
||||
@end quotation
|
||||
@item owl_attack_code
|
||||
@cindex owl_attack_code
|
||||
@quotation
|
||||
The owl attack code, It can be WIN, KO_A, KO_B or 0 (@pxref{Return Codes}).
|
||||
@end quotation
|
||||
@item owl_attack_certain
|
||||
@cindex owl_attack_certain
|
||||
@quotation
|
||||
The owl reading is able to finish analyzing the attack
|
||||
without running out of nodes.
|
||||
@end quotation
|
||||
@item owl_second_attack_point
|
||||
@cindex owl_second_attack_point
|
||||
@quotation
|
||||
A second attack point.
|
||||
@end quotation
|
||||
@item owl_defense_point
|
||||
@cindex owl_defense_point
|
||||
@quotation
|
||||
If the dragon can be defended, this is the place to play.
|
||||
@end quotation
|
||||
@item owl_defense_code
|
||||
@cindex owl_defense_code
|
||||
@quotation
|
||||
The owl defense code, It can be WIN, KO_A, KO_B or 0 (@pxref{Return Codes}).
|
||||
@end quotation
|
||||
@item owl_defense_certain
|
||||
@cindex owl_defense_certain
|
||||
@quotation
|
||||
The owl code is able to finish analyzing the defense without
|
||||
running out of nodes.
|
||||
@end quotation
|
||||
@item owl_second_defense_point
|
||||
@cindex owl_second_defense_point
|
||||
@quotation
|
||||
A second owl defense point.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@node Dragons in Color
|
||||
@section Colored Dragon Display
|
||||
@cindex colored display
|
||||
|
||||
You can get a colored ASCII display of the board in which each dragon
|
||||
is assigned a different letter; and the different values of
|
||||
@code{dragon.status} values (@code{ALIVE}, @code{DEAD}, @code{UNKNOWN},
|
||||
@code{CRITICAL}) have different colors. This is very handy for debugging.
|
||||
A second diagram shows the values of @code{owl.status}. If this
|
||||
is @code{UNCHECKED} the dragon is displayed in White.
|
||||
|
||||
Save a game in sgf format using CGoban, or using the @option{-o} option with
|
||||
GNU Go itself.
|
||||
|
||||
Open an @command{xterm} or @command{rxvt} window. You may also use the Linux
|
||||
console. Using the console, you may need to use ``SHIFT-PAGE UP'' to see the
|
||||
first diagram. Xterm will only work if it is compiled with color support---if
|
||||
you do not see the colors try @command{rxvt}. Make the background color black
|
||||
and the foreground color white.
|
||||
|
||||
Execute:
|
||||
|
||||
@command{gnugo -l [filename] -L [movenum] -T} to get the colored display.
|
||||
|
||||
The color scheme: Green = @code{ALIVE}; Yellow = @code{UNKNOWN};
|
||||
Cyan = @code{DEAD} and Red = @code{CRITICAL}. Worms which have been
|
||||
amalgamated into the same dragon are labelled with the same letter.
|
||||
|
||||
Other useful colored displays may be obtained by using instead:
|
||||
|
||||
@itemize @bullet
|
||||
@item the option -E to display eye spaces (@pxref{Eyes}).
|
||||
@item the option -m 0x0180 to display territory, moyo and area
|
||||
(@pxref{Territory and Moyo}).
|
||||
@end itemize
|
||||
|
||||
The colored displays are documented elsewhere (@pxref{Colored Display}).
|
||||
|
1140
gnugo/doc/eyes.texi
Normal file
388
gnugo/doc/gnugo.6
Normal file
|
@ -0,0 +1,388 @@
|
|||
.\" Automatically generated by Pod::Man version 1.15
|
||||
.\" Fri Jan 13 15:56:30 2006
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
.de Sh \" Subsection heading
|
||||
.br
|
||||
.if t .Sp
|
||||
.ne 5
|
||||
.PP
|
||||
\fB\\$1\fR
|
||||
.PP
|
||||
..
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Ip \" List item
|
||||
.br
|
||||
.ie \\n(.$>=3 .ne \\$3
|
||||
.el .ne 3
|
||||
.IP "\\$1" \\$2
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
.ne \\$1
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. | will give a
|
||||
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used
|
||||
.\" to do unbreakable dashes and therefore won't be available. \*(C` and
|
||||
.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
|
||||
.tr \(*W-|\(bv\*(Tr
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr
|
||||
.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
|
||||
.\" index entries marked with X<> in POD. Of course, you'll have to process
|
||||
.\" the output yourself in some meaningful fashion.
|
||||
.if \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.\"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it
|
||||
.\" makes way too many mistakes in technical documents.
|
||||
.hy 0
|
||||
.if n .na
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
.bd B 3
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ======================================================================
|
||||
.\"
|
||||
.IX Title ".::gnugo 6"
|
||||
.TH .::gnugo 6 "3.7.7" "2006-01-10" "User Contributed Perl Documentation"
|
||||
.UC
|
||||
.SH "NAME"
|
||||
gnugo \- The \s-1GNU\s0 program to play the game of Go
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
\&\fBgnugo\fR
|
||||
[\fB\*(--boardsize <num\fR>]
|
||||
[\fB\*(--color <color\fR>]
|
||||
[\fB\*(--handicap <num\fR>]
|
||||
[\fB\*(--komi <num\fR>]
|
||||
[\fB\*(--quiet\fR]
|
||||
[\fB\-v, \-\-version\fR]
|
||||
[\fB\-h, \-\-help\fR]
|
||||
[\fB\*(--help debug\fR]
|
||||
[\fB\*(--copyright\fR]
|
||||
[\fB\*(--mode <mode\fR>]
|
||||
[\fB\*(--replay <color\fR>]
|
||||
[\fB\-l, \-\-infile <filename\fR>]
|
||||
[\fB\-L, \-\-until <move\fR>]
|
||||
[\fB\-o, \-\-outfile <filename\fR>]
|
||||
[\fB\*(--printsgf <filename\fR>]
|
||||
[\fB\-D, \-\-depth <num\fR>]
|
||||
[\fB\-B, \-\-backfill_depth <num\fR>]
|
||||
[\fB\*(--score [estimate|finish|aftermath]\fR ]
|
||||
[\fB\-a, \-\-allpats\fR]
|
||||
[\fB\-T, \-\-printboard\fR]
|
||||
[\fB\-d, \-\-debug <level\fR>]
|
||||
[\fB\-w, \-\-worms\fR]
|
||||
[\fB\-m, \-\-moyo <level\fR>]
|
||||
[\fB\-b, \-\-benchmark num\fR]
|
||||
[\fB\-t, \-\-trace\fR]
|
||||
[\fB\-r, \-\-seed num\fR]
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\s-1GNU\s0 Go plays a game of Go against the user. It has many other features: it
|
||||
can play against itself or another program, analyse and score a recorded
|
||||
game. \s-1GNU\s0 Go is compliant with Go modem protocol, load and save game in
|
||||
the Smart Game format.
|
||||
.PP
|
||||
\&\s-1GNU\s0 Go default is a simple alpha-numeric board display, but you can use
|
||||
a client such as \fBCGoban\fR.
|
||||
.Sh "The game of Go"
|
||||
.IX Subsection "The game of Go"
|
||||
Go is a game of strategy between two players usually played on a
|
||||
19x19 grid called \fBgoban\fR. The two players put black and white \fBstones\fR on
|
||||
the goban to enclose \fBterritory\fR. Go was invented about 4000 years ago in
|
||||
ancient China. Other names for this game are (Chinese) \fBWei Chi\fR, (Korean)
|
||||
\&\fBBaduk\fR and (Ing) \fBGoe\fR.
|
||||
.Sh "Playing a game in \s-1ASCII\s0 mode"
|
||||
.IX Subsection "Playing a game in ASCII mode"
|
||||
To start a game with default options, just invoke \*(L"gnugo\*(R". The board will be
|
||||
drawn at your terminal using \s-1ASCII\s0 letters. In this mode, you can get help on
|
||||
available commands by the \fBh\fR key. To play as Black with 4 stones handicap,
|
||||
with a 0.5 komi, recording the game in the file record.sgf:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& gnugo --color black --handicap 4 --komi 0.5 -o record.sgf
|
||||
.Ve
|
||||
.Sh "Playing a game with CGoban"
|
||||
.IX Subsection "Playing a game with CGoban"
|
||||
CGoban is a general purpose client program by Bill Shubert for
|
||||
playing Go. It runs under X Window System with a beautiful resizeable
|
||||
graphic display. To use \s-1GNU\s0 Go under X Window System, obtain the
|
||||
most recent version of CGoban from Bill Shubert's web site
|
||||
.PP
|
||||
http://www.igoweb.org/~wms/comp/cgoban/index.html
|
||||
.PP
|
||||
Start CGoban. When the CGoban Control panel comes up, select `Go Modem.'
|
||||
You will get the Go Modem Protocol Setup. Choose one (or both) of the
|
||||
players to be ``Program,'' and fill out the box to the path to
|
||||
gnugo. After clicking \s-1OK\s0, you get the Game Setup window. Choose
|
||||
``Rules Set'' to be Japanese (otherwise handicaps won't work). Set the
|
||||
board size and handicap if you want. Click \s-1OK\s0 and you are ready to go.
|
||||
.PP
|
||||
In the Go Modem Protocol Setup window, when you specify the path
|
||||
to \s-1GNU\s0 Go, you can give it command line options, such as \-\-quiet
|
||||
to suppress most messages. Since the Go Modem Protocol preempts
|
||||
standard I/O, other messages are sent to stderr, even if they are
|
||||
not error messages. These will appear in the terminal from which
|
||||
you started CGoban.
|
||||
.Sh "Scoring system"
|
||||
.IX Subsection "Scoring system"
|
||||
The game stops when both players pass. \s-1GNU\s0 Go will attempt to
|
||||
compute and report the score to you. It may occasionally make
|
||||
mistakes due to wrong evaluation of the status of a group. You
|
||||
can check the score as follows. In \s-1ASCII\s0 mode, at the end of
|
||||
the game, stones believed dead are marked in lower case letters,
|
||||
and you have the option of toggling their status before counting.
|
||||
Using CGoban, you may use CGoban's counting facility to count
|
||||
the game using either Japanese or Chinese rules.
|
||||
.Sh "Viewing a stored game"
|
||||
.IX Subsection "Viewing a stored game"
|
||||
gnugo \fB\-l\fR filename.sgf \-\-mode ascii
|
||||
.PP
|
||||
loads filename.sgf and lets you navigate through the game by using the
|
||||
commands \fIforward\fR, \fIback\fR, \fIgoto\fR and \fIlast\fR.
|
||||
It is not possible to navigate through variations in ascii mode.
|
||||
You may also use CGoban to view stored games. CGoban can navigate
|
||||
variations.
|
||||
.Sh "Documentation"
|
||||
.IX Subsection "Documentation"
|
||||
The files in the \fIdoc\fR directory contain detailed documentation about
|
||||
debugging options and internal program structure. Other documentation may
|
||||
be found in comments throughout the source code.
|
||||
.Sh "Go Modem Protocol"
|
||||
.IX Subsection "Go Modem Protocol"
|
||||
The Go Modem Protocol is a standard interface between Go programs and
|
||||
graphical display.
|
||||
.PP
|
||||
The Go Modem Protocol was developed by Bruce Wilcox with input from
|
||||
David Fotland, Anders Kierulf and others. Any Go program *should*
|
||||
use this protocol since it is standard. Since CGoban supports this
|
||||
protocol, the user interface for any Go program can be done
|
||||
entirely through CGoban. Using the Go Modem Protocol, you can play
|
||||
with another computer running a different program (even on a
|
||||
different operating system) using a modem, a serial cable or over
|
||||
the internet if the other program also supports the protocol. You
|
||||
can also communicate with the Go servers using CGoban.
|
||||
.Sh "Smart Game Format"
|
||||
.IX Subsection "Smart Game Format"
|
||||
Games (with comments, variations and other features) can be
|
||||
stored in the Smart Game Format (\s-1SGF\s0). This format originated in
|
||||
Anders Kierulf's program Smart Go. Martin Muller and Arno
|
||||
Hollosi developed the current standard, which may be found
|
||||
at
|
||||
.PP
|
||||
http://www.red-bean.com/sgf/
|
||||
.PP
|
||||
\&\s-1GNU\s0 Go supports the Smart Game Format.
|
||||
.SH "OPTIONS"
|
||||
.IX Header "OPTIONS"
|
||||
.Sh "Main options"
|
||||
.IX Subsection "Main options"
|
||||
\&\fB\*(--mode \f(BImode\fB\fR
|
||||
.PP
|
||||
force the playing mode (\fIascii'\fR, \fIgtp\fR or \fIgmp\fR). Default is
|
||||
\&\s-1ASCII\s0. If no terminal is detected \s-1GMP\s0 (Go Modem Protocol) will be assumed.
|
||||
.PP
|
||||
\&\fB\*(--replay \f(BIcolor\fB\fR
|
||||
.PP
|
||||
replay the game generating moves for color, where color is \fIwhite\fR,
|
||||
\&\fIblack\fR, or \fIboth\fR. (requires \fB\-l\fR)
|
||||
.PP
|
||||
\&\fB\*(--quiet\fR
|
||||
.PP
|
||||
Don't print copyright and other informational messages.
|
||||
.PP
|
||||
\&\fB\-l, \-\-infile \f(BIfile\fB\fR
|
||||
.PP
|
||||
Load the \s-1SGF\s0 file (to score or analyze a recorded game).
|
||||
.PP
|
||||
\&\fB\-L, \-\-until \f(BImove\fB\fR
|
||||
.PP
|
||||
Stop loading just before \fImove\fR is played (e.g. 154 or L10).
|
||||
.PP
|
||||
\&\fB\-o, \-\-outfile \f(BIfile\fB\fR
|
||||
.PP
|
||||
Save the played game to \fIfile\fR in \s-1SGF\s0 format.
|
||||
.Sh "Game Options:"
|
||||
.IX Subsection "Game Options:"
|
||||
\&\fB\*(--boardsize \f(BInum\fB\fR
|
||||
.PP
|
||||
Set the board size to use (1\-19). Default is 19, other common formats are
|
||||
13 and 9.
|
||||
.PP
|
||||
\&\fB\*(--color \f(BIcolor\fB\fR
|
||||
.PP
|
||||
Choose your color (\fIblack\fR or \fIwhite\fR). Black plays first, White gets
|
||||
the komi compensation.
|
||||
.PP
|
||||
\&\fB\*(--handicap \f(BInum\fB\fR
|
||||
.PP
|
||||
Set the number of handicap stones.
|
||||
.PP
|
||||
\&\fB\*(--komi \f(BInum\fB\fR
|
||||
.PP
|
||||
Set the komi (points given to white player to compensate advantage of the
|
||||
first move, usually 5.5 or 0.5). Default is 5.5.
|
||||
.Sh "Informative Output:"
|
||||
.IX Subsection "Informative Output:"
|
||||
\&\fB\-v, \-\-version\fR
|
||||
.PP
|
||||
Display the version of \s-1GNU\s0 Go.
|
||||
.PP
|
||||
\&\fB\-h, \-\-help\fR
|
||||
.PP
|
||||
Display help message.
|
||||
.PP
|
||||
\&\fB\*(--help debug\fR
|
||||
.PP
|
||||
Display help about debugging options.
|
||||
.PP
|
||||
\&\fB\*(--copyright\fR
|
||||
.PP
|
||||
Display copyright notice.
|
||||
.Sh "Debugging and advanced options:"
|
||||
.IX Subsection "Debugging and advanced options:"
|
||||
\&\fB\-T, \-\-printboard\fR
|
||||
.PP
|
||||
Show board each move.
|
||||
.PP
|
||||
\&\fB\*(--level \f(BInum\fB\fR
|
||||
.PP
|
||||
Level of play. (default 10; smaller=faster, weaker).
|
||||
.PP
|
||||
\&\fB\-b, \-\-benchmark \f(BInum\fB\fR
|
||||
.PP
|
||||
Benchmarking mode \- can be used with \fB\-l\fR.
|
||||
.PP
|
||||
\&\fB\-t, \-\-trace\fR
|
||||
.PP
|
||||
Verbose tracing (use twice or more to trace reading).
|
||||
.PP
|
||||
\&\fB\-r, \-\-seed \f(BInum\fB\fR
|
||||
.PP
|
||||
Set random number seed.
|
||||
.PP
|
||||
\&\fB\*(--score [\f(BIestimate|finish|aftermath\fB]\fR
|
||||
.PP
|
||||
Count or estimate territory of the input file. Usage:
|
||||
.PP
|
||||
\&\fBgnugo \-\-score estimate \-l filename\fR
|
||||
.PP
|
||||
Loads the \s-1SGF\s0 file and estimates the score by measuring the
|
||||
influence. Use with \fB\-L\fR if you want the estimate somewhere else than
|
||||
at the end of the file.
|
||||
.PP
|
||||
\&\fBgnugo \-\-score finish \-l filename\fR
|
||||
.PP
|
||||
Loads the \s-1SGF\s0 file and gnugo continues to play by itself up to the
|
||||
very end. Then the winner is determined by counting the territory.
|
||||
.PP
|
||||
\&\fBgnugo \-\-score aftermath \-l filename\fR
|
||||
.PP
|
||||
Similar to \fB\*(--score finish\fR except that a more accurate but slower
|
||||
algorithm is used to determine the final status of the groups.
|
||||
.PP
|
||||
If the option \fB\-o outputfilename\fR is provided,
|
||||
the results will also be written as comment at the end of the output file.
|
||||
.PP
|
||||
\&\fB\*(--printsgf \f(BIoutfile\fB\fR
|
||||
.PP
|
||||
Load \s-1SGF\s0 file, output final position (requires \fB\-l\fR).
|
||||
.SH "BUGS"
|
||||
.IX Header "BUGS"
|
||||
If you find a bug, please send the \s-1SGF\s0 output file to gnugo@gnu.org
|
||||
together with a description of the bug.
|
199
gnugo/doc/gnugo.info
Normal file
|
@ -0,0 +1,199 @@
|
|||
This is gnugo.info, produced by makeinfo version 4.11 from gnugo.texi.
|
||||
|
||||
INFO-DIR-SECTION GNU games
|
||||
START-INFO-DIR-ENTRY
|
||||
* GNU Go: (gnugo). The GNU Go program
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
|
||||
Indirect:
|
||||
gnugo.info-1: 187
|
||||
gnugo.info-2: 298286
|
||||
gnugo.info-3: 585384
|
||||
|
||||
Tag Table:
|
||||
(Indirect)
|
||||
Node: Top187
|
||||
Node: Introduction2429
|
||||
Node: About2985
|
||||
Node: Copyright4991
|
||||
Node: Authors6383
|
||||
Node: Thanks7125
|
||||
Node: Development8457
|
||||
Node: Installation10524
|
||||
Node: GNU/Linux and Unix11105
|
||||
Node: Configure Options12860
|
||||
Node: Ram Cache13290
|
||||
Node: Default Level14936
|
||||
Node: Other Options15761
|
||||
Node: Windows and MS-DOS19044
|
||||
Node: Macintosh24802
|
||||
Node: User Guide25397
|
||||
Node: Documentation25997
|
||||
Node: CGoban27978
|
||||
Node: Other Clients29758
|
||||
Node: Ascii32146
|
||||
Node: Emacs33457
|
||||
Node: GMP and GTP34790
|
||||
Node: Tournaments35815
|
||||
Node: SGF Support36427
|
||||
Node: Invoking GNU Go36769
|
||||
Node: Overview59822
|
||||
Node: Examining the Position61077
|
||||
Node: Move Generators64103
|
||||
Node: Move Valuation68408
|
||||
Node: Detailed Sequence of Events69330
|
||||
Node: Roadmap72939
|
||||
Node: Coding Styles84582
|
||||
Node: Navigating the Source87635
|
||||
Node: Analyzing88428
|
||||
Node: Traces89429
|
||||
Node: Output File90380
|
||||
Node: Decide string91435
|
||||
Node: Decide dragon94534
|
||||
Node: GTP and GDB techniques94972
|
||||
Node: view.pike95711
|
||||
Node: Scoring96535
|
||||
Node: Colored Display96896
|
||||
Node: Move Generation98854
|
||||
Node: Move generation Intro99224
|
||||
Node: Move Reasons100943
|
||||
Node: Move Reason Details103642
|
||||
Node: Attack and Defense104454
|
||||
Node: Threats to Attack or Defend105909
|
||||
Node: Multi Attack or Defense106611
|
||||
Node: Cutting and Connecting106992
|
||||
Node: Semeai107977
|
||||
Node: Making eyes108766
|
||||
Node: Antisuji moves109392
|
||||
Node: Territorial moves109796
|
||||
Node: Owl attack and defense110330
|
||||
Node: Combination Attacks111914
|
||||
Node: Valuation112330
|
||||
Node: Territorial value115377
|
||||
Node: Strategical value116241
|
||||
Node: Shape factor116829
|
||||
Node: Minimum Value117790
|
||||
Node: Secondary Value118459
|
||||
Node: Threats and Followup Value118735
|
||||
Node: End Game119649
|
||||
Node: Worms and Dragons120030
|
||||
Node: Worms122366
|
||||
Node: Amalgamation132161
|
||||
Node: Connection133860
|
||||
Node: Half Eyes135693
|
||||
Node: Dragons137482
|
||||
Node: Dragons in Color148555
|
||||
Node: Eyes150034
|
||||
Node: Local Games150822
|
||||
Node: Eye Space152186
|
||||
Node: Eye Space as Local Game154271
|
||||
Node: Eye Example157092
|
||||
Node: Graphs157778
|
||||
Node: Eye Shape159652
|
||||
Node: Eye Local Game Values160639
|
||||
Node: Eye Topology164228
|
||||
Node: Eye Topology with Ko166346
|
||||
Node: False Margins172276
|
||||
Node: Eye Functions172884
|
||||
Node: Patterns182133
|
||||
Node: Patterns Overview183433
|
||||
Node: Pattern Classification187147
|
||||
Node: Pattern Values192559
|
||||
Node: Helper Functions193544
|
||||
Node: Autohelpers and Constraints196448
|
||||
Node: Autohelper Actions198892
|
||||
Node: Autohelper Functions201307
|
||||
Node: Attack and Defense DB212631
|
||||
Node: Connections Database213950
|
||||
Node: Connection Functions216196
|
||||
Node: Tuning218226
|
||||
Node: PM Implementation226271
|
||||
Node: Symmetry & transformations227654
|
||||
Node: Details229542
|
||||
Node: Grid optimization231775
|
||||
Node: Joseki Compiler233290
|
||||
Node: Ladders in Joseki236881
|
||||
Node: Corner Matcher238821
|
||||
Node: Editing Patterns243820
|
||||
Node: DFA245121
|
||||
Node: Introduction to the DFA246335
|
||||
Node: What is a DFA248260
|
||||
Node: Pattern matching with DFA252932
|
||||
Node: Building the DFA255534
|
||||
Node: Incremental Algorithm257866
|
||||
Node: DFA Optimizations259052
|
||||
Node: Tactical Reading259529
|
||||
Node: Reading Basics260661
|
||||
Ref: Return Codes262979
|
||||
Ref: Experimental Owl Extension263604
|
||||
Ref: depthparams264135
|
||||
Node: Hashing267700
|
||||
Node: Hash Calculation269226
|
||||
Node: Hash Organization270756
|
||||
Node: Hash Structures273370
|
||||
Node: Persistent Cache276616
|
||||
Node: Ko280124
|
||||
Node: A Ko Example284328
|
||||
Node: Another Ko Example286396
|
||||
Node: Alternate Komaster Schemes288006
|
||||
Node: Superstrings289761
|
||||
Node: Debugging291105
|
||||
Node: Connection Reading295598
|
||||
Node: Pattern Based Reading296835
|
||||
Node: The Owl Code298286
|
||||
Node: Combinations303285
|
||||
Node: Influence306331
|
||||
Node: Influential Concepts307296
|
||||
Node: Territory and Moyo309481
|
||||
Node: Influence Usage310817
|
||||
Node: Influence and Territory313698
|
||||
Node: Territorial Details319583
|
||||
Node: The Influence Core321572
|
||||
Node: The Influence Algorithm324776
|
||||
Node: Permeability327952
|
||||
Node: Escape329501
|
||||
Node: Break Ins332964
|
||||
Node: Surrounded Dragons337404
|
||||
Node: Influential Patterns340830
|
||||
Node: Influential Display345235
|
||||
Node: Influence Tuning348788
|
||||
Node: Monte Carlo Go351497
|
||||
Node: Libboard359172
|
||||
Node: Board Data Structures360978
|
||||
Node: The Board Array362402
|
||||
Node: Incremental Board367612
|
||||
Node: Some Board Functions375267
|
||||
Node: SGF379917
|
||||
Node: API383219
|
||||
Node: Getting Started387212
|
||||
Node: Basic Data Structures388208
|
||||
Node: The Board State389352
|
||||
Node: Positional Functions390806
|
||||
Node: Utility Functions397396
|
||||
Node: General Utilities397895
|
||||
Node: Print Utilities413839
|
||||
Node: Board Utilities417413
|
||||
Node: Influence Utilities428544
|
||||
Node: GTP431012
|
||||
Node: The Go Text Protocol431482
|
||||
Node: Running in GTP mode432643
|
||||
Node: GTP applications434508
|
||||
Node: The Metamachine436839
|
||||
Node: Adding new GTP commands440640
|
||||
Node: GTP command reference444573
|
||||
Node: Regression475144
|
||||
Node: Regression Testing476680
|
||||
Node: Test Suites477489
|
||||
Node: Running the Regressions479616
|
||||
Node: Running regress.pike482404
|
||||
Node: Viewing with Emacs484408
|
||||
Node: HTML Views485164
|
||||
Node: Copying488598
|
||||
Node: GPL489073
|
||||
Node: GFDL526318
|
||||
Node: GTP License551444
|
||||
Node: Concept Index553151
|
||||
Node: Functions Index585384
|
||||
|
||||
End Tag Table
|
8030
gnugo/doc/gnugo.info-1
Normal file
6826
gnugo/doc/gnugo.info-2
Normal file
BIN
gnugo/doc/gnugo.info-3
Normal file
263
gnugo/doc/gnugo.pod
Normal file
|
@ -0,0 +1,263 @@
|
|||
|
||||
=head1 NAME
|
||||
|
||||
gnugo - The GNU program to play the game of Go
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<gnugo>
|
||||
[B<--boardsize <num>>]
|
||||
[B<--color <color>>]
|
||||
[B<--handicap <num>>]
|
||||
[B<--komi <num>>]
|
||||
[B<--quiet>]
|
||||
[B<-v, --version>]
|
||||
[B<-h, --help>]
|
||||
[B<--help debug>]
|
||||
[B<--copyright>]
|
||||
[B<--mode <mode>>]
|
||||
[B<--replay <color>>]
|
||||
[B<-l, --infile <filename>>]
|
||||
[B<-L, --until <move>>]
|
||||
[B<-o, --outfile <filename>>]
|
||||
[B<--printsgf <filename>>]
|
||||
[B<-D, --depth <num>>]
|
||||
[B<-B, --backfill_depth <num>>]
|
||||
[B<--score [estimate|finish|aftermath]> ]
|
||||
[B<-a, --allpats>]
|
||||
[B<-T, --printboard>]
|
||||
[B<-d, --debug <level>>]
|
||||
[B<-w, --worms>]
|
||||
[B<-m, --moyo <level>>]
|
||||
[B<-b, --benchmark num>]
|
||||
[B<-t, --trace>]
|
||||
[B<-r, --seed num>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
GNU Go plays a game of Go against the user. It has many other features: it
|
||||
can play against itself or another program, analyse and score a recorded
|
||||
game. GNU Go is compliant with Go modem protocol, load and save game in
|
||||
the Smart Game format.
|
||||
|
||||
GNU Go default is a simple alpha-numeric board display, but you can use
|
||||
a client such as B<CGoban>.
|
||||
|
||||
=head2 The game of Go
|
||||
|
||||
Go is a game of strategy between two players usually played on a
|
||||
19x19 grid called B<goban>. The two players put black and white B<stones> on
|
||||
the goban to enclose B<territory>. Go was invented about 4000 years ago in
|
||||
ancient China. Other names for this game are (Chinese) B<Wei Chi>, (Korean)
|
||||
B<Baduk> and (Ing) B<Goe>.
|
||||
|
||||
=head2 Playing a game in ASCII mode
|
||||
|
||||
To start a game with default options, just invoke "gnugo". The board will be
|
||||
drawn at your terminal using ASCII letters. In this mode, you can get help on
|
||||
available commands by the B<h> key. To play as Black with 4 stones handicap,
|
||||
with a 0.5 komi, recording the game in the file record.sgf:
|
||||
|
||||
gnugo --color black --handicap 4 --komi 0.5 -o record.sgf
|
||||
|
||||
=head2 Playing a game with CGoban
|
||||
|
||||
CGoban is a general purpose client program by Bill Shubert for
|
||||
playing Go. It runs under X Window System with a beautiful resizeable
|
||||
graphic display. To use GNU Go under X Window System, obtain the
|
||||
most recent version of CGoban from Bill Shubert's web site
|
||||
|
||||
http://www.igoweb.org/~wms/comp/cgoban/index.html
|
||||
|
||||
Start CGoban. When the CGoban Control panel comes up, select `Go Modem.'
|
||||
You will get the Go Modem Protocol Setup. Choose one (or both) of the
|
||||
players to be ``Program,'' and fill out the box to the path to
|
||||
gnugo. After clicking OK, you get the Game Setup window. Choose
|
||||
``Rules Set'' to be Japanese (otherwise handicaps won't work). Set the
|
||||
board size and handicap if you want. Click OK and you are ready to go.
|
||||
|
||||
In the Go Modem Protocol Setup window, when you specify the path
|
||||
to GNU Go, you can give it command line options, such as --quiet
|
||||
to suppress most messages. Since the Go Modem Protocol preempts
|
||||
standard I/O, other messages are sent to stderr, even if they are
|
||||
not error messages. These will appear in the terminal from which
|
||||
you started CGoban.
|
||||
|
||||
=head2 Scoring system
|
||||
|
||||
The game stops when both players pass. GNU Go will attempt to
|
||||
compute and report the score to you. It may occasionally make
|
||||
mistakes due to wrong evaluation of the status of a group. You
|
||||
can check the score as follows. In ASCII mode, at the end of
|
||||
the game, stones believed dead are marked in lower case letters,
|
||||
and you have the option of toggling their status before counting.
|
||||
Using CGoban, you may use CGoban's counting facility to count
|
||||
the game using either Japanese or Chinese rules.
|
||||
|
||||
=head2 Viewing a stored game
|
||||
|
||||
gnugo B<-l> filename.sgf --mode ascii
|
||||
|
||||
loads filename.sgf and lets you navigate through the game by using the
|
||||
commands I<forward>, I<back>, I<goto> and I<last>.
|
||||
It is not possible to navigate through variations in ascii mode.
|
||||
You may also use CGoban to view stored games. CGoban can navigate
|
||||
variations.
|
||||
|
||||
=head2 Documentation
|
||||
|
||||
The files in the F<doc> directory contain detailed documentation about
|
||||
debugging options and internal program structure. Other documentation may
|
||||
be found in comments throughout the source code.
|
||||
|
||||
=head2 Go Modem Protocol
|
||||
|
||||
The Go Modem Protocol is a standard interface between Go programs and
|
||||
graphical display.
|
||||
|
||||
The Go Modem Protocol was developed by Bruce Wilcox with input from
|
||||
David Fotland, Anders Kierulf and others. Any Go program *should*
|
||||
use this protocol since it is standard. Since CGoban supports this
|
||||
protocol, the user interface for any Go program can be done
|
||||
entirely through CGoban. Using the Go Modem Protocol, you can play
|
||||
with another computer running a different program (even on a
|
||||
different operating system) using a modem, a serial cable or over
|
||||
the internet if the other program also supports the protocol. You
|
||||
can also communicate with the Go servers using CGoban.
|
||||
|
||||
=head2 Smart Game Format
|
||||
|
||||
Games (with comments, variations and other features) can be
|
||||
stored in the Smart Game Format (SGF). This format originated in
|
||||
Anders Kierulf's program Smart Go. Martin Muller and Arno
|
||||
Hollosi developed the current standard, which may be found
|
||||
at
|
||||
|
||||
http://www.red-bean.com/sgf/
|
||||
|
||||
GNU Go supports the Smart Game Format.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=head2 Main options
|
||||
|
||||
B<--mode I<mode>>
|
||||
|
||||
force the playing mode (I<ascii'>, I<gtp> or I<gmp>). Default is
|
||||
ASCII. If no terminal is detected GMP (Go Modem Protocol) will be assumed.
|
||||
|
||||
B<--replay I<color>>
|
||||
|
||||
replay the game generating moves for color, where color is I<white>,
|
||||
I<black>, or I<both>. (requires B<-l>)
|
||||
|
||||
B<--quiet>
|
||||
|
||||
Don't print copyright and other informational messages.
|
||||
|
||||
B<-l, --infile I<file>>
|
||||
|
||||
Load the SGF file (to score or analyze a recorded game).
|
||||
|
||||
B<-L, --until I<move>>
|
||||
|
||||
Stop loading just before I<move> is played (e.g. 154 or L10).
|
||||
|
||||
B<-o, --outfile I<file>>
|
||||
|
||||
Save the played game to I<file> in SGF format.
|
||||
|
||||
=head2 Game Options:
|
||||
|
||||
B<--boardsize I<num>>
|
||||
|
||||
Set the board size to use (1-19). Default is 19, other common formats are
|
||||
13 and 9.
|
||||
|
||||
B<--color I<color>>
|
||||
|
||||
Choose your color (I<black> or I<white>). Black plays first, White gets
|
||||
the komi compensation.
|
||||
|
||||
B<--handicap I<num>>
|
||||
|
||||
Set the number of handicap stones.
|
||||
|
||||
B<--komi I<num>>
|
||||
|
||||
Set the komi (points given to white player to compensate advantage of the
|
||||
first move, usually 5.5 or 0.5). Default is 5.5.
|
||||
|
||||
=head2 Informative Output:
|
||||
|
||||
B<-v, --version>
|
||||
|
||||
Display the version of GNU Go.
|
||||
|
||||
B<-h, --help>
|
||||
|
||||
Display help message.
|
||||
|
||||
B<--help debug>
|
||||
|
||||
Display help about debugging options.
|
||||
|
||||
B<--copyright>
|
||||
|
||||
Display copyright notice.
|
||||
|
||||
=head2 Debugging and advanced options:
|
||||
|
||||
B<-T, --printboard>
|
||||
|
||||
Show board each move.
|
||||
|
||||
B<--level I<num>>
|
||||
|
||||
Level of play. (default 10; smaller=faster, weaker).
|
||||
|
||||
B<-b, --benchmark I<num>>
|
||||
|
||||
Benchmarking mode - can be used with B<-l>.
|
||||
|
||||
B<-t, --trace>
|
||||
|
||||
Verbose tracing (use twice or more to trace reading).
|
||||
|
||||
B<-r, --seed I<num>>
|
||||
|
||||
Set random number seed.
|
||||
|
||||
B<--score [I<estimate|finish|aftermath>]>
|
||||
|
||||
Count or estimate territory of the input file. Usage:
|
||||
|
||||
B<gnugo --score estimate -l filename>
|
||||
|
||||
Loads the SGF file and estimates the score by measuring the
|
||||
influence. Use with B<-L> if you want the estimate somewhere else than
|
||||
at the end of the file.
|
||||
|
||||
B<gnugo --score finish -l filename>
|
||||
|
||||
Loads the SGF file and gnugo continues to play by itself up to the
|
||||
very end. Then the winner is determined by counting the territory.
|
||||
|
||||
B<gnugo --score aftermath -l filename>
|
||||
|
||||
Similar to B<--score finish> except that a more accurate but slower
|
||||
algorithm is used to determine the final status of the groups.
|
||||
|
||||
If the option B<-o outputfilename> is provided,
|
||||
the results will also be written as comment at the end of the output file.
|
||||
|
||||
B<--printsgf I<outfile>>
|
||||
|
||||
Load SGF file, output final position (requires B<-l>).
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
If you find a bug, please send the SGF output file to gnugo@gnu.org
|
||||
together with a description of the bug.
|
||||
|
||||
=cut
|
238
gnugo/doc/gnugo.texi
Normal file
|
@ -0,0 +1,238 @@
|
|||
\input texinfo @c -*-Texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename gnugo.info
|
||||
@settitle GNU Go Documentation
|
||||
@c %**end of header
|
||||
|
||||
@dircategory GNU games
|
||||
@direntry
|
||||
* GNU Go: (gnugo). The GNU Go program
|
||||
@end direntry
|
||||
|
||||
@set EDITION 3.8
|
||||
@set VERSION 3.8
|
||||
|
||||
@finalout
|
||||
@titlepage
|
||||
@subtitle Documentation for the GNU Go Project
|
||||
@subtitle Edition @value{EDITION}
|
||||
@subtitle February, 2009
|
||||
@vskip 0pt plus 1filll
|
||||
@image{logo-36}
|
||||
@vskip 0pt plus 1filll
|
||||
@author By Arend Bayer, Daniel Bump, Evan Berggren Daniel,
|
||||
@author David Denholm, Jerome Dumonteil, Gunnar Farneb@"ack,
|
||||
@author Paul Pogonyshev, Thomas Traber, Tanguy Urvoy, Inge Wallin
|
||||
|
||||
@sp 1
|
||||
@page
|
||||
@title{GNU Go 3.8}
|
||||
@vskip 0pt plus 1filll
|
||||
Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008 and 2009 @uref{http://www.fsf.org,Free Software Foundation}, Inc.
|
||||
@sp 2
|
||||
|
||||
This is Edition @value{EDITION} of @cite{The GNU Go Project documentation}, @*
|
||||
for the @value{VERSION} version of the GNU Go program.
|
||||
|
||||
@sp 2
|
||||
Published by the Free Software Foundation Inc @*
|
||||
51 Franklin Street, Fifth Floor @*
|
||||
Boston, MA 02110-1301 @*
|
||||
USA @*
|
||||
Tel: 617-542-5942 @*
|
||||
|
||||
Permission is granted to make and distribute verbatim
|
||||
or modified copies of this manual is given provided
|
||||
that the terms of the GNU Free Documentation License
|
||||
(@pxref{GFDL}, version 1.3 or any later version) are respected.
|
||||
|
||||
Permission is granted to make and distribute verbatim
|
||||
or modified copies of the program GNU Go is given provided
|
||||
the terms of the GNU General Public License (@pxref{GPL},
|
||||
version 3 or any later version) are respected.
|
||||
|
||||
@end titlepage
|
||||
|
||||
@contents
|
||||
|
||||
@node Top
|
||||
@top
|
||||
@ifinfo
|
||||
@unnumbered GNU Go
|
||||
|
||||
This manual documents @code{GNU Go}, a Go program and its sources.
|
||||
This is Edition @value{EDITION} of the @cite{GNU Go Program Documentation}
|
||||
|
||||
Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008 and 2009 @uref{http://www.fsf.org,Free Software Foundation}, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim
|
||||
or modified copies of this manual is given provided
|
||||
that the terms of the GNU Free Documentation License
|
||||
(@pxref{GFDL}, version 1.3 or any later version) are respected.
|
||||
|
||||
Permission is granted to make and distribute verbatim
|
||||
or modified copies of the program GNU Go is given provided
|
||||
the terms of the GNU General Public License (@pxref{GPL},
|
||||
version 3 or any later version) are respected.
|
||||
|
||||
@end ifinfo
|
||||
|
||||
@menu
|
||||
User's manual
|
||||
* Introduction:: What is GNU Go ?
|
||||
* Installation:: Installing GNU Go
|
||||
* User Guide:: Using GNU Go
|
||||
|
||||
An introduction to the GNU Go engine
|
||||
* Overview:: Overview of the GNU Go engine
|
||||
* Analyzing:: Analyzing GNU Go's moves
|
||||
* Move Generation:: How GNU Go generates moves
|
||||
* Worms and Dragons:: Dragons and Worms
|
||||
* Eyes:: Eyes and half eyes
|
||||
* Patterns:: Pattern database
|
||||
* Tactical Reading:: Tactical and Connection Reading
|
||||
* Pattern Based Reading:: Pattern Based Reading: Owl and Combinations
|
||||
* Influence:: Influence Function
|
||||
* Monte Carlo Go:: Monte Carlo GNU Go
|
||||
|
||||
Infrastructure and Interfaces
|
||||
* Libboard:: The basic go board library.
|
||||
* SGF:: Handling SGF trees in memory
|
||||
* DFA:: The DFA Pattern Matcher
|
||||
* Utility Functions:: @file{utils.c} and @file{printutils.c}
|
||||
* API:: API to the GNU Go engine
|
||||
* GTP:: The Go Text Protocol
|
||||
* Regression:: Regression testing
|
||||
|
||||
Appendices
|
||||
* Copying:: Software and Documentation Licenses
|
||||
|
||||
Indices
|
||||
* Concept Index:: Concept Index
|
||||
* Functions Index:: Functions Index
|
||||
|
||||
@end menu
|
||||
|
||||
@node Introduction
|
||||
@chapter Introduction
|
||||
|
||||
@include introduction.texi
|
||||
|
||||
@node Installation
|
||||
@chapter Installation
|
||||
|
||||
@include install.texi
|
||||
|
||||
@node User Guide
|
||||
@chapter Using GNU Go
|
||||
|
||||
@include using.texi
|
||||
|
||||
@node Overview
|
||||
@chapter GNU Go engine overview
|
||||
|
||||
@include overview.texi
|
||||
|
||||
@node Analyzing
|
||||
@chapter Analyzing GNU Go's moves
|
||||
|
||||
@include analyze.texi
|
||||
|
||||
|
||||
@node Move Generation
|
||||
@chapter Move generation
|
||||
|
||||
@include move_generation.texi
|
||||
|
||||
@node Worms and Dragons
|
||||
@chapter Worms and Dragons
|
||||
|
||||
@include dragon.texi
|
||||
|
||||
@node Eyes
|
||||
@chapter Eyes and Half Eyes
|
||||
|
||||
@include eyes.texi
|
||||
|
||||
@node Patterns
|
||||
@chapter The Pattern Code
|
||||
|
||||
@include patterns.texi
|
||||
|
||||
@node DFA
|
||||
@chapter The DFA pattern matcher
|
||||
|
||||
@include dfa.texi
|
||||
|
||||
@node Tactical Reading
|
||||
@chapter Tactical reading
|
||||
|
||||
@include reading.texi
|
||||
|
||||
@node Pattern Based Reading
|
||||
@chapter Pattern Based Reading
|
||||
|
||||
@include owl.texi
|
||||
|
||||
@node Influence
|
||||
@chapter Influence Function
|
||||
|
||||
@include influence.texi
|
||||
|
||||
@node Monte Carlo Go
|
||||
@chapter Monte Carlo Go
|
||||
@include montecarlo.texi
|
||||
|
||||
@node Libboard
|
||||
@chapter The Board Library
|
||||
|
||||
@include board.texi
|
||||
|
||||
@node SGF
|
||||
@chapter Handling SGF trees in memory
|
||||
|
||||
@include sgf.texi
|
||||
|
||||
@node API
|
||||
@chapter Application Programmers Interface to GNU Go
|
||||
|
||||
@include api.texi
|
||||
|
||||
@node Utility Functions
|
||||
@chapter Utility Functions
|
||||
|
||||
@include utils.texi
|
||||
|
||||
@node GTP
|
||||
@chapter The Go Text Protocol
|
||||
|
||||
@include gtp.texi
|
||||
|
||||
@node Regression
|
||||
@chapter Regression testing
|
||||
|
||||
@include regression.texi
|
||||
|
||||
@node Copying
|
||||
@appendix Copying
|
||||
|
||||
@include copying.texi
|
||||
|
||||
@c ------------------------
|
||||
@c * END OF THE DOCUMENT *
|
||||
@c ------------------------
|
||||
|
||||
|
||||
@node Concept Index
|
||||
@unnumbered Concept Index
|
||||
|
||||
@printindex cp
|
||||
|
||||
@node Functions Index
|
||||
@unnumbered Functions Index
|
||||
|
||||
@printindex fn
|
||||
|
||||
@bye
|
35
gnugo/doc/gtp-commands.sed
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Look for function headers.
|
||||
/\* Function: /,/^{/!d
|
||||
|
||||
# Remove cruft.
|
||||
/^static int/d
|
||||
/^{/d
|
||||
/^ \*\//d
|
||||
s/(char.*)//g
|
||||
|
||||
# Hold comment lines, deleting them from pattern space for now.
|
||||
/.\*/{
|
||||
s/^..//
|
||||
s/^ //
|
||||
H
|
||||
d
|
||||
}
|
||||
|
||||
# When we see the function name, merge hold space, in the process
|
||||
# generating proper texinfo @cindex, @item and @example formatting.
|
||||
# As a bonus, the `Function' field is moved to the @item line.
|
||||
# We use repeated `x' commands instead of the simpler `i' to avoid
|
||||
# requiring a `d' (which would render this script non-composable).
|
||||
/^gtp_/{
|
||||
s/\(.*\)/@cindex \1 GTP command\n@item \1/
|
||||
x
|
||||
s/^\(.\)Function: *\(.*\)\(Arguments:\)/: \2@example\1\3/
|
||||
s/\n *\(.*.@example\)/ \1/g
|
||||
s/$/\n@end example/
|
||||
H
|
||||
s/.*//
|
||||
x
|
||||
s/\n//2
|
||||
}
|
||||
|
||||
# gtp-commands.sed ends here
|
1106
gnugo/doc/gtp-commands.texi
Normal file
396
gnugo/doc/gtp.texi
Normal file
|
@ -0,0 +1,396 @@
|
|||
|
||||
@menu
|
||||
* The Go Text Protocol:: The Go Text Protocol
|
||||
* Running in GTP mode:: Running GNU Go in GTP mode
|
||||
* GTP applications:: GTP applications
|
||||
* The Metamachine:: The Metamachine
|
||||
* Adding new GTP commands:: Adding new GTP commands
|
||||
* GTP command reference:: Details on every GTP command
|
||||
@end menu
|
||||
|
||||
@node The Go Text Protocol
|
||||
@section The Go Text Protocol
|
||||
|
||||
GNU Go 3.0 introduced a new interface, the Go Text Protocol, abbreviated
|
||||
GTP. The intention was to make an interface that is better suited for
|
||||
machine-machine communication than the ascii interface and simpler, more
|
||||
powerful, and more flexible than the Go Modem Protocol.
|
||||
|
||||
There are two versions of the protocol. Version 1 was used with GNU Go
|
||||
3.0 and 3.2. GNU Go 3.4 and later versions use protocol version 2. The
|
||||
specification of GTP version 2 is available at
|
||||
@url{http://www.lysator.liu.se/~gunnar/gtp/}. GNU Go 3.4 is the
|
||||
reference implementation for GTP version 2, but all but the most common
|
||||
commands are to be regarded as private extensions of the protocol.
|
||||
|
||||
The GTP has a variety of applications. For GNU Go the first use was in
|
||||
regression testing (@pxref{Regression}), followed by communication with
|
||||
the NNGS go server and for automated test games against itself and other
|
||||
programs. Now there are also many graphical user interfaces available
|
||||
supporting GTP, as well as bridges to other Go servers than NNGS.
|
||||
|
||||
@node Running in GTP mode
|
||||
@section Running GNU Go in GTP mode
|
||||
|
||||
To start GNU Go in GTP mode, simply invoke it with the option
|
||||
@option{--mode gtp}. You will not get a prompt or any other output to
|
||||
start with but GNU Go is silently waiting for GTP commands.
|
||||
|
||||
A sample GTP session may look as follows:
|
||||
|
||||
@example
|
||||
virihaure 462% ./gnugo --mode gtp
|
||||
1 boardsize 7
|
||||
=1
|
||||
|
||||
2 clear_board
|
||||
=2
|
||||
|
||||
3 play black D5
|
||||
=3
|
||||
|
||||
4 genmove white
|
||||
=4 C3
|
||||
|
||||
5 play black C3
|
||||
?5 illegal move
|
||||
|
||||
6 play black E3
|
||||
=6
|
||||
|
||||
7 showboard
|
||||
=7
|
||||
A B C D E F G
|
||||
7 . . . . . . . 7
|
||||
6 . . . . . . . 6
|
||||
5 . . + X + . . 5
|
||||
4 . . . + . . . 4
|
||||
3 . . O . X . . 3
|
||||
2 . . . . . . . 2 WHITE (O) has captured 0 stones
|
||||
1 . . . . . . . 1 BLACK (X) has captured 0 stones
|
||||
A B C D E F G
|
||||
|
||||
8 quit
|
||||
=8
|
||||
|
||||
@end example
|
||||
|
||||
Commands are given on a single line, starting by an optional identity
|
||||
number, followed by the command name and its arguments.
|
||||
|
||||
If the command is successful, the response starts by an equals sign
|
||||
(@samp{=}), followed by the identity number of the command (if any) and
|
||||
then the result. In this example all results were empty strings except
|
||||
for command 4 where the answer was the white move at C3, and command 7
|
||||
where the result was a diagram of the current board position. The
|
||||
response ends by two consecutive newlines.
|
||||
|
||||
Failing commands are signified by a question mark (@samp{?}) instead of
|
||||
an equals sign, as in the response to command 5.
|
||||
|
||||
The detailed specification of the protocol can be found at
|
||||
@url{http://www.lysator.liu.se/~gunnar/gtp/}. The available commands in
|
||||
GNU Go may always be listed using the command @command{list_commands}.
|
||||
They are also documented in @xref{GTP command reference}.
|
||||
|
||||
|
||||
@node GTP applications
|
||||
@section GTP applications
|
||||
|
||||
GTP is an asymmetric protocol involving two parties which we call
|
||||
controller and engine. The controller sends all commands and the engine
|
||||
only responds to these commands. GNU Go implements the engine end of the
|
||||
protocol.
|
||||
|
||||
With the source code of GNU Go is also distributed a number of
|
||||
applications implementing the controller end. Among the most interesting of
|
||||
these are:
|
||||
|
||||
@itemize
|
||||
@item @file{regression/regress.awk}
|
||||
@quotation
|
||||
Script to run regressions. The script sends GTP commands to set up and
|
||||
evaluate positions to the engine and then analyzes the responses from
|
||||
the engine. More information about GTP based regression testing can be
|
||||
found in the regression chapter (@pxref{Regression}).
|
||||
@end quotation
|
||||
@item @file{regression/regress.pl}
|
||||
@quotation
|
||||
Perl script to run regressions, giving output which together with the
|
||||
CGI script @file{regression/regress.plx} generates HTML views of the
|
||||
regressions.
|
||||
@end quotation
|
||||
@item @file{regression/regress.pike}
|
||||
@quotation
|
||||
Pike script to run regressions. More feature-rich and powerful than
|
||||
@file{regress.awk}.
|
||||
@end quotation
|
||||
@item @file{regression/view.pike}
|
||||
@quotation
|
||||
Pike script to examine a single regression testcase through a graphical
|
||||
board. This gives an easy way to inspect many of the GNU Go internals.
|
||||
@end quotation
|
||||
@item @file{interface/gtp_examples/twogtp}
|
||||
@quotation
|
||||
Perl script to play two engines against each other. The script
|
||||
essentially sets up both engines with desired boardsize, handicap, and
|
||||
komi, then relays moves back and forth between the engines.
|
||||
@end quotation
|
||||
@item @file{interface/gtp_examples/twogtp-a}
|
||||
@quotation
|
||||
An alternative Perl implementation of twogtp.
|
||||
@end quotation
|
||||
@item @file{interface/gtp_examples/twogtp.py}
|
||||
@quotation
|
||||
Implementation of twogtp in Python. Has more features than the Perl
|
||||
variants.
|
||||
@end quotation
|
||||
@item @file{interface/gtp_examples/twogtp.pike}
|
||||
@quotation
|
||||
Implementation of twogtp in Pike. Has even more features than the Python
|
||||
variant.
|
||||
@end quotation
|
||||
@item @file{interface/gtp_examples/2ptkgo.pl}
|
||||
@quotation
|
||||
Variation of twogtp which includes a graphical board.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
More GTP applications, including bridges to go servers and graphical
|
||||
user interfaces, are listed at
|
||||
@url{http://www.lysator.liu.se/~gunnar/gtp/}.
|
||||
|
||||
@node The Metamachine
|
||||
@section The Metamachine
|
||||
|
||||
An interesting application of the GTP is the concept of
|
||||
using GNU Go as an ``Oracle'' that can be consulted by another
|
||||
process. This could be another computer program that asks GNU Go
|
||||
to generate future board positions, then evaluate them.
|
||||
|
||||
David Doshay at the University of California at Santa Cruz has done
|
||||
interesting experiments with a parallel engine, known as SlugGo, that is based
|
||||
on GNU Go. These are described in
|
||||
@url{http://lists.gnu.org/archive/html/gnugo-devel/2004-08/msg00060.html}.
|
||||
|
||||
The ``Metamachine'' experiment is a more modest approach using the GTP to
|
||||
communicate with a GNU Go process that is used as an oracle. The following
|
||||
scheme is used.
|
||||
|
||||
@itemize @bullet
|
||||
@item The GNU Go ``oracle'' is asked to generate its top moves using
|
||||
the GTP @code{top_moves} commands.
|
||||
@item Both moves are tried and @code{estimate_score} is called
|
||||
from the resulting board position.
|
||||
@item The higher scoring position is selected as the engine's move.
|
||||
@end itemize
|
||||
|
||||
This scheme does not produce a stronger engine, but it is
|
||||
suggestive, and the SlugGo experiment seems to show that a
|
||||
more elaborate scheme along the same lines could produce
|
||||
a stronger engine.
|
||||
|
||||
Two implementations are distributed with GNU Go. Both make use of
|
||||
@command{fork} and @command{pipe} system calls, so they require a Unix-like
|
||||
environment. The Metamachine has been tested under GNU/Linux.
|
||||
|
||||
@strong{Important:} If the Metamachine terminates normally, the GNU Go
|
||||
process will be killed. However there is a danger that
|
||||
something will go wrong. When you are finished running the
|
||||
Metamachine, it is a good idea to run @command{ps -A|grep gnugo}
|
||||
or @command{ps -aux|grep gnugo} to make sure there are no
|
||||
unterminated processes. (If there are, just kill them.)
|
||||
|
||||
@subsection The Standalone Metamachine
|
||||
|
||||
In @file{interface/gtp_examples/metamachine.c} is a standalone
|
||||
implementation of the Metamachine. Compile it with
|
||||
@command{cc -o metamachine metamachine.c} and run it. It forks
|
||||
a @code{gnugo} process with which it communicates through the
|
||||
GTP, to use as an oracle.
|
||||
|
||||
The following scheme is followed:
|
||||
|
||||
@example
|
||||
stdin pipe a
|
||||
GTP client ----> Metamachine -----> GNU Go
|
||||
<---- <-----
|
||||
stdout pipe b
|
||||
@end example
|
||||
|
||||
Most commands issued by the client are passed along
|
||||
verbatim to GNU Go by the Metamachine. The exception
|
||||
is gg_genmove, which is intercepted then processed differently,
|
||||
as described above. The client is unaware of this, and only
|
||||
knows that it issued a gg_genmove command and received a reply.
|
||||
Thus to the the Metamachine appears as an ordinary GTP engine.
|
||||
|
||||
Usage: no arguments gives normal GTP behavior.
|
||||
@command{metamachine --debug} sends diagnostics to stderr.
|
||||
|
||||
@subsection GNU Go as a Metamachine
|
||||
|
||||
Alternatively, you may compile GNU Go with the configure option
|
||||
@option{--enable-metamachine}. This causes the file
|
||||
@code{oracle.c} to be compiled, which contains the Metamachine
|
||||
code. This has no effect on the engine unless you run GNU
|
||||
Go with the runtime option @option{--metamachine}. Thus
|
||||
you must use both the configure and the runtime option
|
||||
to get the Metamachine.
|
||||
|
||||
This method is better than the standalone program since
|
||||
you have access to GNU Go's facilities. For example, you
|
||||
can run the Metamachine with CGoban or in Ascii mode this
|
||||
way.
|
||||
|
||||
You can get traces by adding the command line
|
||||
@option{-d0x1000000}. In debugging the Metamachine, a danger is
|
||||
that any small oversight in designing the program can cause the
|
||||
forked process and the controller to hang, each one waiting for
|
||||
a response from the other. If this seems to happen it is useful
|
||||
to know that you can attach @code{gdb} to a running process and
|
||||
find out what it is doing.
|
||||
|
||||
@node Adding new GTP commands
|
||||
@section Adding new GTP commands
|
||||
|
||||
The implementation of GTP in GNU Go is distributed over three files,
|
||||
@file{interface/gtp.h}, @file{interface/gtp.c}, and
|
||||
@file{interface/play_gtp.c}. The first two implement a small library of
|
||||
helper functions which can be used also by other programs. In the
|
||||
interest of promoting the GTP they are licensed with minimal
|
||||
restrictions (@pxref{GTP License}). The actual GTP commands are
|
||||
implemented in @file{play_gtp.c}, which has knowledge about the engine
|
||||
internals.
|
||||
|
||||
To see how a simple but fairly typical command is implemented we look at
|
||||
@code{gtp_countlib()} (a GNU Go private extension command):
|
||||
|
||||
@example
|
||||
static int
|
||||
gtp_countlib(char *s)
|
||||
@{
|
||||
int i, j;
|
||||
if (!gtp_decode_coord(s, &i, &j))
|
||||
return gtp_failure("invalid coordinate");
|
||||
|
||||
if (BOARD(i, j) == EMPTY)
|
||||
return gtp_failure("vertex must not be empty");
|
||||
|
||||
return gtp_success("%d", countlib(POS(i, j)));
|
||||
@}
|
||||
@end example
|
||||
|
||||
The arguments to the command are passed in the string @code{s}. In this
|
||||
case we expect a vertex as argument and thus try to read it with
|
||||
@code{gtp_decode_coord()} from @file{gtp.c}.
|
||||
|
||||
A correctly formatted response should start with either @samp{=} or
|
||||
@samp{?}, followed by the identity number (if one was sent), the actual
|
||||
result, and finally two consecutive newlines. It is important to get
|
||||
this formatting correct since the controller in the other end relies on
|
||||
it. Naturally the result itself cannot contain two consecutive newlines
|
||||
but it may be split over several lines by single newlines.
|
||||
|
||||
The easiest way to generate a correctly formatted response is with one
|
||||
of the functions @code{gtp_failure()} and @code{gtp_success()}, assuming
|
||||
that their formatted output does not end with a newline.
|
||||
|
||||
Sometimes the output is too complex for use with gtp_success, e.g. if
|
||||
we want to print vertices, which gtp_success() does not
|
||||
support. Then we have to fall back to the construction in e.g.
|
||||
@code{gtp_genmove()}:
|
||||
|
||||
@example
|
||||
static int
|
||||
gtp_genmove(char *s)
|
||||
@{
|
||||
[...]
|
||||
gtp_start_response(GTP_SUCCESS);
|
||||
gtp_print_vertex(i, j);
|
||||
return gtp_finish_response();
|
||||
@}
|
||||
@end example
|
||||
|
||||
Here @code{gtp_start_response()} writes the equal sign and the identity
|
||||
number while @code{gtp_finish_response()} adds the final two newlines.
|
||||
The next example is from @code{gtp_list_commands()}:
|
||||
|
||||
@example
|
||||
static int
|
||||
gtp_list_commands(char *s)
|
||||
@{
|
||||
int k;
|
||||
UNUSED(s);
|
||||
|
||||
gtp_start_response(GTP_SUCCESS);
|
||||
|
||||
for (k = 0; commands[k].name != NULL; k++)
|
||||
gtp_printf("%s\n", commands[k].name);
|
||||
|
||||
gtp_printf("\n");
|
||||
return GTP_OK;
|
||||
@}
|
||||
@end example
|
||||
|
||||
As we have said, the response should be finished with two newlines.
|
||||
Here we have to finish up the response ourselves since we already have
|
||||
one newline in place from the last command printed in the loop.
|
||||
|
||||
In order to add a new GTP command to GNU Go, the following pieces of
|
||||
code need to be inserted in @file{play_gtp.c}:
|
||||
@enumerate
|
||||
@item A function declaration using the @code{DECLARE} macro in the list
|
||||
starting at line 68.
|
||||
@item An entry in the @code{commands[]} array starting at line 200.
|
||||
@item An implementation of the function handling the command.
|
||||
@end enumerate
|
||||
|
||||
Useful helper functions in @file{gtp.c}/@file{gtp.h} are:
|
||||
@itemize
|
||||
@item @code{gtp_printf()} for basic formatted printing.
|
||||
@item @code{gtp_mprintf()} for printing with special format codes for
|
||||
vertices and colors.
|
||||
@item @code{gtp_success()} and @code{gtp_failure()} for simple responses.
|
||||
@item @code{gtp_start_response()} and @code{gtp_end_response()} for more
|
||||
complex responses.
|
||||
@item @code{gtp_print_vertex()} and @code{gtp_print_vertices()} for
|
||||
printing one or multiple vertices.
|
||||
@item @code{gtp_decode_color()} to read in a color from the command arguments.
|
||||
@item @code{gtp_decode_coord()} to read in a vertex from the command arguments.
|
||||
@item @code{gtp_decode_move()} to read in a move, i.e. color plus
|
||||
vertex, from the command arguments.
|
||||
@end itemize
|
||||
|
||||
|
||||
@node GTP command reference
|
||||
@section GTP command reference
|
||||
@cindex GTP command reference
|
||||
|
||||
This section lists the GTP commands implemented in GNU Go along with
|
||||
some information about each command. Each entry in the list has the
|
||||
following fields:
|
||||
|
||||
@itemize @bullet
|
||||
@item Function: What this command does.
|
||||
@item Arguments: What other information, if any, this command requires.
|
||||
Typical values include @dfn{none} or @dfn{vertex} or @dfn{integer} (there
|
||||
are others).
|
||||
@item Fails: Circumstances which cause this command to fail.
|
||||
@item Returns: What is displayed after the @dfn{=} and before the two
|
||||
newlines. Typical values include @dfn{nothing} or @dfn{a move coordinate}
|
||||
or some status string (there are others).
|
||||
@item Status: How this command relates to the standard GTP version 2
|
||||
commands. If nothing else is specified it is a GNU Go private extension.
|
||||
@end itemize
|
||||
|
||||
Without further ado, here is the big list (in no particular order).
|
||||
|
||||
Note: if new commands are added by editing @file{interface/play_gtp.c} this
|
||||
list could become incomplete. You may rebuild this list in
|
||||
@file{doc/gtp-commands.texi} with the command @command{make gtp-commands}
|
||||
in the @file{doc/} directory. This may require GNU sed.
|
||||
|
||||
@itemize @bullet
|
||||
@include gtp-commands.texi
|
||||
@end itemize
|
1153
gnugo/doc/influence.texi
Normal file
456
gnugo/doc/install.texi
Normal file
|
@ -0,0 +1,456 @@
|
|||
|
||||
You can get the most recent version of GNU Go ftp.gnu.org or a mirror
|
||||
(see @url{http://www.gnu.org/order/ftp.html} for a list). You can read
|
||||
about newer versions and get other information at
|
||||
@url{http://www.gnu.org/software/gnugo/}.
|
||||
|
||||
@menu
|
||||
* GNU/Linux and Unix:: GNU Linux and Unix Installation
|
||||
* Configure Options:: Configure Options
|
||||
* Windows and MS-DOS:: Windows Installation
|
||||
* Macintosh:: Macintosh Installation
|
||||
@end menu
|
||||
|
||||
@node GNU/Linux and Unix, Configure Options, ,Installation
|
||||
@section GNU/Linux and Unix
|
||||
@cindex installation
|
||||
|
||||
Untar the sources, change to the directory gnugo-3.8. Now do:
|
||||
|
||||
@example
|
||||
./configure [OPTIONS]
|
||||
make
|
||||
@end example
|
||||
|
||||
Several configure options will be explained in the next section. You do not
|
||||
need to set these unless you are dissatisfied with GNU Go's performance or
|
||||
wish to vary the experimental options.
|
||||
|
||||
As an example,
|
||||
|
||||
@example
|
||||
./configure --enable-level=9 --enable-cosmic-gnugo
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
will make a binary in which the default level is 9, and the experimental
|
||||
``cosmic''' option is enabled. A list of all configure options can be
|
||||
obtained by running @command{./configure --help}. Further information
|
||||
about the experimental options can be found in the next section
|
||||
(@pxref{Configure Options}).
|
||||
|
||||
After running configure and make, you have now made a binary called
|
||||
@file{interface/gnugo}. Now (running as root) type
|
||||
|
||||
@example
|
||||
make install
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
to install @file{gnugo} in @file{/usr/local/bin}.
|
||||
|
||||
There are different methods of using GNU Go. You may run it from the
|
||||
command line by just typing:
|
||||
|
||||
@example
|
||||
gnugo
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
but it is nicer to run it using CGoban 1 (under X Window System),
|
||||
Quarry, Jago (on any platform with a Java Runtime Environment) or other
|
||||
client programs offering a GUI.
|
||||
|
||||
You can get the most recent version of CGoban 1 from
|
||||
@url{http://sourceforge.net/projects/cgoban1/}. The earlier version
|
||||
1.12 is available from @url{http://www.igoweb.org/~wms/comp/cgoban/index.html}.
|
||||
The CGoban version number MUST be 1.9.1 at least or it won't work. CGoban 2
|
||||
will not work.
|
||||
|
||||
@xref{CGoban}, for instructions on how to run GNU Go from Cgoban, or
|
||||
@xref{Other Clients}, for Jago or other clients.
|
||||
|
||||
Quarry is available at @url{http://home.gna.org/quarry/}.
|
||||
|
||||
@node Configure Options
|
||||
@section Configure Options
|
||||
|
||||
There are three options which you should consider configuring,
|
||||
particularly if you are dissatisfied with GNU Go's performance.
|
||||
|
||||
@menu
|
||||
* Ram Cache:: Ram Cache
|
||||
* Default Level:: Default Level
|
||||
* Other Options:: Other Options
|
||||
@end menu
|
||||
|
||||
@node Ram Cache
|
||||
@subsection Ram Cache
|
||||
|
||||
By default, GNU Go makes a cache of about 8 Megabytes in RAM for its
|
||||
internal use. The cache is used to store intermediate results during
|
||||
its analysis of the position. More precisely the default cache size is
|
||||
350000 entries, which translates to 8.01 MB on typical 32 bit
|
||||
platforms and 10.68 MB on typical 64 bit platforms.
|
||||
|
||||
Increasing the cache size will often give a modest speed improvement.
|
||||
If your system has lots of RAM, consider increasing the cache
|
||||
size. But if the cache is too large, swapping will occur,
|
||||
causing hard drive accesses and degrading performance. If
|
||||
your hard drive seems to be running excessively your cache
|
||||
may be too large. On GNU/Linux systems, you may detect swapping
|
||||
using the program 'top'. Use the 'f' command to toggle SWAP
|
||||
display.
|
||||
|
||||
You may override the size of the default cache at compile time
|
||||
by running one of:
|
||||
|
||||
@example
|
||||
./configure --enable-cache-size=n
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
to set the cache size to @code{n} megabytes. For example
|
||||
|
||||
@example
|
||||
./configure --enable-cache-size=32
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
creates a cache of size 32 megabytes. If you omit this, your default
|
||||
cache size will be 8-11 MB as discussed above. Setting cache size
|
||||
negative also gives the default size. You must recompile and reinstall
|
||||
GNU Go after reconfiguring it by running @command{make} and
|
||||
@command{make install}.
|
||||
|
||||
You may override the compile-time defaults by running @file{gnugo}
|
||||
with the option @option{--cache-size n}, where @code{n} is the size in
|
||||
megabytes of the cache you want, and @option{--level} where n is the
|
||||
level desired. We will discuss setting these parameters next in
|
||||
detail.
|
||||
|
||||
@node Default Level
|
||||
@subsection Default Level
|
||||
|
||||
GNU Go can play at different levels. Up to level 10 is
|
||||
supported. At level 10 GNU Go is much more accurate but takes
|
||||
an average of about 1.6 times longer to play than at level 8.
|
||||
|
||||
The level can be set at run time using the @option{--level} option.
|
||||
If you don't set this, the default level will be used. You
|
||||
can set the default level with the configure option
|
||||
@option{--enable-level=n}. For example
|
||||
|
||||
@example
|
||||
./configure --enable-level=9
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
sets the default level to 9. If you omit this parameter,
|
||||
the compiler sets the default level to 10. We recommend
|
||||
using level 10 unless you find it too slow. If you decide
|
||||
you want to change the default you may rerun configure
|
||||
and recompile the program.
|
||||
|
||||
@node Other Options
|
||||
@subsection Other Options
|
||||
|
||||
Anything new in the engine is generally tested as an experimental option
|
||||
which can be turned on or off at compile time or run time. Some
|
||||
``experimental'' options such as the break-in code are no longer
|
||||
experimental but are enabled by default.
|
||||
|
||||
This section can be skipped unless you are interested in the
|
||||
experimental options.
|
||||
|
||||
Moreover, some configure options were removed from the stable
|
||||
release. For example it is known that the owl extension code
|
||||
can cause crashes, so the configure option --enable-experimental-owl-ext
|
||||
was disabled for 3.8.
|
||||
|
||||
The term ``default'' must be clarified, since there
|
||||
are really two sets of defaults at hand, runtime defaults
|
||||
specified in @file{config.h} and compile time default
|
||||
values for the runtime defaults, contained in @file{configure}
|
||||
(which is created by editing @file{configure.in} then running
|
||||
@command{autoconf}. For example we find in @file{config.h}
|
||||
|
||||
@example
|
||||
/* Center oriented influence. Disabled by default. */
|
||||
#define COSMIC_GNUGO 0
|
||||
|
||||
/* Break-in module. Enabled by default. */
|
||||
#define USE_BREAK_IN 1
|
||||
@end example
|
||||
|
||||
This means that the experimental cosmic option, which causes
|
||||
GNU Go to play a center-oriented game (and makes the engine
|
||||
weaker) is disabled by default, but that the break-in module
|
||||
is used. These are defaults which are used when GNU Go is
|
||||
run without command line options. They can be overridden
|
||||
with the run time options:
|
||||
|
||||
@example
|
||||
gnugo --cosmic-gnugo --without-break-in
|
||||
@end example
|
||||
|
||||
Alternatively you can configure GNU Go as follows:
|
||||
|
||||
@example
|
||||
./configure --enable-cosmic-gnugo --disable-experimental-break-in
|
||||
@end example
|
||||
|
||||
then recompile GNU Go. This changes the defaults in @file{config.h},
|
||||
so that you do not have to pass any command line options to GNU Go
|
||||
at run time to get the experimental owl extension turned on and
|
||||
the experimental break-in code turned off.
|
||||
|
||||
If you want to find out what experimental options were compiled into your GNU
|
||||
Go binary you can run @command{gnugo --options} to find out. Here is a list
|
||||
of experimental options in GNU Go.
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{experimental-break-in}. Experimental break-in code
|
||||
(@pxref{Break Ins}). You should not need to configure this because
|
||||
the break in code is enabled by default in level 10, and is turned
|
||||
off at level 9. If you don't want the breakin code just play at
|
||||
level 9.
|
||||
@item @code{cosmic-gnugo}. An experimental style which plays a center
|
||||
oriented game and has a good winning rate against standard GNU Go,
|
||||
though it makes GNU Go weaker against other opponents.
|
||||
@item @code{large-scale}. Attempt to make large-scale captures.
|
||||
See:
|
||||
|
||||
@url{http://lists.gnu.org/archive/html/gnugo-devel/2003-07/msg00209.html}
|
||||
|
||||
for the philosophy of this option. This option makes the engine slower.
|
||||
@item @code{metamachine}. Enables the metamachine, which allows
|
||||
you to run the engine in an experimental mode whereby it forks
|
||||
a new @code{gnugo} process which acts as an ``oracle.'' Has no
|
||||
effect unless combined with the @option{--metamachine} run-time
|
||||
option.
|
||||
@end itemize
|
||||
|
||||
Other options are not experimental, and can be changed as
|
||||
configure or runtime options.
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{chinese-rules} Use Chinese (area) counting.
|
||||
@item @code{resignation-allowed} Allow GNU Go to resign games.
|
||||
This is on by default.
|
||||
@end itemize
|
||||
|
||||
@node Windows and MS-DOS, Macintosh, Configure Options, Installation
|
||||
@section Compiling GNU Go on Microsoft platforms
|
||||
|
||||
@subsection Building with older visual studio
|
||||
|
||||
The distribution directories contain some .dsp and .dsw files with
|
||||
GNU Go. These have been brought up to date in the sense that they
|
||||
should work if you have the older VC++ with Visual Studio 6
|
||||
but the distributed .dsp and .dsw files will only be of use with
|
||||
older version of Visual Studio.
|
||||
|
||||
In most cases (unless you are building in Cygwin) the preferred way
|
||||
to build GNU Go on Windows platforms is to use CMake. CMake
|
||||
understands about many versions of Visual C/Visual Studio, and will
|
||||
generate project/solution files for the tools installed on your
|
||||
system. So even if you have Visual Studio 6 you may use CMake
|
||||
and dispense with the distributed .dsp and .dsw files.
|
||||
|
||||
@subsection Building with Visual Studio project files
|
||||
|
||||
Before you compile the GNU Go source, you need to run CMake first, to
|
||||
generate the build files you'll give to Visual Studio.
|
||||
|
||||
From the cmd.exe command prompt, CD into the GNU Go source directory.
|
||||
To confirm you're in the right place, you should see the file
|
||||
'CMakeLists.txt' in the top-level directory of the GNU Go code (as well
|
||||
as others in lower subdirectories).
|
||||
|
||||
Direct CMake to generate the new Visual Studio build files by typing:
|
||||
|
||||
@example
|
||||
cmake CMakeLists.txt
|
||||
@end example
|
||||
|
||||
Compile the code by invoking the newly-created Solution file:
|
||||
|
||||
@example
|
||||
vcbuild GNUGo.sln
|
||||
@end example
|
||||
|
||||
This will take a few moments, as CMake generates 4 debug/retail targets:
|
||||
|
||||
@example
|
||||
debug
|
||||
release
|
||||
minsizerel
|
||||
relwithdebinfo
|
||||
@end example
|
||||
|
||||
For each of these targets, Visual Studio is generating a version of
|
||||
gnugo.exe:
|
||||
|
||||
@example
|
||||
interface\debug\gnugo.exe
|
||||
interface\release\gnugo.exe
|
||||
interface\minsizerel\gnugo.exe
|
||||
interface\relwithdebinfo\gnugo.exe
|
||||
@end example
|
||||
|
||||
Additionally, there is an 'Install' target available, that will copy the
|
||||
the gnugo.exe into the %ProgramFiles% directory. To do this, type:
|
||||
|
||||
@example
|
||||
vcbuild INSTALL.vcproj
|
||||
@end example
|
||||
|
||||
This should result in copying GNU/Go into:
|
||||
|
||||
@example
|
||||
"%ProgramFiles%\GNUGo\bin\gnugo.exe" --options
|
||||
@end example
|
||||
|
||||
In addition to command line use, CMake also has a GUI version. Users of
|
||||
the Visual Studio GUI might prefer to use that.
|
||||
|
||||
@subsection Building with Nmake makefiles
|
||||
|
||||
GNU Go will also build using NMake makefiles. Optionally, instead of
|
||||
Visual Studio project/solution files, you may direct CMake to generate
|
||||
NMake makefiles. To generate the makefiles:
|
||||
|
||||
@example
|
||||
cmake -G "NMake Makefiles" CMakeLists.txt
|
||||
@end example
|
||||
|
||||
The default rule for the makefile is 'all'. Use the 'help' rule to show
|
||||
a list of available targets.
|
||||
|
||||
@example
|
||||
nmake -f Makefile help
|
||||
@end example
|
||||
|
||||
To compile GNU Go:
|
||||
|
||||
@example
|
||||
nmake -f Makefil, all
|
||||
@end example
|
||||
|
||||
One sysand 2009 tems, GNU GO may fail to build when using NMake makefiles.
|
||||
only fails the first time run, run NMake again with the 'clean all'
|
||||
targets, and it will compile the second and subsequent times.
|
||||
|
||||
@example
|
||||
nmake -f Makefile clean all
|
||||
@end example
|
||||
|
||||
Which will successfully generate a gnugo.exe.
|
||||
|
||||
@example
|
||||
interface\gnugo.exe --options
|
||||
@end example
|
||||
|
||||
@subsection Building with MinGW Makefiles
|
||||
|
||||
GNU Go can be built on Windows systems using MinGW.
|
||||
|
||||
This development environment uses: the GCC compiler (gcc.exe, not
|
||||
cl.exe), the Microsoft C runtime libraries (MSCRT, not GLibC), the GNU
|
||||
Make build tool (@code{mingw32-make.exe}, not NMake), all from the Windows
|
||||
shell (@code{cmd.exe}, not sh/bash).
|
||||
|
||||
For CMake to work, in addition to the base MinGW installation, the C++
|
||||
compiler (g++.exe) and GNU Make (mingw32-make.exe) need to be installed.
|
||||
This was tested using GCC v3, not the experimental v4. To debug, use
|
||||
GDB, as the GCC-generated symbols won't work with NTSD/Windbg/Visual Studio.
|
||||
|
||||
To create the makfiles, run CMake with the MinGW generator option:
|
||||
|
||||
@example
|
||||
cmake -G "MinGW Makefiles" CMakeLists.txt
|
||||
@end example
|
||||
|
||||
To build GNU Go, from a cmd.exe shell, run GNU Make (against the
|
||||
newly-created 'Makefile' and it's default 'all' target):
|
||||
|
||||
@example
|
||||
mingw32-make
|
||||
..\interface\gnugo.exe --options
|
||||
@end example
|
||||
|
||||
@subsection Building with MSYS makefiles (MinGW)
|
||||
|
||||
GNU Go can be built on Windows systems using MSYS.
|
||||
|
||||
This development environment uses: the GCC compiler (gcc.exe, not
|
||||
cl.exe), the Microsoft C runtime libraries (MSCRT, not GLibC), the GNU
|
||||
Make build tool (make, not NMake), all from the GNU Bash (sh.exe, not
|
||||
cmd.exe).
|
||||
|
||||
To create the makfiles, run CMake with the MSYS generator option:
|
||||
|
||||
@example
|
||||
cmake -G "MSYS Makefiles" CMakeLists.txt
|
||||
@end example
|
||||
|
||||
Start MSYS's Bash shell, either clicking on a shortcut on from the
|
||||
command line:
|
||||
|
||||
@example
|
||||
cd /d c:\msys\1.0
|
||||
msys.bat
|
||||
@end example
|
||||
|
||||
To build GNU Go, from a Bash shell, run GNU Make (against the
|
||||
newly-created 'Makefile' and it's default 'all' target):
|
||||
|
||||
@example
|
||||
make
|
||||
../interface/gnugo.exe --options
|
||||
@end example
|
||||
|
||||
To debug, use GDB, as the GCC-generated symbols won't work with
|
||||
NTSD/Windbg/Visual Studio.
|
||||
|
||||
@subsection Building on cygwin
|
||||
|
||||
With Cygwin, you should be able to
|
||||
|
||||
@example
|
||||
tar zxvf gnugo-3.8.tar.gz
|
||||
cd gnugo-3.8
|
||||
env CC='gcc -mno-cygwin' ./configure
|
||||
make
|
||||
@end example
|
||||
|
||||
@subsection Testing on Windows:
|
||||
|
||||
@file{regression/regress.cmd} is a simplified cmd.exe-centric port of the main
|
||||
gnugo Unix shell script regress.sh. It can be used to help verify that the
|
||||
generated binary might be operational. Read the script's comment header for
|
||||
more information. For access to the full GNU Go tests, use Unix, not Windows.
|
||||
|
||||
To test:
|
||||
|
||||
@example
|
||||
cd regression
|
||||
regress.cmd ..\interface\gnugo.exe
|
||||
@end example
|
||||
|
||||
@node Macintosh
|
||||
@section Macintosh
|
||||
|
||||
If you have Mac OS X you can build GNU Go using Apple's compiler,
|
||||
which is derived from GCC. You will need Xcode.
|
||||
|
||||
One issue is that the configure test for socket support is
|
||||
too conservative. On OS/X, the configure test fails, but
|
||||
actually socket support exists. So if you want to be able
|
||||
to connect to the engine through tcp/ip (using gtp) you
|
||||
may @command{configure --enable-socket-support}. There
|
||||
will be an error message but you may build the engine
|
||||
and socket support should work.
|
||||
|
||||
|
177
gnugo/doc/introduction.texi
Normal file
|
@ -0,0 +1,177 @@
|
|||
|
||||
This is GNU Go 3.8, a Go program. Development versions of GNU Go may be
|
||||
found at @url{http://www.gnu.org/software/gnugo/devel.html}. Contact
|
||||
us at @email{gnugo@@gnu.org} if you are interested in helping.
|
||||
|
||||
@menu
|
||||
* About:: About GNU Go and this Manual
|
||||
* Copyright:: Copyright
|
||||
* Authors:: The Authors of GNU Go
|
||||
* Thanks:: Acknowledgements
|
||||
* Development:: Developing GNU Go
|
||||
@end menu
|
||||
|
||||
@node About
|
||||
@section About GNU Go and this Manual
|
||||
|
||||
The challenge of Computer Go is not to @strong{beat} the computer,
|
||||
but to @strong{program} the computer.
|
||||
|
||||
In Computer Chess, strong programs are capable of playing at the highest
|
||||
level, even challenging such a player as Garry Kasparov. No Go program
|
||||
exists that plays at the same level as the strongest human players.
|
||||
|
||||
To be sure, existing Go programs are strong enough to be interesting
|
||||
as opponents, and the hope exists that some day soon a truly
|
||||
strong program can be written. This is especially true in view
|
||||
of the successes of Monte Carlo methods, and a general recent
|
||||
improvement of computer Go.
|
||||
|
||||
Before GNU Go, Go programs have always been distributed as binaries
|
||||
only. The algorithms in these proprietary programs are secret. No-one
|
||||
but the programmer can examine them to admire or criticise. As a
|
||||
consequence, anyone who wished to work on a Go program usually had to
|
||||
start from scratch. This may be one reason that Go programs have not
|
||||
reached a higher level of play.
|
||||
|
||||
Unlike most Go programs, GNU Go is Free Software. Its algorithms and
|
||||
source code are open and documented. They are free for any one to
|
||||
inspect or enhance. We hope this freedom will give GNU Go's descendents
|
||||
a certain competetive advantage.
|
||||
|
||||
Here is GNU Go's Manual. There are doubtless inaccuracies. The ultimate
|
||||
documentation is in the commented source code itself.
|
||||
|
||||
The first three chapters of this manual are for the general
|
||||
user. Chapter 3 is the User's Guide. The rest of the book is for
|
||||
programmers, or persons curious about how GNU Go works. Chapter 4 is a
|
||||
general overview of the engine. Chapter 5 introduces various tools for
|
||||
looking into the GNU Go engine and finding out why it makes a certain
|
||||
move, and Chapters 6--7 form a general programmer's reference to the GNU
|
||||
Go API. The remaining chapters are more detailed explorations of
|
||||
different aspects of GNU Go's internals.
|
||||
|
||||
@node Copyright
|
||||
@section Copyrights
|
||||
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
and 2008 by the Free Software Foundation except as noted below.
|
||||
|
||||
All source files are distributed under the GNU General Public License
|
||||
(@pxref{GPL}, version 3 or any later version), except @file{gmp.c},
|
||||
@file{gmp.h}, @file{gtp.c}, and @file{gtp.h}.
|
||||
|
||||
The files @file{gtp.c} and @file{gtp.h} are copyright the Free Software
|
||||
Foundation. In the interests of promoting the Go Text Protocol these
|
||||
two files are licensed under a less restrictive license than the GPL
|
||||
and are free for unrestricted use (@pxref{GTP License}).
|
||||
|
||||
The two files @file{gmp.c} and @file{gmp.h} were placed in the public domain
|
||||
by William Shubert, their author, and are free for unrestricted use.
|
||||
|
||||
Documentation files (including this manual) are distributed under
|
||||
the GNU Free Documentation License (@pxref{GFDL}, version 1.3 or any later
|
||||
version).
|
||||
|
||||
The files @file{regression/games/golois/*sgf} are copyright Tristan
|
||||
Cazenave and are included with his permission.
|
||||
|
||||
The SGF files in @file{regression/games/handtalk/} are copyright Jessie Annala
|
||||
and are used with permission.
|
||||
|
||||
The SGF files in @file{regression/games/mertin13x13/} are copyright Stefan
|
||||
Mertin and are used with permission.
|
||||
|
||||
The remaining SGF files are either copyright by the FSF or are in the public domain.
|
||||
|
||||
|
||||
|
||||
|
||||
@node Authors
|
||||
@section Authors
|
||||
|
||||
GNU Go maintainers are Daniel Bump, Gunnar Farneback and Arend
|
||||
Bayer. GNU Go authors (in chronological order of contribution)
|
||||
are Man Li, Wayne Iba, Daniel Bump, David Denholm, Gunnar
|
||||
Farneb@"ack, Nils Lohner, Jerome Dumonteil, Tommy Thorn,
|
||||
Nicklas Ekstrand, Inge Wallin, Thomas Traber, Douglas Ridgway,
|
||||
Teun Burgers, Tanguy Urvoy, Thien-Thi Nguyen, Heikki Levanto,
|
||||
Mark Vytlacil, Adriaan van Kessel, Wolfgang Manner, Jens
|
||||
Yllman, Don Dailey, M@aa{}ns Ullerstam, Arend Bayer, Trevor
|
||||
Morris, Evan Berggren Daniel, Fernando Portela, Paul
|
||||
Pogonyshev, S.P. Lee and Stephane Nicolet, Martin Holters,
|
||||
Grzegorz Leszczynski and Lee Fisher.
|
||||
|
||||
@node Thanks
|
||||
@section Thanks
|
||||
|
||||
We would like to thank Arthur Britto, David Doshay, Tim Hunt, Matthias Krings,
|
||||
Piotr Lakomy, Paul Leonard, Jean-Louis Martineau, Andreas Roever and Pierce
|
||||
Wetter for helpful correspondence.
|
||||
|
||||
Thanks to everyone who stepped on a bug (and sent us a report)!
|
||||
|
||||
Thanks to Gary Boos, Peter Gucwa, Martijn van der Kooij, Michael
|
||||
Margolis, Trevor Morris, M@aa{}ns Ullerstam, Don Wagner and Yin Zheng for help
|
||||
with Visual C++.
|
||||
|
||||
Thanks to Alan Crossman, Stephan Somogyi, Pierce Wetter and Mathias Wagner
|
||||
for help with Macintosh. And thanks to Marco Scheurer and Shigeru Mabuchi for
|
||||
helping us find various problems.
|
||||
|
||||
Thanks to Jessie Annala for the Handtalk games.
|
||||
|
||||
Special thanks to Ebba Berggren for creating our logo, based on a
|
||||
design by Tanguy Urvoy and comments by Alan Crossman. The old
|
||||
GNU Go logo was adapted from Jamal Hannah's typing GNU:
|
||||
@url{http://www.gnu.org/graphics/atypinggnu.html}.
|
||||
Both logos can be found in @file{doc/newlogo.*} and @file{doc/oldlogo.*}.
|
||||
|
||||
We would like to thank Stuart Cracraft, Richard Stallman and Man Lung Li for
|
||||
their interest in making this program a part of GNU, William Shubert for
|
||||
writing CGoban and gmp.c, Rene Grothmann for Jago and Erik van Riper and his
|
||||
collaborators for NNGS.
|
||||
|
||||
|
||||
@node Development
|
||||
@section Development
|
||||
|
||||
You can help make GNU Go the best Go program.
|
||||
|
||||
This is a task-list for anyone who is interested in helping with GNU
|
||||
Go. If you want to work on such a project you should correspond with
|
||||
us until we reach a common vision of how the feature will work!
|
||||
|
||||
A note about copyright. The Free Software Foundation has the copyright
|
||||
to GNU Go. For this reason, before any code can be accepted as a part of
|
||||
the official release of GNU Go, the Free Software Foundation will want
|
||||
you to sign a copyright assignment.
|
||||
|
||||
Of course you could work on a forked version without signing
|
||||
such a disclaimer. You can also distribute such a forked version of the
|
||||
program so long as you also distribute the source code to your
|
||||
modifications under the GPL (@pxref{GPL}). But if you want
|
||||
your changes to the program to be incorporated into the
|
||||
version we distribute we need you to assign the copyright.
|
||||
|
||||
Please contact the GNU Go maintainers, Daniel Bump
|
||||
(@email{bump@@sporadic.stanford.edu}) and Gunnar Farneb@"ack
|
||||
(@email{gunnar@@lysator.liu.se}), to get more information and the
|
||||
papers to sign.
|
||||
|
||||
Bug reports are very welcome, but if you can, send us bug FIXES as well as bug
|
||||
reports. If you see some bad behavior, figure out what causes it, and what to
|
||||
do about fixing it. And send us a patch! If you find an interesting bug and
|
||||
cannot tell us how to fix it, we would be happy to have you tell us about it
|
||||
anyway. Send us the sgf file (if possible) and attach other relevant
|
||||
information, such as the GNU Go version number. In cases of assertion failures
|
||||
and segmentation faults we probably want to know what operating system and
|
||||
compiler you were using, in order to determine if the problem is platform
|
||||
dependent.
|
||||
|
||||
If you want to work on GNU Go you should subscribe to the
|
||||
@uref{http://lists.gnu.org/mailman/listinfo/gnugo-devel,
|
||||
GNU Go development list.} Discussion of bugs and feedback
|
||||
from established developers about new projects or tuning
|
||||
the existing engine can be done on the list.
|
||||
|
1047
gnugo/doc/logo-32.eps
Normal file
BIN
gnugo/doc/logo-32.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
1200
gnugo/doc/logo-34.eps
Normal file
BIN
gnugo/doc/logo-34.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
gnugo/doc/logo-34.pdf
Normal file
2101
gnugo/doc/logo-36.eps
Normal file
BIN
gnugo/doc/logo-36.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
gnugo/doc/logo-36.pdf
Normal file
266
gnugo/doc/montecarlo.texi
Normal file
|
@ -0,0 +1,266 @@
|
|||
@cindex Monte Carlo Go
|
||||
@cindex UCT algorithm
|
||||
In Monte Carlo Go the engine plays random games to the
|
||||
end, generating moves from a pattern database within
|
||||
the context of the algorithm UCT (upper confidence
|
||||
bounds applied to trees). This algorithm allowed the
|
||||
program MoGo (@uref{http://www.lri.fr/~gelly/MoGo.htm},
|
||||
to become the first computer program to defeat a
|
||||
professional while taking a 9 stone handicap
|
||||
(@uref{http://senseis.xmp.net/?MoGo}).
|
||||
|
||||
GNU Go 3.8 can play 9x9 Go with the option
|
||||
@option{--monte-carlo} using the UCT algorithm.
|
||||
For command line options, see @xref{Invoking GNU Go}.
|
||||
|
||||
During reading, the engine makes incremental updates
|
||||
of local 3x3 neighborhood, suicide status, self-atari
|
||||
status, and number of stones captured, for each move.
|
||||
|
||||
GNU Go's simulations (Monte Carlo games) are pattern generated.
|
||||
The random playout move generation is distributed
|
||||
strictly proportional to move values computed by table
|
||||
lookup from a local context consisting of 3x3
|
||||
neighborhood, opponent suicide status, own and
|
||||
opponent self-atari status, number of stones captured
|
||||
by own and opponent move, and closeness to the
|
||||
previous move. Let's call this local context simply "a
|
||||
pattern" and the table "pattern values" or simply
|
||||
"patterns".
|
||||
|
||||
There are three built-in databases that you can select
|
||||
using the option @option{--mc-patterns <name>}, where
|
||||
@option{<name>} is one of
|
||||
|
||||
@itemize
|
||||
@item @command{mc_montegnu_classic}
|
||||
@item @command{mc_mogo_classic}
|
||||
@item @command{mc_uniform}
|
||||
@end itemize
|
||||
|
||||
The first of these is an approximation of the previous random move
|
||||
generation algorithm. The @command{mogo_classic} pattern values is an
|
||||
approximation of the simulation policy used by early versions of MoGo,
|
||||
as published in the report @uref{http://hal.inria.fr/inria-00117266,
|
||||
odification of UCT with Patterns in Monte-Carlo Go}
|
||||
RR-6062, by Sylvain Gelly, Yizao Wang, Rémi Munos, and
|
||||
Olivier Teytaud. The uniform pattern values is the so
|
||||
called "light" playout which chooses uniformly between
|
||||
all legal moves except single point proper eyes.
|
||||
|
||||
If you're not satisfied with these you can also tune your own
|
||||
pattern values with a pattern database file and load it at runtime
|
||||
with @option{--mc-load-patterns <name>} adding your own
|
||||
pattern database.
|
||||
|
||||
Let's start with the uniform pattern values. Those are defined by the
|
||||
file @file{patterns/mc_uniform.db}, which looks like this:
|
||||
|
||||
@example
|
||||
|
||||
oOo
|
||||
O*O
|
||||
oO?
|
||||
|
||||
:0
|
||||
|
||||
oOo
|
||||
O*O
|
||||
---
|
||||
|
||||
:0
|
||||
|
||||
|Oo
|
||||
|*O
|
||||
+--
|
||||
|
||||
:0
|
||||
@end example
|
||||
|
||||
Patterns are always exactly 3x3 in size with the move at the center
|
||||
point. The symbols are the usual for GNU Go pattern databases:
|
||||
|
||||
@example
|
||||
* move
|
||||
O own stone (i.e. the same color as the color to move)
|
||||
o own stone or empty
|
||||
X opponent stone
|
||||
x opponent stone or empty
|
||||
? own stone, opponent stone, or empty
|
||||
| vertical edge
|
||||
- horizontal edge
|
||||
+ corner
|
||||
@end example
|
||||
|
||||
There's also a new symbol:
|
||||
|
||||
@example
|
||||
% own stone, opponent stone, empty, or edge
|
||||
@end example
|
||||
|
||||
After the pattern comes a line starting with a colon. In all these
|
||||
patterns it says that the pattern has a move value of 0, i.e. must not
|
||||
be played. Unmatched patterns have a default value of 1. When all move
|
||||
values are zero for both players, the playout will stop. Including the
|
||||
three patterns above is important because otherwise the playouts would
|
||||
be likely to go on indefinitely, or as it actually happens be
|
||||
terminated at a hard-coded limit of 600 moves. Also place these
|
||||
patterns at the top of the database because when multiple patterns
|
||||
match, the first one is used, regardless of the values.
|
||||
|
||||
When using only these patterns you will probably notice that it plays
|
||||
rather heavy, trying hard to be solidly connected. This is because
|
||||
uniform playouts are badly biased with a high probability of non-solid
|
||||
connections being cut apart. To counter this you could try a pattern
|
||||
like
|
||||
|
||||
@example
|
||||
?X?
|
||||
O*O
|
||||
x.?
|
||||
|
||||
:20,near
|
||||
@end example
|
||||
|
||||
to increase the probability that the one-point jump is reinforced when
|
||||
threatened. Here we added the property "near", which means that the
|
||||
pattern only applies if the previous move was played "near" this move.
|
||||
Primarily "near" means within the surrounding 3x3 neighborhood but it
|
||||
also includes certain cases of liberties of low-liberty strings
|
||||
adjacent to the previous move, e.g. the move to extend out of an atari
|
||||
created by the previous move. You have to read the source to find out
|
||||
the exact rules for nearness.
|
||||
|
||||
We could also be even more specific and say
|
||||
|
||||
@example
|
||||
?X?
|
||||
O*O
|
||||
x.?
|
||||
|
||||
:20,near,osafe,xsafe
|
||||
@end example
|
||||
|
||||
to exclude the cases where this move is a self atari (osafe) or would
|
||||
be a self-atari for the opponent (xsafe).
|
||||
|
||||
It may also be interesting to see the effect of capturing stones. A
|
||||
catch-all pattern for captures would be
|
||||
|
||||
@example
|
||||
?X%
|
||||
?*%
|
||||
%%%
|
||||
|
||||
:10,ocap1,osafe
|
||||
:20,ocap2
|
||||
:30,ocap3
|
||||
@end example
|
||||
|
||||
where we have used multiple colon lines to specify different move
|
||||
values depending on the number of captured stones; value 10 for a
|
||||
single captured stone, value 20 for two captured stones, and value 30
|
||||
for three or more captured stones. Here we also excluded self-atari
|
||||
moves in the case of 1 captured stone in order to avoid getting stuck
|
||||
in triple-ko in the playouts (there's no superko detection in the
|
||||
playouts).
|
||||
|
||||
The full set of pattern properties is as follows:
|
||||
|
||||
@ftable @code
|
||||
@item near
|
||||
The move is "near" the previous move.
|
||||
|
||||
@item far
|
||||
The move is not "near" the previous move.
|
||||
|
||||
@item osafe
|
||||
The move is not a self-atari.
|
||||
|
||||
@item ounsafe
|
||||
The move is a self-atari.
|
||||
|
||||
@item xsafe
|
||||
The move would not be a self-atari for the opponent.
|
||||
|
||||
@item xunsafe
|
||||
The move would be a self-atari for the opponent.
|
||||
|
||||
@item xsuicide
|
||||
The move would be suicide for the opponent
|
||||
|
||||
@item xnosuicide
|
||||
The move would not be suicide for the opponent.
|
||||
|
||||
@item ocap0
|
||||
The move captures zero stones.
|
||||
|
||||
@item ocap1
|
||||
The move captures one stone.
|
||||
|
||||
@item ocap2
|
||||
The move captures two stones.
|
||||
|
||||
@item ocap3
|
||||
The move captures three or more stones.
|
||||
|
||||
@item ocap1+
|
||||
The move captures one or more stones.
|
||||
|
||||
@item ocap1-
|
||||
The move captures at most one stone.
|
||||
|
||||
@item ocap2+
|
||||
The move captures two or more stones.
|
||||
|
||||
@item ocap2-
|
||||
The move captures at most two stones.
|
||||
|
||||
@item xcap0
|
||||
An opponent move would capture zero stones.
|
||||
|
||||
@item xcap1
|
||||
An opponent move would capture one stone.
|
||||
|
||||
@item xcap2
|
||||
An opponent move would capture two stones.
|
||||
|
||||
@item xcap3
|
||||
An opponent move would capture three or more stones.
|
||||
|
||||
@item xcap1+
|
||||
An opponent move would capture one or more stones.
|
||||
|
||||
@item xcap1-
|
||||
An opponent move would capture at most one stone.
|
||||
|
||||
@item xcap2+
|
||||
An opponent move would capture two or more stones.
|
||||
|
||||
@item xcap2-
|
||||
An opponent move would capture at most two stones.
|
||||
@end ftable
|
||||
|
||||
These can be combined arbitrarily but all must be satisfied for the
|
||||
pattern to take effect. If contradictory properties are combined, the
|
||||
pattern will never match.
|
||||
|
||||
@subsection Final Remarks
|
||||
|
||||
@itemize
|
||||
@item Move values are unsigned 32-bit integers. To avoid overflow in
|
||||
computations it is highly recommended to keep the values below
|
||||
10000000 or so.
|
||||
@item There is no speed penalty for having lots of patterns in the
|
||||
database. The average time per move is approximately constant
|
||||
(slightly dependent on how often stones are captured or become low
|
||||
on liberties) and the time per game mostly depends on the average
|
||||
game length.
|
||||
@item For more complex pattern databases, see
|
||||
@file{patterns/mc_montegnu_classic.db} and @file{patterns/mc_mogo_classic.db}.
|
||||
@end itemize
|
||||
|
||||
Nobody really knows how to tune the random playouts to get as strong
|
||||
engine as possible. Please play with this and report any interesting
|
||||
findings, especially if you're able to make it substantially stronger
|
||||
than the @file{montegnu_classic} patterns.
|
460
gnugo/doc/move_generation.texi
Normal file
|
@ -0,0 +1,460 @@
|
|||
|
||||
@menu
|
||||
* Move generation Intro:: Introduction.
|
||||
* Move Reasons:: Generation of move reasons.
|
||||
* Move Reason Details:: Detailed Descriptions of Move Reasons
|
||||
* Valuation:: Valuating the moves
|
||||
* End Game:: Endgame move generation
|
||||
@end menu
|
||||
|
||||
@node Move generation Intro
|
||||
@section Introduction
|
||||
|
||||
GNU Go 3.0 introduced a move generation scheme substantially different
|
||||
from earlier versions. In particular, it was different from the method of move
|
||||
generation in GNU Go 2.6.
|
||||
|
||||
In the old scheme, various move generators suggested different moves with
|
||||
attached values. The highest such value then decided the move. There were two
|
||||
important drawbacks with this scheme:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Efficient multipurpose moves could only be found by patterns which
|
||||
explicitly looked for certain combinations, such as a simultaneous
|
||||
connection and cut. There was also no good way to e.g. choose among
|
||||
several attacking moves.
|
||||
|
||||
@item
|
||||
The absolute move values were increasingly becoming harder to tune with
|
||||
the increasing number of patterns. They were also fairly subjective and
|
||||
the tuning could easily break in unexpected ways when something changed,
|
||||
e.g. the worm valuation.
|
||||
@end itemize
|
||||
|
||||
The basic idea of the new move generation scheme is that the various
|
||||
move generators suggest reasons for moves, e.g. that a move captures
|
||||
something or connects two strings, and so on. When all reasons for the
|
||||
different moves have been found, the valuation starts. The primary
|
||||
advantages are
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
The move reasons are objective, in contrast to the move values in
|
||||
the old scheme. Anyone can verify whether a suggested move reason is
|
||||
correct.
|
||||
|
||||
@item
|
||||
The centralized move valuation makes tuning easier. It also allows
|
||||
for style dependent tuning, e.g. how much to value influence
|
||||
compared to territory. Another possibility is to increase the value
|
||||
of safe moves in a winning position.
|
||||
@end itemize
|
||||
|
||||
|
||||
@node Move Reasons
|
||||
@section Generation of move reasons
|
||||
@cindex move reasons
|
||||
|
||||
Each move generator suggests a number of moves. It justifies each move
|
||||
suggestion with one or move @dfn{move reasons}. These move reasons
|
||||
are collected at each intersection where the moves are suggested for
|
||||
later valuation. Here is a partial list of of move reasons considered by GNU
|
||||
Go. (The complete list may be found in @file{move_reasons.h}.)
|
||||
|
||||
@table @code
|
||||
@item ATTACK_MOVE
|
||||
@itemx DEFEND_MOVE
|
||||
Attack or defend a worm.
|
||||
@item ATTACK_THREAT_MOVE
|
||||
@itemx DEFEND_THREAT_MOVE
|
||||
Threaten to attack or defend a worm.
|
||||
@item EITHER_MOVE
|
||||
A move that either achieves one goal or another (at the moment this only
|
||||
used for attacks on worms).
|
||||
@item ALL_MOVE
|
||||
At the moment this is used for a move that defends two worms threatened
|
||||
by a double attack.
|
||||
@item CONNECT_MOVE
|
||||
@itemx CUT_MOVE
|
||||
Connect or cut two worms.
|
||||
@item ANTISUJI_MOVE
|
||||
Declare an antisuji or forbidden move.
|
||||
@item SEMEAI_MOVE
|
||||
@itemx SEMEAI_THREAT
|
||||
Win or threaten to win a semeai.
|
||||
@item EXPAND_TERRITORY_MOVE
|
||||
@item EXPAND_MOYO_MOVE
|
||||
Move expanding our territory/moyo. These reasons are at the moment
|
||||
treated identically.
|
||||
@item VITAL_EYE_MOVE
|
||||
A vital point for life and death.
|
||||
@item STRATEGIC_ATTACK_MOVE
|
||||
@itemx STRATEGIC_DEFEND_MOVE
|
||||
Moves added by 'a' and 'd' class patterns (@pxref{Pattern Classification})
|
||||
which (perhaps intangibly) attack or defend a dragon.
|
||||
@item OWL_ATTACK_MOVE
|
||||
@itemx OWL_DEFEND_MOVE
|
||||
An owl attack or defense move.
|
||||
@item OWL_ATTACK_THREAT
|
||||
@itemx OWL_DEFEND_THREAT
|
||||
A threat to owl attack or defend a group.
|
||||
@item OWL_PREVENT_THREAT
|
||||
A move to remove an owl threat.
|
||||
@item UNCERTAIN_OWL_ATTACK
|
||||
@itemx UNCERTAIN_OWL_DEFENSE
|
||||
An uncertain owl attack or defense. This means that the owl code could
|
||||
not decide the outcome, because the owl node limit was reached.
|
||||
@item MY_ATARI_ATARI_MOVE
|
||||
A move that starts a chain of ataris, eventually leading to a
|
||||
capture.
|
||||
@item YOUR_ATARI_ATARI_MOVE
|
||||
A move that if played by the opponent starts a chain of ataris for the
|
||||
opponent, leading to capture, which is also a safe move for us. Preemptively
|
||||
playing such a move almost always defends the threat.
|
||||
@end table
|
||||
|
||||
The attack and defend move types can have a suffix to denote moves whose
|
||||
result depends on a ko, e.g. @code{OWL_ATTACK_MOVE_GOOD_KO}. Here
|
||||
@code{..._GOOD_KO} and @code{..._BAD_KO} correspond to @code{KO_A} and
|
||||
@code{KO_B} as explained in @ref{Ko}.
|
||||
See @file{engine/move_reasons.h} for the full of move reasons.
|
||||
|
||||
@strong{NOTICE:} Some of these are reasons for @strong{not} playing a move.
|
||||
|
||||
More detailed discussion of these move reasons will be found in the
|
||||
next section.
|
||||
|
||||
@node Move Reason Details
|
||||
@section Detailed Descriptions of various Move Reasons
|
||||
|
||||
@menu
|
||||
* Attack and Defense:: Worm Attack and Defense
|
||||
* Threats to Attack or Defend:: Worm Threats
|
||||
* Multi Attack or Defense:: Combined Attacks and Defenses
|
||||
* Cutting and Connecting:: Cutting and Connecting moves
|
||||
* Semeai:: Semeai winning moves
|
||||
* Making eyes:: Vital eye moves
|
||||
* Antisuji moves:: Never play these!
|
||||
* Territorial moves:: Block or expand territory
|
||||
* Owl attack and defense:: Owl Attack and Defense
|
||||
* Combination Attacks:: Coordinated threats such as double ataris
|
||||
@end menu
|
||||
|
||||
@node Attack and Defense
|
||||
@subsection Attacking and defending moves
|
||||
|
||||
A move which tactically captures a worm is called an @dfn{attack move} and a
|
||||
move which saves a worm from being tactically captured is called a
|
||||
@dfn{defense move}. It is understood that a defense move can only exist if
|
||||
the worm can be captured, and that a worm without defense only is
|
||||
attacked by moves that decrease the liberty count or perform necessary
|
||||
backfilling.
|
||||
|
||||
It is important that all moves which attack or defend a certain string
|
||||
are found, so that the move generation can make an informed choice
|
||||
about how to perform a capture, or find moves which capture and/or
|
||||
defend several worms.
|
||||
|
||||
Attacking and defending moves are first found in @code{make_worms} while it
|
||||
evaluates the tactical status of all worms, although this step only
|
||||
gives one attack and defense (if any) move per worm. Immediately
|
||||
after, still in @code{make_worms}, all liberties of the attacked worms are
|
||||
tested for additional attack and defense moves. More indirect moves
|
||||
are found by @code{find_attack_patterns} and @code{find_defense_patterns},
|
||||
which match the A (attack) and D (defense) class patterns in
|
||||
@file{patterns/attack.db} and @file{patterns/defense.db} As a final step, all
|
||||
moves which fill some purpose at all are tested whether they additionally
|
||||
attacks or defends some worm. (Only unstable worms are analyzed.)
|
||||
|
||||
@node Threats to Attack or Defend
|
||||
@subsection Threats to Attack or Defend
|
||||
|
||||
A threat to attack a worm, but where the worm can be defended is used as
|
||||
a secondary move reason. This move reason can enhance the value of a
|
||||
move so that it becomes sente. A threatening move without any other
|
||||
justification can also be used as a ko threat. The same is true for a
|
||||
move that threatens defense of a worm, but where the worm can still be
|
||||
captured if the attacker doesn't tenuki.
|
||||
|
||||
Threats found by the owl code are called @strong{owl threats} and they
|
||||
have their own owl reasons.
|
||||
|
||||
@node Multi Attack or Defense
|
||||
@subsection Multiple attack or defense moves
|
||||
|
||||
Sometimes a move attacks at least one of a number of worms or
|
||||
simultaneously defends all of several worms. These moves are noted
|
||||
by their own move reasons.
|
||||
|
||||
@node Cutting and Connecting
|
||||
@subsection Cutting and connecting moves
|
||||
|
||||
Moves which connect two distinct dragons are called @code{connecting moves}.
|
||||
Moves which prevent such connections are called @dfn{cutting moves}. Cutting
|
||||
and connecting moves are primarily found by pattern matching, the @code{C}
|
||||
and @code{B} class patterns.
|
||||
|
||||
A second source of cutting and connecting moves comes from the attack
|
||||
and defense of cutting stones. A move which attacks a worm
|
||||
automatically counts as a connecting move if there are multiple
|
||||
dragons adjacent to the attacked worm. Similarly a defending move
|
||||
counts as a cutting move. The action taken when a pattern of
|
||||
this type is found is to induce a connect or cut move reason.
|
||||
|
||||
When a cut or connect move reason is registered, the involved dragons
|
||||
are of course stored. Thus the same move may cut and/or connect
|
||||
several pairs of dragons.
|
||||
|
||||
@node Semeai
|
||||
@subsection Semeai winning moves
|
||||
|
||||
A move which is necessary to win a capturing race is called a @dfn{semeai
|
||||
move}. These are similar to attacking moves, except that they involve
|
||||
the simultaneous attack of one worm and the defense of another. As for
|
||||
attack and defense moves, it's important that all moves which win a
|
||||
semeai are found, so an informed choice can be made between them.
|
||||
|
||||
Semeai move reasons should be set by the semeai module. However this
|
||||
has not been implemented yet. One might also wish to list moves
|
||||
which increase the lead in a semeai race (removes ko threats) for use
|
||||
as secondary move reasons. Analogously if we are behind in the race.
|
||||
|
||||
@node Making eyes
|
||||
@subsection Making or destroying eyes
|
||||
|
||||
A move which makes a difference in the number of eyes produced from an
|
||||
eye space is called an @dfn{eye move}. It's not necessary that the eye is
|
||||
critical for the life and death of the dragon in question, although it
|
||||
will be valued substantially higher if this is the case. As usual it's
|
||||
important to find all moves that change the eye count.
|
||||
|
||||
(This is part of what eye_finder was doing. Currently it only finds
|
||||
one vital point for each unstable eye space.)
|
||||
|
||||
@node Antisuji moves
|
||||
@subsection Antisuji moves
|
||||
|
||||
Moves which are locally inferior or for some other reason must not be
|
||||
played are called @dfn{antisuji moves}. These moves are generated by pattern
|
||||
matching. Care must be taken with this move reason as the move under
|
||||
no circumstances will be played.
|
||||
|
||||
@node Territorial moves
|
||||
@subsection Territorial moves
|
||||
|
||||
Any move that increases territory gets a move reason. This is the expand
|
||||
territory move reason. That move reason is added by the @samp{e}
|
||||
patterns in @file{patterns/patterns.db}. Similarly the @samp{E} patterns
|
||||
attempt to generate or mitigate a moyo, which is a region of influence
|
||||
not yet secure territory, yet valuable. Such a pattern sets the ``expand
|
||||
moyo'' move reason.
|
||||
|
||||
@node Owl attack and defense
|
||||
@subsection Attacking and Defending Dragons
|
||||
@findex owl_reasons
|
||||
|
||||
Just as the tactical reading code tries to determine when a worm
|
||||
can be attacked or defended, the owl code tries to determine
|
||||
when a dragon can get two eyes and live. The function @code{owl_reasons()}
|
||||
generates the corresponding move reasons.
|
||||
|
||||
The owl attack and owl defense move reasons are self explanatory.
|
||||
|
||||
The owl attack threat reason is generated if owl attack on an
|
||||
opponent's dragon fails but the owl code determines that the
|
||||
dragon can be killed with two consecutive moves. The killing
|
||||
moves are stored in @code{dragon[pos].owl_attack_point}
|
||||
and @code{dragon[pos].owl_second_attack_point}.
|
||||
|
||||
Similarly if a friendly dragon is dead but two moves can revive it,
|
||||
an owl defense threat move reason is generated.
|
||||
|
||||
The prevent threat reasons are similar but with the colors
|
||||
reversed: if the opponent has an attack threat move then a
|
||||
move which removes the threat gets a prevent threat move
|
||||
reason.
|
||||
|
||||
The owl uncertain move reasons are generated when the owl
|
||||
code runs out of nodes. In order to prevent the owl code from
|
||||
running too long, a cap is put on the number of nodes one owl
|
||||
read can generate. If this is exceeded, the reading is cut
|
||||
short and the result is cached as usual, but marked uncertain.
|
||||
In this case an owl uncertain move reason may be generated.
|
||||
For example, if the owl code finds the dragon alive but is
|
||||
unsure, a move to defend may still be generated.
|
||||
|
||||
@node Combination Attacks
|
||||
@subsection Combination Attacks
|
||||
@findex atari_atari
|
||||
|
||||
The function @code{atari_atari} tries to find a sequence of ataris
|
||||
culminating in an unexpected change of status of any opponent string,
|
||||
from @code{ALIVE} to @code{CRITICAL}. Once such a sequence of ataris
|
||||
is found, it tries to shorten it by rejecting irrelevant moves.
|
||||
|
||||
@node Valuation
|
||||
@section Valuation of suggested moves
|
||||
@findex value_move_reasons()
|
||||
|
||||
At the end of the move generation process, the function
|
||||
@code{value_move_reasons()} tries to assign values to the
|
||||
moves for the purpose of selecting the best move. The
|
||||
single purpose of the move valuation is to try to rank
|
||||
the moves so that the best move gets the highest
|
||||
score. In principle these values could be arbitrary,
|
||||
but in order to make it easier to evaluate how well the
|
||||
valuation performs, not to mention simplify the tuning,
|
||||
we try to assign values which are consistent with the
|
||||
usual methods of counting used by human Go players,
|
||||
as explained for example in @emph{The Endgame} by Ogawa
|
||||
and Davies.
|
||||
|
||||
Moves are valued with respect to four different criteria. These are
|
||||
|
||||
@itemize @bullet
|
||||
@item territorial value
|
||||
@item strategical value
|
||||
@item shape value,
|
||||
@item secondary value.
|
||||
@end itemize
|
||||
|
||||
All of these are floats and should be measured in terms of actual
|
||||
points.
|
||||
|
||||
The territorial value is the total change of expected territory caused
|
||||
by this move. This includes changes in the status of groups if the move
|
||||
is an attack or a defense move.
|
||||
|
||||
Beginning with GNU Go 3.0, the influence function plays an important role
|
||||
in estimating territory (@pxref{Influence and Territory}). It is used
|
||||
to make a guess at each intersection how likely it is that it will become
|
||||
black or white territory. The territorial value sums up the changes
|
||||
in these valuations.
|
||||
|
||||
Strategical value is a measure of the effect the move has on the
|
||||
safety of all groups on the board. Typically cutting and connecting
|
||||
moves have their main value here. Also edge extensions, enclosing
|
||||
moves and moves towards the center have high strategical value. The
|
||||
strategical value should be the sum of a fraction of the territorial
|
||||
value of the involved dragons. The fraction is determined by the
|
||||
change in safety of the dragon.
|
||||
|
||||
Shape value is a purely local shape analysis. An
|
||||
important role of this measure is to offset mistakes made by the
|
||||
estimation of territorial values. In open positions it's
|
||||
often worth sacrificing a few points of (apparent) immediate profit to
|
||||
make good shape. Shape value is implemented by pattern matching, the
|
||||
Shape patterns.
|
||||
|
||||
Secondary value is given for move reasons which by themselves are not
|
||||
sufficient to play the move. One example is to reduce the number of
|
||||
eyes for a dragon that has several or to attack a defenseless worm.
|
||||
|
||||
When all these values have been computed, they are summed, possibly
|
||||
weighted (secondary value should definitely have a small weight), into
|
||||
a final move value. This value is used to decide the move.
|
||||
|
||||
@menu
|
||||
* Territorial value:: How much territory does a move gain
|
||||
* Strategical value:: Strategical gains from a move
|
||||
* Shape factor:: Local shape
|
||||
* Minimum Value:: Minimum value
|
||||
* Secondary Value:: Other, more indirect, gains from a move
|
||||
* Threats and Followup Value:: Valuation of attack and defense threats
|
||||
@end menu
|
||||
|
||||
@node Territorial value
|
||||
@subsection Territorial Value
|
||||
@findex estimate_territorial_value
|
||||
|
||||
The algorithm for computing territorial value is in the function
|
||||
@code{estimate_territorial_value}. As the name suggests, it seeks
|
||||
to estimate the change in territory.
|
||||
|
||||
It considers all groups that are changed from alive to death or vice-versa
|
||||
due to this move. Also, it makes an assumption whether the move should be
|
||||
considered safe. If so, the influence module is called: The function
|
||||
@code{influence_delta_territory} estimates the territorial effect of
|
||||
both the stone played and of the changes of group status'.
|
||||
|
||||
The result returned by the influence module is subject to a number of
|
||||
corrections. This is because some move reasons cannot be evaluated by a
|
||||
single call to the influence function, such as moves depending on a ko.
|
||||
|
||||
@node Strategical value
|
||||
@subsection Strategical Value
|
||||
|
||||
Strategical defense or attack reasons are assigned to any move
|
||||
which matches a pattern of type @samp{a} or @samp{d}. These are
|
||||
moves which in some (often intangible) way tend to help
|
||||
strengthen or weaken a dragon. Of course strengthening a
|
||||
dragon which is already alive should not be given much value,
|
||||
but when the move reason is generated it is not necessary
|
||||
to check its status or safety. This is done later, during
|
||||
the valuation phase.
|
||||
|
||||
@node Shape factor
|
||||
@subsection Shape Factor
|
||||
|
||||
In the value field of a pattern (@pxref{Pattern Values}) one may
|
||||
specify a shape value.
|
||||
|
||||
This is used to compute the shape factor, which multiplies the
|
||||
score of a move. We take the largest positive contribution to
|
||||
shape and add 1 for each additional positive contribution
|
||||
found. Then we take the largest negative contribution to
|
||||
shape, and add 1 for each additional negative contribution. The
|
||||
resulting number is raised to the power 1.05 to obtain the
|
||||
shape factor.
|
||||
|
||||
The rationale behind this complicated scheme is that every
|
||||
shape point is very significant. If two shape contributions
|
||||
with values (say) 5 and 3 are found, the second contribution
|
||||
should be devalued to 1. Otherwise the engine is too difficult
|
||||
to tune since finding multiple contributions to shape can cause
|
||||
significant overvaluing of a move.
|
||||
|
||||
@node Minimum Value
|
||||
@subsection Minimum Value
|
||||
|
||||
A pattern may assign a minimum (and sometimes also a maximum)
|
||||
value. For example the Joseki patterns have values which are
|
||||
prescribed in this way, or ones with a @code{value} field.
|
||||
One prefers not to use this approach but in practice it is
|
||||
sometimes needed.
|
||||
|
||||
In the fuseki, there are often several moves with identical minimum
|
||||
value. GNU Go chooses randomly between such moves, which ensures
|
||||
some indeterminacy of GNU Go's play. Later in the game, GNU Go's
|
||||
genuine valuation of such a move is used as a secondary criterion.
|
||||
|
||||
@node Secondary Value
|
||||
@subsection Secondary Value
|
||||
|
||||
Secondary move reasons are weighed very slightly. Such a move
|
||||
can tip the scales if all other factors are equal.
|
||||
|
||||
@node Threats and Followup Value
|
||||
@subsection Threats and Followup Value
|
||||
|
||||
Followup value refers to value which may acrue if we get two
|
||||
moves in a row in a local area. It is assigned for moves that threaten
|
||||
to attack or defend a worm or dragon. Also, since GNU Go 3.2 the influence
|
||||
module makes an assessment of the possible purely territorial followup
|
||||
moves. In cases where these two heuristics are not sufficient we
|
||||
add patterns with a @code{followup_value} autohelper macro.
|
||||
|
||||
Usually, the followup value gives only a small contribution; e.g. if
|
||||
it the followup value is very large, then GNU Go treats the move as sente by
|
||||
doubling its value. However, if the largest move on the board is a ko
|
||||
which we cannot legally take, then such a move becomes attractive as a ko
|
||||
threat and the full followup value is taken into account.
|
||||
|
||||
@node End Game
|
||||
@section End Game
|
||||
|
||||
Endgame moves are generated just like any other move by GNU Go. In fact,
|
||||
the concept of endgame does not exist explicitly, but if the largest
|
||||
move initially found is worth 6 points or less, an extra set of patterns
|
||||
in @file{endgame.db} is matched and the move valuation is redone.
|
257
gnugo/doc/moyo.texi
Normal file
|
@ -0,0 +1,257 @@
|
|||
|
||||
@menu
|
||||
* Moyo history:: History of @file{moyo.c} and @file{score.c}
|
||||
* Bouzy:: Bouzy's algorithm
|
||||
@end menu
|
||||
|
||||
The file @file{score.c} contains alternative algorithms for the
|
||||
computation of Territory and Moyos. These algorithms are used in
|
||||
@code{estimate_score()} but apart from that are generally
|
||||
@strong{not} used in the rest of the engine since the concepts of
|
||||
Territory, Moyo and Area were reimplemented using the influence
|
||||
code (@pxref{Territory and Moyo}). The function @code{estimate_score()},
|
||||
which is the only way this code is used in the engine, could
|
||||
easily be replaced with a function such as
|
||||
@code{influence_score()} based on the influence code.
|
||||
|
||||
@node Moyo history
|
||||
@section Moyo history
|
||||
|
||||
In GNU Go 2.6 extensive use was made of an algorithm from
|
||||
Bruno Bouzy's dissertation, which is available at:
|
||||
@url{ftp://www.joy.ne.jp/welcome/igs/Go/computer/bbthese.ps.Z}
|
||||
This algorithm starts with the characteristic function of the
|
||||
live groups on the board and performs @samp{n} operations
|
||||
called dilations, then @samp{m} operations called erosions.
|
||||
If n=5 and m=21 this is called the 5/21 algorithm.
|
||||
|
||||
The Bouzy 5/21 algorithm is interesting in that it corresponds
|
||||
reasonably well to the human concept of territory. This
|
||||
algorithm is still used in GNU Go 3.6 in the function
|
||||
@code{estimate_score}. Thus we associate the 5/21 algorithm
|
||||
with the word @dfn{territory}. Similarly we use words
|
||||
@dfn{moyo} and @dfn{area} in reference to the 5/10
|
||||
and 4/0 algorithms, respectively.
|
||||
|
||||
The principle defect of the algorithm is that it is not
|
||||
tunable. The current method of estimating moyos and territory
|
||||
is in @file{influence.c} (@pxref{Influence}). The territory,
|
||||
moyo and area concepts have been reimplemented using the
|
||||
influence code.
|
||||
|
||||
The Bouzy algorithm is briefly reimplemented in the file
|
||||
@file{scoring.c} and is used by GNU Go 3.6 in estimating
|
||||
the score.
|
||||
|
||||
Not all features of the old @file{moyo.c} from
|
||||
GNU Go 2.6 were reimplemented---particularly the deltas were
|
||||
not---but the reimplementation may be more readable.
|
||||
|
||||
@node Bouzy
|
||||
@section Bouzy's 5/21 algorithm
|
||||
|
||||
Bouzy's algorithm was inspired by prior work of Zobrist and ideas from
|
||||
computer vision for determining territory. This algorithm is based on two
|
||||
simple operations, DILATION and EROSION. Applying dilation 5 times and erosion
|
||||
21 times determines the territory.
|
||||
|
||||
To get a feeling for the algorithm, take a position in the early
|
||||
middle game and try the colored display using the @option{-m 1} option
|
||||
in an RXVT window. The regions considered territory by this algorithm
|
||||
tend to coincide with the judgement of a strong human player.
|
||||
|
||||
Before running the algorithm, dead stones (@code{dragon.status==0})
|
||||
must be "removed."
|
||||
|
||||
Referring to page 86 of Bouzy's thesis, we start with a function
|
||||
taking a high value (ex : +128 for black, -128 for white) on stones on
|
||||
the goban, 0 to empty intersections. We may iterate the following
|
||||
operations:
|
||||
|
||||
@dfn{dilation}: for each intersection of the goban, if the intersection
|
||||
is @code{>= 0}, and not adjacent to a @code{< 0} one, then add to the intersection
|
||||
the number of adjacent >0 intersections. The same for other color : if
|
||||
the intersection is @code{<= 0}, and not adjacent to a @code{> 0} one, then subtract
|
||||
the number of @code{< 0} intersections.
|
||||
|
||||
@dfn{erosion}: for each intersection @code{> 0} (or @code{< 0}), subtract (or
|
||||
add) the number of adjacent @code{<= 0} (or @code{>= 0}) intersection. Stop at zero. The
|
||||
algorithm is just : 5 dilations, then 21 erosions. The number of erosions
|
||||
should be 1+n(n-1) where n=number of dilation, since this permit to have an
|
||||
isolated stone to give no territory. Thus the couple 4/13 also works, but it
|
||||
is often not good, for example when there is territory on the 6th line.
|
||||
|
||||
For example, let us start with a tobi.
|
||||
|
||||
@example
|
||||
|
||||
128 0 128
|
||||
|
||||
@end example
|
||||
|
||||
1 dilation :
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
1 1
|
||||
|
||||
1 128 2 128 1
|
||||
|
||||
1 1
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
2 dilations :
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
1 1
|
||||
|
||||
2 2 3 2 2
|
||||
|
||||
1 2 132 4 132 2 1
|
||||
|
||||
2 2 3 2 2
|
||||
|
||||
1 1
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
3 dilations :
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
1 1
|
||||
|
||||
2 2 3 2 2
|
||||
|
||||
2 4 6 6 6 4 2
|
||||
|
||||
1 2 6 136 8 136 6 2 1
|
||||
|
||||
2 4 6 6 6 4 2
|
||||
|
||||
2 2 3 2 2
|
||||
|
||||
1 1
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
and so on...
|
||||
|
||||
Next, with the same example
|
||||
|
||||
3 dilations and 1 erosion :
|
||||
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
2 2 2
|
||||
|
||||
0 4 6 6 6 4
|
||||
|
||||
0 2 6 136 8 136 6 2
|
||||
|
||||
0 4 6 6 6 4
|
||||
|
||||
2 2 2
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
|
||||
3 dilations and 2 erosions :
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
1
|
||||
|
||||
2 6 6 6 2
|
||||
|
||||
6 136 8 136 6
|
||||
|
||||
2 6 6 6 2
|
||||
|
||||
1
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
3 dil. / 3 erosions :
|
||||
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
5 6 5
|
||||
|
||||
5 136 8 136 5
|
||||
|
||||
5 6 5
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
3/4 :
|
||||
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
3 5 3
|
||||
|
||||
2 136 8 136 2
|
||||
|
||||
3 5 3
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
3/5 :
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
1 4 1
|
||||
|
||||
136 8 136
|
||||
|
||||
1 4 1
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
3/6 :
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
3
|
||||
|
||||
135 8 135
|
||||
|
||||
3
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
3/7 :
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
132 8 132
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
We interpret this as a 1 point territory.
|
||||
|
1427
gnugo/doc/newlogo.eps
Normal file
BIN
gnugo/doc/newlogo.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
319
gnugo/doc/oldlogo.eps
Normal file
|
@ -0,0 +1,319 @@
|
|||
%!PS-Adobe-3.0 EPSF-3.0
|
||||
%%Creator: jpeg2ps V1.8 by Thomas Merz
|
||||
%%Title: gnugo.jpg
|
||||
%%CreationDate: Thu May 25 23:30:57 2000
|
||||
%%BoundingBox: 20 20 575 481
|
||||
%%DocumentData: Clean7Bit
|
||||
%%LanguageLevel: 2
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
%%EndProlog
|
||||
%%Page: 1 1
|
||||
/languagelevel where {pop languagelevel 2 lt}{true} ifelse {
|
||||
(JPEG file 'gnugo.jpg' needs PostScript Level 2!\n) dup print flush
|
||||
/Helvetica findfont 20 scalefont setfont 100 100 moveto show showpage stop
|
||||
} if
|
||||
save
|
||||
/RawData currentfile /ASCII85Decode filter def
|
||||
/Data RawData << >> /DCTDecode filter def
|
||||
20 20 translate
|
||||
555.00 460.29 scale
|
||||
/DeviceGray setcolorspace
|
||||
{ << /ImageType 1
|
||||
/Width 293
|
||||
/Height 243
|
||||
/ImageMatrix [ 293 0 0 -243 0 243 ]
|
||||
/DataSource Data
|
||||
/BitsPerComponent 8
|
||||
/Decode [0 1]
|
||||
>> image
|
||||
Data closefile
|
||||
RawData flushfile
|
||||
showpage
|
||||
restore
|
||||
} exec
|
||||
s4IA0!"_al8O`[\!<<*#!!*'"s4[N@!"&r9#mUYA#m^hF$OR:Q)%[;g%M'Tr(D7T
|
||||
2+=8BZ+<r'Y/NGL5.Q/e$,;MYB2EO&e5X6YM7S?068i]+$4o`:t$O?b(!@7aI&HM
|
||||
jL!#tt>!!36'!<E0#zz"U4u0":"u6s24n=&-)_5!s8Q."9J]0%1EUE!!*-'"98T;
|
||||
"qi(6#88:I;.1.oEIeje,=5;%(,KE?Jeo[Y2a^MbP-M=!dGY?hATi]ZPG4hZ_8I]
|
||||
X7RpEX<b?Gr_Z/<i#QXr+!'^JWC/U:m.8!L&V(##n^YZ^*[Ouma8s[@;Xm_%u\[2
|
||||
C#U(j;_1$)RqeuH,mgN$l[*t#g^,7Y8*CRfXt$-,i<Hs_"Me+2M&jeCib95lZ(Ob
|
||||
7BUE.W8(b62bjalA"P9J'#DKt,R!;N_>QLa=>B*-#2^8lCnM.8!L&V(##7Pbfg$k
|
||||
B9gJA2M3-[YJ21BsOrW]F:;?V]OA'WUA6:Q>&.Wp<c$CgFg"$4l(de%%e_=#<8ia
|
||||
AjtTM'I)\2ra\>7SJe_p2lFO"Vfm=+4b"rbp3=O>X1L.[p0I)2:8OaN.CGj_GrpY
|
||||
8)i5k*-TT1foeT4iBJ]'r+i0L&lY9=qqk0#XP`h\mjGh=&q*dj.Vl&coM`E>ub%.
|
||||
lG6Z/e/:.B1kE,/oPL;&fM!6a:"!&2qB;/%oORI0<'.+&<2"$-KC6CAs6g&U&VOE
|
||||
6Gr<F_/<LT&4U\Q`+BYl2Y*\6u+e*X+#76kN>Kh*feMpb@rLo&ibe[2LP@AU#(jM
|
||||
*2KD1L-p0Ig(1SB[dU3),ka,/$6A=0^=5b6Eg_s,D&&Sngfo&p5*S6PF8m?PAkZq
|
||||
gXtdjdmufc$\cHfD+MuKp#=RE6Sfs\pocUQ.iD!>W$s4j"Egko]tlUr7(MVtD^Hu
|
||||
,F\T?)b"?q%BA0jPriWPAF;<LW[dq5hVN+R6#J*\oI/6h0.8!L&V(##7Pbfg$iOI
|
||||
-Q$rZCFjNVoA=_DDGO4?W!<UD#[PH8.t%E54'V5MiX`+<g4p'Bq!^(0VorrB4%p,
|
||||
L1AS[D,"/%dSi0t0Vlk<$YJ!L&e?HDP,CIU9GIV'/*U!=+2eR&Za2EQB_:[,_%qb
|
||||
;>3;PnH]a0.LMqbi9q.Rqg\WHcDI/[:Is:B2Cg,^+GZ+Ph*Y1:F?;o;*j5+&i7fr
|
||||
13q]Koi9$2];<7._]iB[d)3/!P$=$LW"K+NI)!Fhl!=/UoXCT5Oi)2\H;%BXBsnm
|
||||
XMGhro&!S&S77u=3`OWj"kiA_P&2KNHUk+*6P'VO,cPk6Xkt][nXMT74_<KC>P)/
|
||||
1D=HVAu1&2kST%U5%?pA>lmQK^rct;/s/Obc1'=W3o-O64L3<1,2iha7P#48FtXe
|
||||
HG$db:4ZYEm8c*L%9"9)Xim_*(?.7)jXYQi59K/IiqDXHD"o0q@2a<'I"r:Hut)<
|
||||
D#Rj&s*)75[[Zap8t;%0G1-uH^/fe'K-MbN&J'XT,16pG5V`JV1R"CK#J)L`X3oq
|
||||
QM1OBEj=V*h"19?h!;*-=(paJ@CRF7*[#K<,Y%5?D->cuS1Ajl#8ue%<R%8sBcZ2
|
||||
2(P0(An.2*@ALU5LPbfg$;O"7_%pE<4V321`^klYk7U?C';p0/q8QHI!6;irecTH
|
||||
O629a*UNnPa&*jr8rZp%74-+"I*=n<la*BmcZ[Vb$Vc0:d!Ve/Ab_*V><ZQ6uL"q
|
||||
SlQOuW[NY"!St35o_$:<+^C@>B'6+LuL!5+,)\"[u#(._m'M$!6apX``>Z:t%@-:
|
||||
mU4k4?!n8h_=o8XXYQW!VuQ`c#;(V5C(a[)u?9n&fZteM%iKP6Jb$C[4/tFck<u=
|
||||
5$jYX>t.Ai^m/jPf#B%\+b:dH.4Y\LG(MmCW[oRfA+pPfBneo'%CCYI#rs@8hR[E
|
||||
'Y$6PbQRJ^npl*@U85X*^"XbGR*#dEAdg"V!cU!7'40S&?<nh"2b]LrIC'kH&NGI
|
||||
$AY86H#c9%42;t$q+Kf%acgdVWlfAAH%Y9LHq8q5Y-3SW3r]A/_qAF3$FC/CF5YC
|
||||
h>[+%l1[h:b#Ld3dm)re``DYRV#jjH8_!i-UoJYXVZ]dVm@Aa@fGQmjHG,IjuI8"
|
||||
H7X-[3,uT.t^XkOWJY1RFg(H/E,bM[c<?,VA,0teX(F^U_65Zq.?e[aN_jAM=8;j
|
||||
>:rO/K(B7M.rRP%8!S6qPbfg$;O""Z[5IqPTho0%US:cBio6GbbDRf9G)WP<5I-F
|
||||
43V98<)BS,@ad^oOQ;VX[Vd`Z]Vr9ruPrIM-*N.Df4V(@=@2b$DICdMKm6&>[.Op
|
||||
sM)cB_h7dYmZ+SFoo7d5&_cHahHFJ_?WfMkc<$PHmHOGnhAVrTsMJ_%27q^'\bIE
|
||||
H:KmEZI;_H+Hm3YW-(O.[4HUodRsFr%3dk;P@i-+4mf$5MBXPUIOB3di_\VAs_N&
|
||||
lfs8p_XL,`o'!9f"*;&;PWZH=E\q$<;?i/Pc,iBA<e5^U^g@"TW"6hT'87$aLYF9
|
||||
,:F5^8TC%trZP<l4BBXKY)b?rMgWT%m?=(G]5D+_;X#2g(,D-s]i_7+O1SQQh]XT
|
||||
mdOS4j/"M\/oAi4&&%Lbs=OB$]AOh$a99`p7.>1B^lf`1l8kN-Y!W,ku;l];fF_k
|
||||
nJ0&7l3@GW#R6]!ggZR93]%br*bl7nn^=''&g)m\Dc4%`^Ee&#/^[cK5RTRm[qB5
|
||||
[n,*amL+XOU1TD6c!CWGYu#VO<K`%fVmGS>9X4,H"dh)!YjV*&t&aWLj86/](_+0
|
||||
<"t6e3N4s3E@UrPbfg$;O"".c1Q5'Bs-"Yp!S2D7CGlY_^\O_/R+&]5(ge6I0&u@
|
||||
r4%_[N4'uZHYXHr2\6Zd&%-]F][L`^L8/Lc.3:Shn5bj?*L;:S,n!c0]+P<JPn1<
|
||||
N^oJ4)9h<csm4tT\Enk-3\\u@(V;U?`glD#KDs<5X<KW$!b:#]$D*gK*,t@rFP'J
|
||||
prPbfg+=8V',4)7gK-rYs*2Ua7U/iqrN64uFU79FZLmE6;o6RCEpFafDq9$DNjri
|
||||
7J1$k<WUT=nCW[%r5K!*-m%4arY<I^6;0ZonIWM@,+#hG;AEK9WK%KH=ou9ASL;>
|
||||
4FI!7EQR(1t3!8FZ^:$P+dR?@OcD_V.-I,l-Z?ih="B8Y1t@!8kS,,,K*QOT*pOu
|
||||
!9^'%60X8`m/I&\Ht0'VhUULj-5E%kPf6GAYU&cF"!%+VH_"H8>iS&IFN(59mkjN
|
||||
u\LolJ.HfDW&9'P*.Qaq+6dY<k>AX&OH$2GQ[X:KMYZY4cP^r<qiBu)XC1`^,.8!
|
||||
L&Xp_)K/XG,gl\k">.k)rOc^'('8N6dO%RHB6>^8oQ_LC6J-jb^YkQmENJc7Y.a;
|
||||
f`%F.Cg>/Vg\b2\Y]U2_,=39c^;fE-Nr?"+fDN%r@b8jD?\6D:1;Z;I#>Akbl(S&
|
||||
j&Olm(*"(&k^Y9M<W>$Br*7N;O((/Z`5m`e&LE`Z5#ieOl:ITiPgjSOl7ABO]/`i
|
||||
]R'gYl12u]gI$W:ASrpcPU(OQPDZMIoKsF.DbJX),%]2I.UM+*L6KbaB`>0^e;eU
|
||||
A9k>+m6)@Z<hd\/%BLdcgKLD*HC]h_*Nhk^8Om11qf^M>\EPH2!S/Du<'&9oWcru
|
||||
Zbcn?7b=T)6JNtjSXproQ=A2NWj76r5V6YS"p3'm@Ar=XEUXXQkA4kEJ6YGJLEN*
|
||||
Pf%(ZA4^=0d??+m`sC(*ka1`ss)6.>JhrBNjH)Q:#@=.F"kAa36HBo?Y*GlEB.lA
|
||||
OW5hS7VERmSoZsM#gM<`sH&Y$68*lkKq<&mr7q7WLJPEPqqS!<Pk5%l@f`p$Bq;8
|
||||
8lCnUCKaq6;TMH1.OleG!S!<4>AHa9>K\t)-"B\ShBq+sJj(d9n6];rOE(spp!,Q
|
||||
%
|
||||
rCTtPV(##eei-[4<[&]g-@FEB%N^,6\9<Mu)->P(XO`39.n"/X,Qt@i!@dd7.R)q
|
||||
SrCp<s</kChpH$US*K!Ee$6pa"O>c9o-Iol/Sj(bP<#*kO=Dnib10qEl@MBNE%'<
|
||||
48OjNM^"T?SYB1,p-QQB,$3cjiA]p2?[j5HgFecAC_C<9)aW#M&2e!?6.B&;Gh9q
|
||||
3fB3YpZIfUT#:<*K/k[]B_,g@*La']dQ!DHUK\1.ncqqGj-C3^(akH'$kna*AWYE
|
||||
?Ke)I_:R%-p^a15Uo;a;&LV1'sadIq!R@HZauaXd[Yk3A+>A7N\UP6`#oPI*:ELA
|
||||
-QJScZL`+3[j!niEL0K;gPAm.UlgaZ4KElZ8lCnR7\t7p=+3o-K&YO@a@l8_cq)&
|
||||
ePct\c0<+3VY9L+X7rBOWAV;A,>"D"tTO8oc?iU@KV(##7Pbh;qBR9[YYHBf%5GY
|
||||
dB0co&EV[+n(3.4s$;G)-/Eb]es?&an=go_cq/i7^Q)i"TAn:UC7"ak$26*TU3IB
|
||||
coC=_)`P&ousmB.)4tR[C:4XXtZp`?cXPW8LWBqS,cZ[5RFKeqJa.P:aG"mP@bC\
|
||||
qc\HN@ZZhU_Kp6&>4=\7p=YEf-O5f3Br5,*E,jegke+F>J3co^6Rm-l2=6@PqQ&"
|
||||
p@Tobms(#7gpJ/rjHQsCOE'`ZeC6S1Rnq@A\Je(/LV6kq'#Z[q+\Fg];iR!"qpjQ
|
||||
'g'OM(U>S>T._AA*+<D)SofsdLA09+!<39q.>sV*2'SQSq8B;qH"B>f`2'&5p7\?
|
||||
1,-HU4VFfG<,9QI::d`FT\a,[iY4`T[BV(##:?WpdtgEB%qg-A['ki%R2D;cOOE;
|
||||
ona.Hf%#N+TZnY*ap=/Ag9NCN(#T*I6P1`L`mcgAlXOG*JgP9#XlnCO61err<5mk
|
||||
!Z9md)9M;$5i)jfN(3/aM-+[]2*WG:QUo-@8J3Oq/!74Flg9TETf,0o/<tPUV!rt
|
||||
[6t,:8dG3nY=(2dd<:fJ>aXc=ieQhO_7`A1;5jrBWJfT,?+NiYR8"IH7o>k2H\9R
|
||||
DKRV;m,qR*)VPZ3&#neOBqeisb<@&o@I[/QD#,%<n='\_q8N8l`\he0!5/&=sW;^
|
||||
8#A>?KsH]&\5N%(n3Jsis10hEVc.T3^I[<G!QBK4AiQr<9%YkA0Y1mZVIB9#dm:Z
|
||||
YGM(A'PfpMC2n`EFlufi>:g9esV=Eg5^3meKW6\Ap^S'fg-_Q8rnVk=pqSR`^lML
|
||||
el)fHIJiQ;F'N]7g'<OF\#[n?'=uge\:+^YOe.BPWU\PoP26t5*[p#g9*P0>#+A=
|
||||
_'Hqn7oo%=J<@Gggg_Sn>-4-8;kTl@kGWUAg6k_e)!AL<-PXsoj]_;!VCKqsGXb<
|
||||
^9"@+E]M$SbibEe(W;FQ./b[R=gGp4J83oS_)$d*:oH<bu!hj^1i`);.m.XLt]NN
|
||||
f1a]F\*3A%g*Pb*;LqUMU1V(3X&V.g&0,h,mI>3H/OZNeuVpQQ?)A,4=FN"K-+;O
|
||||
"".($0b&<Qira9p8AmE&.?Om8#BZH;^"0>R1I@YB?FXd]HPu%b7h$3rR@_,""dF+
|
||||
f@LEJ3`<:D[?F>K:92GW=f.1'(#Q)Na]J<dn!Um.PaWW6NiYc[/RW;4\$V%QA;Y#
|
||||
[+OSfSO%0d%m]aNBjYtc$6POP5HRk-RcUS?(2d1Vrr<ua>J:k.Iq_Ls3V3XDc_7P
|
||||
>HTm'6`6$N7j^4j[K`t(G9.2d9fZJRa+&6Rk#1We/hTL9`Yu#`"_^RkL_R3!1Xm;
|
||||
KH,rZR\TIKZP`!%Q+^a`-W2\)FeeK-LY&lB[8fh.K.UnJqSW:E_*F\ZQ&SPaa`<r
|
||||
8jpnR9LT7=SbXoQLWDM/?r,Jhion[o$Cl?F/q/=5c2tirIuqa`]=dgPKN5EM\bP>
|
||||
Or)MGiQ!UV/7-.A\R6]LK#]ScR0<;"RTgZOjb@CF.Q8)E(+j5l-3Ps,=]Om`QOXE
|
||||
.WUZDlZg55=XrVLXDJ(8?V9b<(k0RJcJJ2_Upa]^N\K>Wc?&7+V,_..!Iun^bpc8
|
||||
]CF+H8YEmF<N!>Y6"*)AOG89(<oN-[c-T-"IdZgc8BG7"U^meR4Pg@"RQn04i?sh
|
||||
3cNc5TBT.VU>fl)pc[`3k,@>M%^U^j:&H2F3pm%l.';Q(M_>c!9I:KZ3lgWRmN_l
|
||||
A`UpBanHJp?1^Vl/7Mp.[Vce#YOb[Q$V0+M@!h<9&`S<25u`!0aNY;O"21XdGMT=
|
||||
L-[)_j>e",tW7A;W;)ld(6m^p)[kuTq8Pmj&dk[XcQJhLr]lu(b7db53/6+F&H!O
|
||||
J%inNf$B;G]gStS[*(feIDbWL"3cs62HtP%p>oX=$d&<8oFgUQDBgBfdSHP-5%g=
|
||||
NJTc`iBl7-e8!\nTeWsGIg8nol*=oPdRqu[hOsdWX9UR>%?<C(pK`&A$1,DpW<J&
|
||||
m6h`PY0O:X#\W=Q:kV6d^*;=;4INQ!,m3U9od.niYklZV$X-<?+tTZUK%ZG4;Kk`
|
||||
QX-8Sqd(4qm'7c,.S1\*;P&LMDhoYZ>"*$7\s'HBfo>T?a.`c1eSh?eLfi((1CFo
|
||||
9/;@7"7'2+4@3,.8!YmkY0c>8;/I0O!UVXicB]LTn5)m-EI*;b^"MVgF"PPFe.VZ
|
||||
Ga+GH"<R]"Gp&l#5':V:.ht^1^Yo];ZDM1`K4'WT@7-9YpHVX+Pn-8k,^\(mPbfg
|
||||
2Wc\29SO#7o4XW8!A?R=bk.GA`d,:"3'qU9Jk"eV4C=NgAg+B&Ugd]qOn8HHXguW
|
||||
QfjXF>8lD4^,3Bsreoh&,pp@WX\T8?:&rOl%/c'K-4YS)^u>A</.HLR(rk!oZQF_
|
||||
QbfQIT`hT#l<i5!/MNfPUq"?W'qin<.jbf#KYs+'cpL;VEsfUJ-W.UaeE%JV2"&8
|
||||
dQX:cq`0$@Tm6g$GtZd.R^6;;TaDaKOA]sEQ**)FECV@O`I!:7F(=cO=!Rs3sk_p
|
||||
[!\eo:G+G,hUHUa<u7OoW/XC]eZqU+f8/gpbphDie3(bgj.9uegC@]i6'1)2MUhD
|
||||
;67'.j,n]</:eAfnP#CKhF.@21Ng>%jr`-[S>CE[2WUo3QU`c`qdqBb$V=XKm9h!
|
||||
_eQE0?*Sh-8Qc%7SU+YP3f9;.ZhR*S)5<QOhjU=j$\5Ds3SXNPq4r,V-1A/1r<eV
|
||||
'5\cg)`ZUiXR`+^Z!Z?%)VSD82t2bd^m,W,B,oX_`.@!&kHg'ER.Q,`[,M#*?/OA
|
||||
(/Z,.=:3g<?bq@a]n'mQ?2`Zlmd1CV(#@_ba3FdC%g5^?sC#=9PM"QW;"@:/L[7A
|
||||
cZk$5#-ZOQ6gC_ne%/lGF?=\:A?!8[K!W;pqP\u>W:%tgbF2'p8%6W68XNPfA/<_
|
||||
*.7EZGJ!(F.eS1j/9$mKjUIT=uh*Wa%P,B:&#tb18,a22N+.LtgW\*XmUla^pJsW
|
||||
WE:F#Ze'>a9"a-k]8g!-5f<,:ck[YoEnG'V)2fG"*$-X[eOB]g6,X%M?jEbeSfdL
|
||||
;F<VV?/0.8$gD#M3XlW`#+C.]I4`!:5Y+G+RU#nVKh)`33lJ%K;X@&$?NMhQ=<'^
|
||||
u/7.]ratmkuiK?,a,Ie?2.rq3Z0G=E1h[2_Q'WmSlVhp`7)9ua.gN\$'=Y8lO>\d
|
||||
8]jZT!@3gf*1h5kC?)1uoR/Z6pf<u0;l`snj?@Un=,^\eEI]OLFGh@'g-bSriukY
|
||||
;Ybim9;$pj@o#Sk^jCA.r-S%MfA6WNI_V^D0)N0aG#U@)WMBo/hrjGBY#H`(H3N6
|
||||
fp,5GbLauW9451Fd)Ne"*]iWmtb79=Uhf=nneet0/3L2W$Z)FMBqYf*>M3ugi..6
|
||||
b6EETenHVruk'&=dq4B2tfo<o32a6_Qjh0Ic8Y2)@j&PcFGg[i<&;]>R2<pYj;tK
|
||||
Q*Zm@;,i3O=E`CE>NsJ^>lFBio@KHguiS9K9*HU6Bt<ta5`_p=HTk<M-QNKm&Y0m
|
||||
G/$T+rQ2*oAsB,AQ)ioB<,)eQQrDXl&8i9ge"!r%'TduY*WhR%^P=#8m'bXX+f8)
|
||||
%
|
||||
RR0=Pg->s0)up!'>H(5Q:$&3dB.V2>BR)=2/Iikf`0D%,H\7:UC/U;"0YUcSlc8J
|
||||
&W3829MenWFm`T+OmaC)/LDe1YjHSV2j7S28=L=[2JZ*-0dMd-heftJVA$$\JQ&G
|
||||
mC5.ah82/T1!ZW6a!R,+H+#Y<2*F+M6ph)Lt?kuC[SV.Psg.8%QY4#AP0drK:VQ)
|
||||
QZgN0l]WeU(ON#P)!pWo6RJbp]4<jfUCq34<"^R+fCTG8;)>rr>G/cE7k]m\A>kr
|
||||
AsOIh*^cd0*5:-%3=c[%pbs'i:Z_%c75q8[?[ogc*H<+,Y(eO'S[n[pGq;GYQ=TZ
|
||||
e[@ZJYY(4;Xk]C6LCOmMa\tVucu0"D4&gVIE`Lk"C?Lg^Ud\KAOAq;q&>sOQ4L/_
|
||||
n8lD\CQ%+SSI5Q'u3.rbSQM3Z.T^m,nrr>d#IW]A$.\WM5o$aOK\@&:kDc04X;Tc
|
||||
<!E.NuFUlV/`*SN-3Lh!oAJ<o/"R[2F&S3c0;B\n-#o&oC<H@Jr<S#@Z;02NX>-R
|
||||
Ea+Zr37F#u9CnOqsjWc8q#[X)2=P<Gbkj]3WTUh&[%M4F(^RpHhF\[c;*t<Tp!i*
|
||||
;^)LJejG6b"j.4f"S+U;O"",<;eMI26Z\;>SOC^M#%AIQIgrlC&QS$V,V8o4tj:f
|
||||
;r/!m7u&+kk`mH3+5X$,<#2OJ]482o:sbK_-+o%qOKXpF/Dt0nEhi9,A[>"RC@-/
|
||||
+"n]sN>Dcn!EKI@CO#hq1*EY>\Zn)?XOhhdanX<*<hI9\o&=o2Q3@]Ho;UVJt+ZT
|
||||
lTJu(&6,7%()aiCU.(V?3l?+h8P=Q"WKFF1Mm`%,qR8Kf,6<LoggiCQ.OS5eX8</
|
||||
XK%G+"TRH)N='r!-9(X\mYK!`eZ?P+;AX\2uH4<9C6HJs,Nt80EpX(d.fuN,&#X;
|
||||
Q?2!fU$qIb<u`.;0kPsLl<M,(VA7YoDk&%b!>f8VQ?,-0D9(G)!*h$D(@$i$#N'3
|
||||
;LQC@Uh^]7ZGP-Q5/>FNMbFMr&_p2TfpZ&hBi<*_Pc[#gcQdR&lRbbMPa3FVBY.G
|
||||
"X%T(@9QDf)+V!f`+/2Ya:Td6lX]5_bHS`(RO*:<*=c@gh;\">33#78CW/QjtPCR
|
||||
nWSRm)V8%Mp+QM4AkbF<E!\LjI6iDX,*m3t.!62?QDpXO$3n94-KU:mG]+VX3CoG
|
||||
+h^CQ>N7XgKa-M'QT((uqUh&jIC`&gO,>cMK5!PU6:ZRsQIi.8\))g_j38]<Xmgl
|
||||
INAcLSgoJm/2-I1rG5kBP=c,,Q^4[,iaoldVPXAOL$d&m7\ilalh_"0hP?.V(#$9
|
||||
1B.>qg@V>biA)sD]YAKBP`UA@<OS/fdm/C^NG<rFWYU*J33/$>DQ%GCBKCFJel%f
|
||||
D99@SG?nK^PUSj[r[FCX]Yu*-$fZ@*,QNiQ+cSg(<JeG/,g]G(c.^>YJ(A=P1/kL
|
||||
`LPPC'`gNh9)3O-='EdA@kU4%)grMC?#B:"/m)oC?%&<I2E_R+u(Ilea;F2LA#[3
|
||||
gffh!AlAPY$6Bpsed^8b_^*rTfNL`Z.I1QR0lCR;d=B@&kd2UnA.nnQ5QfM,K^p(
|
||||
"kA!D2&u596FtM.3>:RVAZipI^$a;mM:-L+MB5B(8%#YQG7":0M9"LN]F*41l[)E
|
||||
\\!2hR&Q%l$:8oHV-ZdLH/7qZeP>oEnY(rn<g/(3R!0"CpIu.hiT+qIOPa?%7iZ.
|
||||
YneeE%LK@W$)o\:_Ydl2o00$h3;WDIT9$`ka#OUhU8m"DZV%eR_8L33o3g3ff0@m
|
||||
2)MFG,>$=_F=;]\7F+FAWS^S(;(2qN40frXq+Q%h(%@JJ,*FFo*0<o>mMP`19t);
|
||||
KJtBBrL4&bWl/[`XLb6b0SQ;V?2HV:EM(B]u+<?pPoffDLb3kdm5/I!4Hqbnb;`_
|
||||
e`SC%SB@NE<(['&A<WY'k!s.ooWRk@bE2d1,S[d0(0,[L)Y2I+3AA73;Nucp4]P!
|
||||
H@nRHD6QW4b&tP=2UlF).X=*T(8@\r]F5qU*e'C=&EBK)2C#X16S5.AO$E[H\(3!
|
||||
2V(##7WLs(Ua8Z-WrrD1rk=V`<Z(60A<T[VD5:-P<.L/pTS\%@P-J[l']3EnE6?u
|
||||
od<\U="cXMY7rKU0*<Bg]T,'')+0<`5tB5IP9GBB'$*Q_&?@Sl#GH$\L.5G1B#NM
|
||||
rClL0VI9EMX:%:_Wpp9u0gK.eOHP>gn(G`=4D,#"i6#85.,b^aTMO&]btJZ]8cr9
|
||||
#l)qMW:Wfc'G852beZ@92,QgNPF\P*IPu3h$"OlRM*]-OHa[:du(r\8s0K.o;`<g
|
||||
h_,AE6Z'iFZYhEWi+]W02n89#Weo[`ohhYYg1#4(>?;hU[[cd9hF=lZEufno=8hY
|
||||
sB9U@`*#c=fBjNNp*-U,epQ1XelIF;7-,pK`n$)R?24Se45UAY>nu7UUELhF)[l%
|
||||
MlM]K3&*E4F_4HrI*l;NhXB7LIS"-]<k6X=C&=jbYF6F5F7R0>"+$5j9f-+jtcW?
|
||||
</pKa`AZ5>0+bWU;g)"fc[/BqQ>;='\FaY+rX%'X&)Ug>M79Ohe"KXY4O<pd#rWk
|
||||
uHa-):7E(YB&AbM:drO,Ro87k1'u9/,0t^ggR"d!pf?\V(<%Xh]]CDFXp&I'tIj*
|
||||
l,QK@g?ja-lL[E*.URST`r''2hc+eH+V(1SpSA!-D$j,:<SlQ/XL=H_pA7NSmsoS
|
||||
oL.?O8?Pd$a]AR-FC8Qg2$#2tRA-U)!;kBJ`S9n=;.8!L&V(#BfJ*FR/?btXtc!9
|
||||
L54YegrFc*kC73@^"X(=WTFX/Oub@XZ%m"`\VBT/adkLKGY8G>61a#-/8VKI!o;f
|
||||
TED[+jMDD@N9G\GSToKReT,#299DiCG"@i,d0M'fUHI2]g^dcrO^0[\Y5FjhO@H7
|
||||
7#+S,_!&KEL^F%*gO0L;7.I?NM`@(g+:fqM)3T6!,ZN:df=J74s^VIJ2fD6YN.ai
|
||||
MRbSbYj@4&&=PjDgp^6%+6R;(;m<"(!YZ.*Ua;DqV5,Kd.0'DE=%+Q1;S:k/]&]D
|
||||
jHOV:uVfhJAiP[CC(a3c2mTR0RQ%^^jSk$If6-tai\@K2@U?-Q[j)6o[NA@:O$<e
|
||||
H:H39e/cdK:GKlL@'/Gpp@Hpm;'D=LcM)qNpiSG<.?Ed6W9[BHon(A):m(?fXsLk
|
||||
OX,EKkG.%qLrZT^k3lZ!=l[>^\E./6\$K95/h#_^4K)[(N@f-cdH&anjRG<gmH@E
|
||||
9(VqPCG'559We1U"p@9`?a@j"To"bf*iU.\oV.kfO'J_IDSl.]/i<0,t_jH'Vm+u
|
||||
42se%9mSs3PbhuVV(3:L<BPbKFoMH\o`"pJ%9t>^/N8fq22XZgpX'N,YVT>6e6-V
|
||||
!QW/X);@6=-OcU)[CMe@HgPhFDlO2Jj?(-ONZeNr[PUd%W+7bJ1kL-JY@noA=G"/
|
||||
TQ$C$2lWD5)cS6=p<A*cC0$B*E5<5!@KTf<[`Tuf)+Kat/#YT$Zn'pD\`;O""-]+
|
||||
H37U>6WG;/D,^Y$?AS!9$r[5jCg"o2P*8KkcPCR]9"q9K&&Dg!I*f6YD+dK@$fpl
|
||||
/<]ZY3Y51O)^PVV7&^m(R-!Mkj>12k6#LV4?,;@I0\2p*jk3:[IVPeUUSu'_dRQn
|
||||
d\8e)]2Zq7!h3Pb-`G,_H,Ahs0"%=J?oN(^$<n;/),n!;>Z.,]&29iTFMU*,"4'*
|
||||
f<47d<_Y"6g0Qa,6.T['r8MZ%9PIVt?Z(1gEGY^V+l]pnqBMoL!=rMO5,=<u$c_:
|
||||
VCI_qfqHFclWnCU&HBhA7KUmGHc16]aC[%[,p7G*eQ/uia@f*==Yd4'M(C<&`9Xf
|
||||
-14f%+HjX9F@7#4E!g"2.oPPam%J@1N80X6W]-NBqHr"f;um]\i7agduAFcQ=nWK
|
||||
b(=@;O"",8lDYqrnOZ+q?6fuhA')f<DQ?h!5JJDrY?mX!ER?@]VR%E/N7r.-mcC7
|
||||
d4`//*!E%MCh2_^8Zu-oL8n=jCCM_7EFBFjqs^1X1PIl@Zfj=m)>C1c.8#9(hB'+
|
||||
3X\k>t.M]d8@8DK!2YIK>#kU)XhPTO;Z+_l)h_%cF[Ubp+KpP$FHiF*%;At7b4f>
|
||||
3uG%5KSr+?oBLD0en.S0X$OmAUQ<C+%dM*Be7.i`m^\nn>3Tqj.qjb1#+;OhW"H=
|
||||
n*%l\`*Yf!9HC?8HDV^8(p[3heU@Tih,7LH53^?SOE3W0[YA[58TPUcP0)o%I5O=
|
||||
XqHWZ9/KPi@=KkY)->n,@n,sAc&QfmFrLB%/[P^5ERhJrLUR%@W]V,;9/DH!=Ma(
|
||||
!",lY`Caq2"emTPGJZiuGsP)CpAs]Q-hc,=BC9PEmVigj7!:oMQBtfo\W)iI7=;#
|
||||
'Ga%EA[E3p,>j_eO?s[*F.A`uS?q0T_i&Cgairic_p&)Da:PEJ%,(-8]\KDN?=\e
|
||||
Y(&ind4j#*^uAqr5Q)/PT@A,>%TC/WkXQmc-c:&VT*L@,lD(i2fY='.k0V%b+OI[
|
||||
KUbrr?$q)P"4m/bbL5i1qYo2uIG@n@I$>=q?H;l7,8fV(#DFL3m'fI4VK2qe%D/8
|
||||
ucU!ST1`34Pu$gab83IPc>4iK%6ISG*@&?F%p!\D7QYLPsfj+M-_pR8DDH9-jnX=
|
||||
^"r&%:moL-V7(<[='K8WEuDt;C_BJQGu!cgo3&]k4YM;;,1Z23mj`8Z]`L#<HdU/
|
||||
<\0l/)3@#O&Zg&L4OcHC:\Sj[[f9i\5Hpjq'`cCD17iP>aJjrL,X51MO%dOibD=X
|
||||
*Z_&P&'Kb*!CDc_a@Ib*o'jRHh473QPmAU)uq*$f0r'j[#P\`uV\(78^q!%DVcm]
|
||||
rO>1`G]<97n`BbE'>(lMWn`f,Z_gHKT7>.Eh'IK&imR2M+qjPbBN.,Rj5(/(3ZZ(
|
||||
O\5Z^UkB<K+9KsKggb9H,c).^i%#N60At''=3ZG$0AbSQ926""\(hCrrCrr<DuZG
|
||||
/T8Z(GHJ*>@i4X"_Ff;%0i_r=#IKF-2bbk\ZPkW;](?;(XiS*U<)19O5meLiktrW
|
||||
UOWbA1X3.pq74p:a;,sZ8<1U#a(!k1b8?3s=/Z$47ph7o'mm:RsUn,E(/gUGsY.i
|
||||
bSQ^N:bT(R[:OI6mbKWPBTk%fo/'SlII_+mUN\]@AE'HN.BD.%K`9$3$UI<\J.2!
|
||||
Q>89u',Z5T<\FOkiJ/c`$$o]"XZhQdXUuW<F_"&K4+V-i*XhaF;\/iY9On%6WI[f
|
||||
?g=;%B"/CO#t450X!$rLk.VZin\c`N]s$_='+O\`oRqJJl.Ou>k;<GX,PZ5ceDu5
|
||||
Vm]]!6+G&_`fQmF]5DRHFVseSRFZU=Ua3YgB;%=PTn5A4O4A4m'PI56`C<>JY$5P
|
||||
YN:a!Md2dA.lZ+]i4Ul9LW=GmK"Up?0KmO`PdZgS.UEb8'G6`3e?)<4'DRb2cX%b
|
||||
(IV@gF>lIZ%9C26QD!/eWXf2dc,^(^X"$35Z35o^t]Y"?tu-X9m&(jaRQC"_CthD
|
||||
(:U]b#@Z\2B%`PddCb1::]k1XdaV.:<#rCb,83I@!W2[-F5@R#,7n$f:K4>+AfPh
|
||||
+AsgT0GBt\EHXGFHuAoD(R)(8M76D0XVSG,m>Rmo3.o4GG_*-7$QFfpK@\BaaM3]
|
||||
IYh6aX$&md)`)]m6K0TYa)EU?ZQU1@_l6I1<'L<^ps]F^-F&;\j0O/okB/03(k+h
|
||||
6^*G6BVOU1;5RQ^QH6.^^m/s_,3!650BM%KbVFl[@!_$urN12sZ)M_6rXoK2JR/:
|
||||
<t[%AWj^CgJG)P_0c.%R!TKmKuX2VXWeN83,q--&YH!ga*e4&heHH5$#@[`6g@a:
|
||||
I&Pgg\0+a;rc"Td[G*7=HBL;>HK9@iSQD92nHn;W22H)7F"p@G&DXYbJ@#b*A!-X
|
||||
QT%XH8hB*@3=u\J+RHXBj*8I'^N1t^C#,4QWe71jCaMq4"%mkF\^ES;)0LpZ_XJu
|
||||
!"Gfo)f[/iEhR"D1R$j/PPW(mhP:\!bmh=GjlJ-'@<VqYN2R?ea[mb,>h::m?-YB
|
||||
J,M=DY-[-3;nS)F?5lI2u"m;LaT5%QWIX^Z-G71/Y@?=*`/@'fd3?0qYO?>ZbB>o
|
||||
asgkON;dc(hdO@%q8WVd?g3R2BI"7T"r*/Ojnb_[VbUIeXc85__2+d?P*YF[8X^W
|
||||
5dB!;a+56]A;W?."$&q1Qb(rrAXpCTY8`)FAq[F(O0IJf&KUe7=^*atT?84*>Did
|
||||
@#buL;[,^@?b#)KJqP-U^r;tJ-B%h8lD]*eH\0+^RfJq(l8+5Vi%h/Wk(!UQE'#<
|
||||
m(3&n!.o*j<2D$9;O"",=<nAJ_"Y!!4r]#1[o9]YTEToK]gbe$K4mi\>2ibg[b4_
|
||||
THS'n/oP"a>&/3G=Eg*,oU"(pt-fL>en#`QSj^klbha2Td<blT'OGOk_aJRORKYq
|
||||
X0Uuqn+"FW`ha&qZP<orPTWEZQ/?8e^PcZn2=KuSJ;nVeOrl-sQ6obRMGFdYDLTn
|
||||
XJA&cm7Y;IH#?TC.\bG_&RtS"8!ki_a0?-=gHnf,Yq:#m1EsOpeF6l/Cd:RF2bH&
|
||||
?GKcjYhB<Xan?"V?g(Nmhb<4LXN);G$B*OK$CG,G_e?7)/L[EeFc%Pn"i<c"`1G%
|
||||
^-"41*e4*bWcjW'.]$YSfm9^s">B@J<n^PT71\a>WE64`_>-"F>,b+lPbfg$<-@p
|
||||
1$VjkI\QiCm*L,XFk#q7I8!u5.O/^Cpgpa(=A5&B,pj7G"Ps/ZN@fX*A?n4ERDmj
|
||||
GU6]n+X$ILoso*mCr(5mg`LD7)7`@V#h(9De,k-[hVpm-c'lZLWr?>3&/@G,J".t
|
||||
IpB,sWkr8C*Et>s#)+f,@OlRl](@G\KmO[@HtE'_lWp`d/_AnngGg>:kk/LT4:N0
|
||||
6#$,W"MZlGXcXE<.&6Q@#DU2T%#,N!SJ:D;m/Jq_TM;Tp=-O%!"r7lQiK,r*-9Q3
|
||||
eskL,q\.tk1K]sh6Di;(V]?I4V#)3K^7hrqqoQS1Oo:?'chs63:*RlCfNBJb2NgZ
|
||||
.<pE_R18D^H\J!b5L(H,L?!'Ek4iuqfgXg4EHIU:rPpYLu/@LUoB^AWPQ[#SWrr>
|
||||
HUWG7E2H[2YKM9T4mZqQS*KggnE^6#.a`33p@_!20I4fd6d1o2[u@8L$>3k(,Ge.
|
||||
ho_e6/hh.\WLFk;?-:!/KWq4d(]3dZgRW8lCnW&+.s5qX:Y*9#un>Di"ek;UhNj-
|
||||
eJQobggJs=g&LrRJ73T;."/ZPU!ltQ)D\F,?C:NZX6k+=c%+0W2Q9/I?_I/8]a.B
|
||||
&YFBIlWZO+,fJL,KuYK4=mm'q;Oim1&tT*B=Sic$+g#5O7asd<+fWKn5$XnZ,t$.
|
||||
bn#p>m@^Ortmk/dN17h%jQ+n=L*.:B&G/fEX.-P+b/MP$G'&,q`8q);0._0]K2S$
|
||||
-m529GMgkJVDgXY+/=ZJRl3)D!*HMZ-<Qd&[06:LV%S)q=J2#D$2]TMKfI*_D'!;
|
||||
!AJL8D9BI1:REbrMbJ\%fHZ,V;#CJBA?91QF9BX;:OAM_nKNTS*U7.OmCXD&m@3H
|
||||
K*`W`JYrrY>;!!&&:-;U_5FA3_4(:NEVS'Z+CUYl[=J=!Bng)\J`^<.KKVrfi>;:
|
||||
"(gq_rQVh?&l98E[l96?#H.nl!VT'`$g*ncl:Z/*h4b/7Tg<?_;+AM)5TlkS3$tA
|
||||
9h3r&)']u:0[f6>4Zq3WF]!^oh^moiC<k;1nWb.YZm5nMSj<,!1'iiPE9^M"HrY6
|
||||
+H!7Xoeq3?$&FmDesR)N[%XABJ%P`S2p7:rf^bu":3m/>1;'q&+aV&(PZ.6pbI>t
|
||||
81rq&K#jrrACE`4=d44jaUAB:qlX-qJ&<.iJ8E>CW\:`1SL:Xe"T<Ii^E<Wq<^Vq
|
||||
b"F"__9>a49[#M(h@r*3$3J?50nR?CILU5a50LZP^ik=UgYZBk_/-B5(7m*<Q]i3
|
||||
mnYE7PkLlM>>=tMF$Y!&"m4WYIDQ?pXTX3,i(#7gl1t2`U?X.N>O:#9kSL^N6C]"
|
||||
K1#-*dJA<,Xq-3^YlX->;&<4!?"pnX]@`N>KY+)kq%0#PYX9A]f3?ke%bpc7b1JE
|
||||
:7rGV]90`M,>C?J3cp2U*4[9rH]?iL,F>k1$k3`h9bDTs94$d,XB)fcTgHf[3A(K
|
||||
6FD$!,C`Q@6L?A;KWf6YP^&[bYh!A)(1E+kS2i$#$AuV]c!>Hqm2>GCNS&[15pN<
|
||||
K;HB92HRpgp]"nPd6C:dK^X9?$#,Q"psXWXda3Naqa%WTLlW1'@qiJ*XZOn._ut`
|
||||
-c/BGQ9h^D5.PRkGdkJR"]3flL*jc7F>(:&-Ye/Q'l=o&`]WfH>TKjaMfopm@7>3
|
||||
Q37AH:kbobNXX>J'^ci`uGW=XAMWW<QNA%7!W4H*$<OtkKc6>p`T'\!s;ha-M]Fi
|
||||
Y>N;6OZ*Mpes,Wh3o(<r:Yj[*QgSK!I!QDA#DOqm/B[ujL2Af]D"Y=c(UTIoJK[O
|
||||
JQoL``?_.6[Mtm;Bd\f:h74h5)u7nT)#K(5H7PC"jN(^D<(MH_dSSJjre;&X&o]h
|
||||
-I5XY8Nf5QL4HVb^5i&AQaF+iRF.[nT!\HYFqjX8#p+QXg`MX<heptOrKA4"YT^F
|
||||
P^oOf,7+Hr3VWALFeAFh2ce`+qmoDI)Wbm&GpNkWZoEXM5ml6O:Q7P<pL*A/bOg$
|
||||
P[ct?FC!"*p+\5L(ECKsY,S!9RH3*K`4Y_:QN?RKqr"@Cm\5$9GZTHR"XDjGKGfW
|
||||
L;5X&<2%#U;$&___%h\,6h=@<DFOJ/0m+[cq1%=*tnKr/c,;Sck6C_#7'VGL6bdZ
|
||||
UL$(DIQ"NtE4"^a+7&)s",/Rlom#:guG)PA7Q(9XUkUJ-;].:2k6Z#X<dOELEAl6
|
||||
Yb.[\O;2ER!4>(FK]^]VGp;E8!sK.E,ji!oWG\B]i2<rm`:l5Ljmq-=Aa3#HQss]
|
||||
aiG^/=6"J.d]I]iR'=YDgG3EY3;IhAUKJJU8EF0,6_X4QgQ&=+eN^mK(;k0S(b\P
|
||||
de=eHQ^]VRI'9r%-bW5!H04pZA/sGXr?-6r$4PF[&D(W0T,t^c`3T(E4p6rYKFbu
|
||||
ZgmeV@TGB\):\)/J;H[6c/&k3R#g3dW"4T2:RB%9rl:"e[,T6Z%[n/PZ48S1RkUc
|
||||
3r:m6#iraiPOo_9H)a>,!=ObGB'AW,K?Aab5Jo4ST8#Uo,MS?TeWR"6]qD?V^<S*
|
||||
N^i5]9j'5m;dXoA2<?UD0s,Z=$epNX(Q*;T;es$Q`W"eVWeXaM"9@g\#3qAM(-a,
|
||||
&q'<;.cWdCeXE?!TC&2P5NX'O9jK2JR@Tr6C!rT:.a9!ST360QP+YdLaZLYKdQ9/
|
||||
1j/%`q4]K2heGZE!%aAp0'tQG9`G7OS8N7S5T0H4gQP.,]O4s6N6=9h3P/r]VLec
|
||||
k0:cE7;9W+^Zl[:bk_mA#S.i`(K8e!]-ARQ`29%'l?fepfodM$PIPf0dVA:&q@=?
|
||||
m3q.IS2U&4l@O253"!\mMNT#e+"IWll_W+,2GQUoDsN(rD+p_HY)&*0^2!bnXm(6
|
||||
i9*:`gsKU?+$9^>S+9EkE5iPfDs'=q2%6*a#-#/DYT]tY"b9=lul$r>7S:$pPC#0
|
||||
`s7]PJ$u#)NYbE/MqaQ9g=Sep)Kd2o/kT>uV!\L7,64<VPK0LbT$OSrFHrmu9TIg
|
||||
N6Fe]2-RIj4D"rh'IVm-<,6t*ncTG<tZ<`pdG"(o;:Z7=#&OX8&EY!k.[e8o?O1d
|
||||
AUL@&I#)OYXj1a1X$W`(ZNn2l2!Lecg;nT14Kl4q%W,dX??AZ[7?-:oiE>20Hh8k
|
||||
<-):WcH=5L$106Y+\d]/u!fdnbU;8m=]=9=n6_g3^dbC-3oF#:/phg:4NPQFpE`9
|
||||
:^EYgqthBgX=FXb3qF"KXNe%5Un%Po8c#r\pH*Z2_@+h-ekgZP00D]Vj"C8Y:3?^
|
||||
OuW*g;0k`(?L.ib1trJ2>Y*;$m9Q83;NdR5L@Mm*Tu[>n'mJ2*APU\*3,i!gUe6O
|
||||
)#YA,hb*#\d:SqkOZi**@c_R\oqohGe.bs?JD.1Aa*Qh`FA#B\YUFt8(mh]&4m^C
|
||||
chRa(!IW8T%:8SR+IUh=Zb8HV)(>r0H>crX=1'2Dd!aDQ+S4N,EcT(BQe\PeZfV+
|
||||
7BiZ/s"hGc<2.Nr9Jnl3l,*&]7ZUamP8?OKTQ&#slWQ5jO@>HE8+jW<[&/gFqOQW
|
||||
a&c+`Ml'7O9u%hNdS-4ql8$2T"A1<;L_QuTdFkcPYf9^;s@u8:t`t9G76AjF34%l
|
||||
J@4VNB4:/D<N=[hC?FmNnFo_/U<,q/,t@qc+F3V*SP3b2/U+YsSMp3dh]7M/+Jl.
|
||||
u-bSl3"*mJZ"\0t'j3K`g%6L?Rp7BNIqK_CR-;3W+@Dp8,?euEYTuVfd1X6=!("!
|
||||
C[?/\?%f8kMUk#tk@ji'mWa_[eF$VHH_J>.%U0IrGaK"O1>of>Karr<hLbtOab9>
|
||||
IBg#=?:"NWCBDe(VBABcGM>b=C>f&K_Ht[5S^imus!>]37r6Glr$M?BnNKO(Z%1l
|
||||
#V/ulU,R3F[8b^>Z_=m`^gHUC&Xs?5J5nK)`dou#j+?'fVrX-Qa>q\pp7eS."%i&
|
||||
[7'H;S963V:ZkXJV(#$U.l=(O8liBb<LfT;f#gmTV(#%45pUMY<2D$GXO<?0/-"9
|
||||
~>
|
||||
%%EOF
|
BIN
gnugo/doc/oldlogo.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
844
gnugo/doc/overview.texi
Normal file
|
@ -0,0 +1,844 @@
|
|||
|
||||
This chapter is an overview of the GNU Go internals. Further
|
||||
documentation of how any one module or routine works may be found in
|
||||
later chapters or comments in the source files.
|
||||
|
||||
GNU Go starts by trying to understand the current board position as
|
||||
good as possible. Using the information found in this first phase, and
|
||||
using additional move generators, a list of candidate moves is generated.
|
||||
Finally, each of the candidate moves is valued according to its territorial
|
||||
value (including captures or life-and-death effects), and possible
|
||||
strategical effects (such as strengthening a weak group).
|
||||
|
||||
Note that while GNU Go does, of course, do a lot of reading to analyze
|
||||
possible captures, life and death of groups etc., it does not (yet) have
|
||||
a fullboard lookahead.
|
||||
|
||||
@menu
|
||||
* Examining the Position:: Gathering Information
|
||||
* Move Generators:: Selecting Candidate Moves
|
||||
* Move Valuation:: Selecting the best Move
|
||||
* Detailed Sequence of Events:: Outline of @code{genmove()}.
|
||||
* Roadmap:: Description of the different files.
|
||||
* Coding Styles:: Coding conventions.
|
||||
* Navigating the Source:: Navigating the Source.
|
||||
@end menu
|
||||
|
||||
|
||||
@node Examining the Position
|
||||
@section Gathering Information
|
||||
|
||||
This is by far the most important phase in the move generation.
|
||||
Misunderstanding life-and-death situations can cause gross mistakes.
|
||||
Wrong territory estimates will lead to inaccurate move valuations.
|
||||
Bad judgement of weaknesses of groups make strategic mistakes likely.
|
||||
|
||||
This information gathering is done by the function @code{examine_position()}.
|
||||
It first calls @code{make_worms()}.
|
||||
|
||||
Its first steps are very simple: it identifies sets of directly connected
|
||||
stones, called @dfn{worms}, and notes their sizes and their number of
|
||||
liberties.
|
||||
|
||||
Soon after comes the most important step of the worm analysis:
|
||||
the tactical reading code (@pxref{Tactical Reading}) is called for every
|
||||
worm. It tries to read
|
||||
out which worms can be captured directly, giving up as soon as a worm
|
||||
can reach 5 liberties. If a worm can be captured, the engine of course
|
||||
looks for moves defending against this capture. Also, a lot of effort
|
||||
is made to find virtually all moves that achieve the capture or defense
|
||||
of a worm.
|
||||
|
||||
After knowing which worms are tactically stable, we can make a first
|
||||
picture of the balance of power across the board: the @ref{Influence}
|
||||
code is called for the first time.
|
||||
|
||||
This is to aid the next step, the analysis of dragons. By a @dfn{dragon}
|
||||
we mean a group of stones that cannot be disconnected.
|
||||
|
||||
Naturally the first step in the responsible function @code{make_dragons()}
|
||||
is to identify these dragons, i.e. determine which worms cannot be
|
||||
disconnected from each other. This is partly done by patterns, but
|
||||
in most cases the specialized readconnect code
|
||||
@comment FIXME: Put in cross-ref here once Connection is documented
|
||||
is called. This module does a minimax search to determine whether two
|
||||
given worms can be connected with, resp. disconnected from each other.
|
||||
|
||||
Then we compute various measures to determine how strong or weak any given
|
||||
dragon is:
|
||||
@itemize @bullet
|
||||
@item A crude estimate of the number of eyes is made.
|
||||
@item The results of the influence computations is used to see which dragons
|
||||
are adjacent to own territory or a moyo.
|
||||
@item A guess is made for the potential to escape if the dragon got
|
||||
under attack.
|
||||
@end itemize
|
||||
|
||||
For those dragons that are considered weak, a life and death analysis
|
||||
is made (@pxref{The Owl Code}). If two dragons next to each other are found
|
||||
that are both not alive, we try to resolve this situation with the semeai
|
||||
module.
|
||||
|
||||
For a more detailed reference of the worm and dragon analysis (and
|
||||
explanations of the data structures used to store the information),
|
||||
see @xref{Worms and Dragons}.
|
||||
|
||||
The influence code is then called second time to make a detailed analysis
|
||||
of likely territory. Of course, the life-and-death status of dragons are
|
||||
now taken into account.
|
||||
|
||||
The territorial results of the influence module get corrected by the break-in
|
||||
module. This specifically tries to analyze where an opponent could break
|
||||
into an alleged territory, with sequences that would be too difficult to
|
||||
see for the influence code.
|
||||
|
||||
|
||||
@node Move Generators
|
||||
@section Move Generators
|
||||
@cindex move generation
|
||||
@cindex move generators
|
||||
@cindex move reasons
|
||||
|
||||
Once we have found out all about the position it is time to generate
|
||||
the best move. Moves are proposed by a number of different modules
|
||||
called @dfn{move generators}. The move generators themselves
|
||||
do not set the values of the moves, but enumerate justifications for
|
||||
them, called @dfn{move reasons}. The valuation of the moves comes
|
||||
last, after all moves and their reasons have been generated.
|
||||
|
||||
For a list and explanation of move reasons used in GNU Go, and how they
|
||||
are evaluated, see @xref{Move Generation}.
|
||||
|
||||
There are a couple of move generators that only extract data found in
|
||||
the previous phase, examining the position:
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{worm_reasons()}
|
||||
@findex worm_reasons
|
||||
@quotation
|
||||
Moves that have been found to capture or defend a worm are proposed as
|
||||
candidates.
|
||||
@end quotation
|
||||
|
||||
@item @code{owl_reasons()}
|
||||
@findex owl_reasons
|
||||
@quotation
|
||||
The status of every dragon, as it has been determined by the owl code
|
||||
(@pxref{The Owl Code}) in the previous phase, is reviewed. If the status
|
||||
is critical, the killing or defending move gets a corresponding move
|
||||
reason.
|
||||
@end quotation
|
||||
|
||||
@item @code{semeai_move_reasons()}
|
||||
@findex semeai
|
||||
@quotation
|
||||
Similarly as @code{owl_reasons}, this function proposes moves relevant
|
||||
for semeais.
|
||||
@end quotation
|
||||
|
||||
@item @code{break_in_move_reasons()}
|
||||
@quotation
|
||||
This suggests moves that have been found to break into opponent's territory
|
||||
by the break-in module.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
The following move generators do additional work:
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item @code{fuseki()}
|
||||
@findex fuseki
|
||||
@quotation
|
||||
Generate a move in the early fuseki, either in an empty corner of from
|
||||
the fuseki database.
|
||||
@end quotation
|
||||
|
||||
@item @code{shapes()}
|
||||
@findex shapes
|
||||
@quotation
|
||||
This is probably the most important move generator.
|
||||
It finds patterns from @file{patterns/patterns.db},
|
||||
@file{patterns/patterns2.db}, @file{patterns/fuseki.db}, and the joseki
|
||||
files in the current position. Each pattern is matched in each
|
||||
of the 8 possible orientations obtainable by rotation and
|
||||
reflection. If the pattern matches, a so called "constraint"
|
||||
may be tested which makes use of reading to determine if the
|
||||
pattern should be used in the current situation. Such
|
||||
constraints can make demands on number of liberties of
|
||||
strings, life and death status, and reading out ladders,
|
||||
etc. The patterns may call helper functions, which may
|
||||
be hand coded (in @file{patterns/helpers.c}) or
|
||||
autogenerated.
|
||||
|
||||
The patterns can be of a number of different classes
|
||||
with different goals. There are e.g. patterns which
|
||||
try to attack or defend groups, patterns which try to
|
||||
connect or cut groups, and patterns which simply try
|
||||
to make good shape. (In addition to the large pattern
|
||||
database called by @code{shapes()}, pattern matching
|
||||
is used by other modules for different tasks throughout
|
||||
the program. @xref{Patterns}, for a complete documentation
|
||||
of patterns.)
|
||||
@end quotation
|
||||
|
||||
@item @code{combinations()}
|
||||
@findex atari_atari
|
||||
@quotation
|
||||
See if there are any combination threats or atari sequences and either
|
||||
propose them or defend against them.
|
||||
@end quotation
|
||||
|
||||
@item @code{revise_thrashing_dragon()}
|
||||
@findex revise_thrashing_dragon
|
||||
@quotation
|
||||
This module does not directly propose move: If we are clearly ahead,
|
||||
and the last move played by the opponent is part of a dead dragon, we
|
||||
want to attack that dragon again to be on the safe side. This is done
|
||||
be setting the status of this @dfn{thrashing dragon} to unkown and
|
||||
repeating the shape move generation and move valution.
|
||||
@end quotation
|
||||
|
||||
@item @code{endgame_shapes()}
|
||||
@findex endgame_shapes
|
||||
@quotation
|
||||
If no move is found with a value greater than 6.0, this module matches a
|
||||
set of extra patterns which are designed for the endgame. The endgame
|
||||
patterns can be found in @file{patterns/endgame.db}.
|
||||
@end quotation
|
||||
|
||||
@item @code{revise_semeai()}
|
||||
@findex revise_semeai
|
||||
@quotation
|
||||
If no move is found, this module changes the status of opponent groups
|
||||
involved in a semeai from @code{DEAD} to @code{UNKNOWN}. After this,
|
||||
genmove runs @code{shapes} and @code{endgame_shapes} again to see if a
|
||||
new move turns up.
|
||||
@end quotation
|
||||
|
||||
@item @code{fill_liberty()}
|
||||
@findex fill_liberty
|
||||
@quotation
|
||||
Fill a common liberty. This is only used at the end
|
||||
of the game. If necessary a backfilling or backcapturing
|
||||
move is generated.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@node Move Valuation
|
||||
@section Move Valuation
|
||||
|
||||
After the move generation modules have run, each proposed candidate
|
||||
move goes through a detailed valuation by the function
|
||||
@code{review_move_reasons}. This invokes some analysis to try to turn
|
||||
up other move reasons that may have been missed.
|
||||
|
||||
The most important value of a move is its territorial effect.
|
||||
@pxref{Influence and Territory} explains in detail how this is determined.
|
||||
|
||||
This value is modified for all move reasons that cannot be expressed
|
||||
directly in terms of territory, such as combination attacks (where it
|
||||
is not clear which of several strings will get captured), strategical
|
||||
effects, connection moves, etc. A large set heuristics is necessary
|
||||
here, e.g. to avoid duplication of such values. This is explained in
|
||||
more detail in @ref{Valuation}.
|
||||
|
||||
|
||||
@node Detailed Sequence of Events
|
||||
@section Detailed Sequence of Events
|
||||
|
||||
First comes the sequence of events when
|
||||
@code{examine_position()} is run from @code{genmove()}. This
|
||||
is for reference only.
|
||||
|
||||
@format
|
||||
@code{purge_persistent_caches()}
|
||||
@code{make_worms()}:
|
||||
@code{compute_effective_sizes()}
|
||||
@code{compute_unconditional_status()}
|
||||
@code{find_worm_attacks_and_defenses()}:
|
||||
for each attackable worm:
|
||||
set @code{worm.attack}
|
||||
@code{change_attack()} to add the attack point
|
||||
@code{find_attack_patterns()} to find a few more attacks
|
||||
for each defensible worm:
|
||||
set @code{worm.attack}
|
||||
@code{change_defense()} to add the defense point
|
||||
@code{find_defense_patterns()} to find a few more defense moves
|
||||
find additional attacks and defenses by testing all
|
||||
immediate liberties
|
||||
find higher order liberties (for each worm)
|
||||
find cutting stones (for each worm)
|
||||
improve attacks and defenses: if capturing a string defends
|
||||
another friendly string, or kills an unfriendly one, we
|
||||
add points of defense or attack. Make repairs if adjacent
|
||||
strings can both be attacked but not defended.
|
||||
find worm lunches
|
||||
find worm threats
|
||||
identify inessential worms (such as nakade stones)
|
||||
@code{compute_worm_influence()}:
|
||||
@code{find_influence_patterns()}
|
||||
@code{value_influence()}
|
||||
@code{segment_influence()}
|
||||
@code{make_dragons()}:
|
||||
@code{find_cuts()}
|
||||
@code{find_connections()}
|
||||
@code{make_domains()} (determine eyeshapes)
|
||||
@code{find_lunches()} (adjacent strings that can be captured)
|
||||
@code{find_half_and_false_eyes()}
|
||||
@code{eye_computations()}: Compute the value of each eye space.
|
||||
Store its attack and defense point.
|
||||
@code{analyze_false_eye_territory()}
|
||||
for each dragon @code{compute_dragon_genus()}
|
||||
for each dragon @code{compute_escape()} and set escape route data
|
||||
@code{resegment_initial_influence()}
|
||||
@code{compute_refined_dragon_weaknesses()} (called again after owl)
|
||||
for each dragon @code{compute_crude_status()}
|
||||
@code{find_neighbor_dragons()}
|
||||
for each dragon compute surround status
|
||||
for each weak dragon run @code{owl_attack()} and @code{owl_defend()}
|
||||
to determine points of attack and defense
|
||||
for each dragon compute dragon.status
|
||||
for each thrashing dragon compute owl threats
|
||||
for each dragon compute dragon.safety
|
||||
@code{revise_inessentiality()}
|
||||
@code{semeai()}:
|
||||
for every semeai, run @code{owl_analyze_semeai()}
|
||||
@code{find_moves_to_make_seki()}
|
||||
@code{identify_thrashing_dragons()}
|
||||
@code{compute_dragon_influence()}:
|
||||
@code{compute_influence()}
|
||||
@code{break_territories()} (@pxref{Break Ins})
|
||||
@code{compute_refined_dragon_weaknesses()}
|
||||
@end format
|
||||
|
||||
Now a summary of the sequence of events during the
|
||||
move generation and selection phases of @code{genmove()}, which
|
||||
take place after the information gathering phase has been completed:
|
||||
|
||||
@format
|
||||
@code{estimate_score()}
|
||||
@code{choose_strategy()}
|
||||
@code{collect_move_reasons()}:
|
||||
@code{worm_reasons()}: for each attack and defense point add a move reason
|
||||
@code{semeai_reasons()}: for each dragon2.semeai point add a move reason
|
||||
@code{owl_reasons()}: for each owl attack and defense point add a move reason
|
||||
@code{break_in_reasons()}: for each breakin found add a move reason
|
||||
@code{fuseki()}
|
||||
@code{break_mirror_go()}
|
||||
@code{shapes()}: match patterns around the board (@pxref{Patterns Overview})
|
||||
@code{combinations()}: look for moves with a double meaning and other tricks
|
||||
@code{find_double_threats()}
|
||||
@code{atari_atari()}
|
||||
@code{review_move_reasons()}
|
||||
if ahead and there is a thrashing dragon, consider it
|
||||
alive and reconsider the position
|
||||
@code{endgame_shapes()}
|
||||
@code{endgame()}
|
||||
if no move found yet, revisit any semeai, change status of dead opponent
|
||||
to alive, then run @code{shapes()} and @code{endgame_shapes()} again
|
||||
if no move found yet, run @code{fill_liberty()}
|
||||
@end format
|
||||
|
||||
@node Roadmap
|
||||
@section Roadmap
|
||||
|
||||
The GNU Go engine is contained in two directories, @file{engine/} and
|
||||
@file{patterns/}. Code related to the user interface, reading and
|
||||
writing of Smart Game Format files, and testing are found in the
|
||||
directories @file{interface/}, @file{sgf/}, and @file{regression/}. Code
|
||||
borrowed from other GNU programs is contained in @file{utils/}. That
|
||||
directory also includes some code developed within GNU Go which is not
|
||||
go specific. Documentation is in @file{doc/}.
|
||||
|
||||
In this document we will describe some of the individual files comprising
|
||||
the engine code in @file{engine/} and @file{patterns/}. In @file{interface/}
|
||||
we mention two files:
|
||||
|
||||
@itemize
|
||||
@item @file{gmp.c}
|
||||
@quotation
|
||||
This is the Go Modem Protocol interface (courtesy of
|
||||
William Shubert and others). This takes care of all the
|
||||
details of exchanging setup and moves with Cgoban, or any
|
||||
other driving program recognizing the Go Modem Protocol.
|
||||
@end quotation
|
||||
@item @file{main.c}
|
||||
@quotation
|
||||
This contains @code{main()}. The @file{gnugo} target is
|
||||
thus built in the @file{interface/} directory.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@subsection Files in @file{engine/}
|
||||
|
||||
In @file{engine/} there are the following files:
|
||||
|
||||
@itemize @bullet
|
||||
@item @file{aftermath.c}
|
||||
@quotation
|
||||
Contains algorithms which may be called at the end of the game to generate
|
||||
moves that will generate moves to settle the position, if necessary playing
|
||||
out a position to determine exactly the status of every group on the board,
|
||||
which GNU Go can get wrong, particularly if there is a seki. This module is
|
||||
the basis for the most accurate scoring algorithm available in GNU Go.
|
||||
@end quotation
|
||||
@item @file{board.c}
|
||||
@quotation
|
||||
@findex trymove
|
||||
@findex popgo
|
||||
@findex is_legal
|
||||
This file contains code for the maintenance of the board. For example
|
||||
it contains the important function @code{trymove()} which tries a move
|
||||
on the board, and @code{popgo()} which removes it by popping the move
|
||||
stack. At the same time vital information such as the number of
|
||||
liberties for each string and their location is updated incrementally.
|
||||
@end quotation
|
||||
@item @file{breakin.c}
|
||||
@quotation
|
||||
Code to detect moves which can break into supposed territory and moves
|
||||
to prevent this.
|
||||
@end quotation
|
||||
@item @file{cache.c} and @file{cache.h}
|
||||
@quotation
|
||||
As a means of speeding up reading, computed results are cached so that
|
||||
they can be quickly reused if the same position is encountered through
|
||||
e.g. another move ordering. This is implemented using a hash table.
|
||||
@end quotation
|
||||
@item @file{clock.c} and @file{clock.h}
|
||||
@quotation
|
||||
Clock code, including code allowing GNU Go to automatically
|
||||
adjust its level in order to avoid losing on time in tournaments.
|
||||
@end quotation
|
||||
@item @file{combination.c}
|
||||
@quotation
|
||||
When something can (only) be captured through a series of ataris or
|
||||
other threats we call this a combination attack. This file contains code
|
||||
to find such attacks and moves to prevent them.
|
||||
@end quotation
|
||||
@item @file{dragon.c}
|
||||
@quotation
|
||||
This contains @code{make_dragons()}. This function is executed before
|
||||
the move-generating modules @code{shapes()} @code{semeai()} and the
|
||||
other move generators but after @code{make_worms()}. It tries to connect
|
||||
worms into dragons and collect important information about them, such as
|
||||
how many liberties each has, whether (in GNU Go's opinion) the dragon
|
||||
can be captured, if it lives, etc.
|
||||
@end quotation
|
||||
@item @file{endgame.c}
|
||||
@quotation
|
||||
Code to find certain types of endgame moves.
|
||||
@end quotation
|
||||
@item @file{filllib.c}
|
||||
@quotation
|
||||
Code to force filling of dame (backfilling if necessary)
|
||||
at the end of the game.
|
||||
@end quotation
|
||||
@item @file{fuseki.c}
|
||||
@quotation
|
||||
Generates fuseki (opening) moves from a database. Also generates moves
|
||||
in empty corners.
|
||||
@end quotation
|
||||
@item @file{genmove.c}
|
||||
@quotation
|
||||
This file contains @code{genmove()} and its supporting
|
||||
routines, particularly @code{examine_position()}.
|
||||
@end quotation
|
||||
@item @file{globals.c}
|
||||
@quotation
|
||||
This contains the principal global variables used by GNU Go.
|
||||
@end quotation
|
||||
@item @file{gnugo.h}
|
||||
@quotation
|
||||
This file contains declarations forming the public interface to
|
||||
the engine.
|
||||
@end quotation
|
||||
@item @file{hash.c} and @file{hash.h}
|
||||
@quotation
|
||||
Hashing code implementing Zobrist hashing. (@pxref{Hashing}) The code in
|
||||
@file{hash.c} provides a way to hash board positions into compact descriptions
|
||||
which can be efficiently compared. The caching code in @file{cache.c}
|
||||
makes use of the board hashes when storing and retrieving read results.
|
||||
@end quotation
|
||||
@item @file{influence.c} and @file{influence.h}.
|
||||
@quotation
|
||||
This code determines which regions of the board are under the
|
||||
influence of either player.
|
||||
(@pxref{Influence})
|
||||
@end quotation
|
||||
@item @file{liberty.h}
|
||||
@quotation
|
||||
Header file for the engine. The name ``liberty'' connotes
|
||||
freedom (@pxref{Copying}).
|
||||
@end quotation
|
||||
@item @file{matchpat.c}
|
||||
@quotation
|
||||
This file contains the pattern matcher @code{matchpat()}, which looks for
|
||||
patterns at a particular board location. The actual patterns are in
|
||||
the @file{patterns/} directory. The function @code{matchpat()} is
|
||||
called by every module which does pattern matching, notably @code{shapes}.
|
||||
@end quotation
|
||||
@item @file{move_reasons.c} and @file{move_reasons.h}
|
||||
@quotation
|
||||
Code for keeping track of move reasons.
|
||||
@end quotation
|
||||
@item @file{movelist.c}
|
||||
@quotation
|
||||
Supporting code for lists of moves.
|
||||
@end quotation
|
||||
@item @file{optics.c}
|
||||
@quotation
|
||||
This file contains the code to recognize eye shapes,
|
||||
documented in @xref{Eyes}.
|
||||
@end quotation
|
||||
@item @file{oracle.c}
|
||||
@quotation
|
||||
Code to fork off a second GNU Go process which can be used to simulate
|
||||
reading with top level information (e.g. dragon partitioning) available.
|
||||
@end quotation
|
||||
@item @file{owl.c}
|
||||
@quotation
|
||||
This file does life and death reading. Move generation is pattern based
|
||||
and the code in @file{optics.c} is used to evaluate the eyespaces for
|
||||
vital moves and independent life. A dragon can also live by successfully
|
||||
escaping. Semeai reading along the same principles is also implemented
|
||||
in this file.
|
||||
@end quotation
|
||||
@item @file{persistent.c}
|
||||
@quotation
|
||||
Persistent cache which allows reuse of read results at a later move or
|
||||
with additional stones outside an active area, which are those
|
||||
intersections thought to affect the read result.
|
||||
@end quotation
|
||||
@item @file{printutils.c}
|
||||
@quotation
|
||||
Print utilities.
|
||||
@end quotation
|
||||
@item @file{readconnect.c} and @file{readconnect.h}
|
||||
@quotation
|
||||
This file contains code to determine whether two strings can be
|
||||
connected or disconnected.
|
||||
@end quotation
|
||||
@item @file{reading.c}
|
||||
@quotation
|
||||
This file contains code to determine whether any given
|
||||
string can be attacked or defended. @xref{Tactical Reading},
|
||||
for details.
|
||||
@end quotation
|
||||
@item @file{semeai.c}
|
||||
@quotation
|
||||
This file contains @code{semeai()}, the module which detects dragons
|
||||
in semeai. To determine the semeai results the semeai reading in
|
||||
@file{owl.c} is used.
|
||||
@end quotation
|
||||
@item @file{sgfdecide.c}
|
||||
@quotation
|
||||
Code to generate sgf traces for various types of reading.
|
||||
@end quotation
|
||||
@item @file{shapes.c}
|
||||
@quotation
|
||||
This file contains @code{shapes()}, the module called by @code{genmove()}
|
||||
which tries to find moves which match a pattern (@pxref{Patterns}).
|
||||
@end quotation
|
||||
@item @file{showbord.c}
|
||||
@quotation
|
||||
This file contains @code{showboard()}, which draws an ASCII
|
||||
representation of the board, depicting dragons (stones
|
||||
with same letter) and status (color). This was the
|
||||
primary interface in GNU Go 1.2, but is now a debugging
|
||||
aid.
|
||||
@end quotation
|
||||
@item @file{surround.c}
|
||||
@quotation
|
||||
Code to determine whether a dragon is surrounded and to find moves to
|
||||
surround with or break out with.
|
||||
@end quotation
|
||||
@item @file{utils.c}
|
||||
@quotation
|
||||
An assortment of utilities, described in greater detail below.
|
||||
@end quotation
|
||||
@item @file{value_moves.c}
|
||||
@quotation
|
||||
This file contains the code which assigns values to every move
|
||||
after all the move reasons are generated. It also tries to generate
|
||||
certain kinds of additional move reasons.
|
||||
@end quotation
|
||||
@item @file{worm.c}
|
||||
@quotation
|
||||
This file contains @code{make_worms()}, code which is run at the
|
||||
beginning of each move cycle, before the code in @file{dragon.c}, to
|
||||
determine the attributes of every string. These attributes are things
|
||||
like liberties, wether the string can be captured (and how), etc
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@subsection Files in @file{patterns/}
|
||||
|
||||
The directory @file{patterns/} contains files related to pattern matching.
|
||||
Currently there are several types of patterns. A partial list:
|
||||
|
||||
@itemize @bullet
|
||||
@item move generation patterns in @file{patterns.db} and @file{patterns2.db}
|
||||
@item move generation patterns in files @file{hoshi.db} etc. which are
|
||||
automatically build from the files @file{hoshi.sgf} etc. These comprise
|
||||
our small Joseki library.
|
||||
@item patterns in @file{owl_attackpats.db}, @file{owl_defendpats.db}
|
||||
and @file{owl_vital_apats.db}. These generate moves for the owl
|
||||
code (@pxref{The Owl Code}).
|
||||
@item Connection patterns in @file{conn.db} (@pxref{Connections Database})
|
||||
@item Influence patterns in @file{influence.db} and @file{barriers.db}
|
||||
(@pxref{Influence})
|
||||
@item eye patterns in @file{eyes.db} (@pxref{Eyes}).
|
||||
@end itemize
|
||||
|
||||
The following list contains, in addition to distributed source files
|
||||
some intermediate automatically generated files such as @file{patterns.c}.
|
||||
These are C source files produced by "compiling" various pattern
|
||||
databases, or in some cases (such as @file{hoshi.db}) themselves
|
||||
automatically generated pattern databases produced by "compiling"
|
||||
joseki files in Smart Game Format.
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item @file{conn.db}
|
||||
@quotation
|
||||
Database of connection patterns.
|
||||
@end quotation
|
||||
|
||||
@item @file{conn.c}
|
||||
@quotation
|
||||
Automatically generated file, containing connection
|
||||
patterns in form of struct arrays, compiled by @command{mkpat}
|
||||
from @file{conn.db}.
|
||||
@end quotation
|
||||
|
||||
@item @file{eyes.c}
|
||||
@quotation
|
||||
Automatically generated file, containing eyeshape
|
||||
patterns in form of struct arrays, compiled by @command{mkpat}
|
||||
from @file{eyes.db}.
|
||||
@end quotation
|
||||
|
||||
@item @file{eyes.h}
|
||||
@quotation
|
||||
Header file for @file{eyes.c}.
|
||||
@end quotation
|
||||
|
||||
@item @file{eyes.db}
|
||||
@quotation
|
||||
Database of eyeshape patterns. @xref{Eyes}, for
|
||||
details.
|
||||
@end quotation
|
||||
|
||||
@item @file{helpers.c}
|
||||
@quotation
|
||||
These are helper functions to assist in evaluating
|
||||
moves by matchpat.
|
||||
@end quotation
|
||||
|
||||
@item @file{hoshi.sgf}
|
||||
@quotation
|
||||
Smart Game Format file containing 4-4 point openings
|
||||
@end quotation
|
||||
|
||||
@item @file{hoshi.db}
|
||||
@quotation
|
||||
Automatically generated database of 4-4 point opening
|
||||
patterns, make by compiling @file{hoshi.sgf}
|
||||
@end quotation
|
||||
|
||||
@item @file{joseki.c}
|
||||
@quotation
|
||||
Joseki compiler, which takes a joseki file in
|
||||
Smart Game Format, and produces a pattern database.
|
||||
@end quotation
|
||||
|
||||
@item @file{komoku.sgf}
|
||||
@quotation
|
||||
Smart Game Format file containing 3-4 point openings
|
||||
@end quotation
|
||||
|
||||
@item @file{komoku.db}
|
||||
@quotation
|
||||
Automatically generated database of 3-4 point opening
|
||||
patterns, make by compiling @file{komoku.sgf}
|
||||
@end quotation
|
||||
|
||||
@item @file{mkeyes.c}
|
||||
@quotation
|
||||
Pattern compiler for the eyeshape databases. This
|
||||
program takes @file{eyes.db} as input and produces @file{eyes.c}
|
||||
as output.
|
||||
@end quotation
|
||||
|
||||
@item @file{mkpat.c}
|
||||
@quotation
|
||||
Pattern compiler for the move generation and connection
|
||||
databases. Takes the file @file{patterns.db} together with
|
||||
the autogenerated Joseki pattern files @file{hoshi.db}, @file{komoku.db},
|
||||
@file{sansan.db}, @file{mokuhadzushi.db}, @file{takamoku.db} and produces
|
||||
@file{patterns.c}, or takes @file{conn.db} and produces @file{conn.c}.
|
||||
@end quotation
|
||||
|
||||
@item @file{mokuhazushi.sgf}
|
||||
@quotation
|
||||
Smart Game Format file containing 5-3 point openings
|
||||
@end quotation
|
||||
|
||||
@item @file{mokuhazushi.db}
|
||||
@quotation
|
||||
Pattern database compiled from mokuhadzushi.sgf
|
||||
@end quotation
|
||||
|
||||
@item @file{sansan.sgf}
|
||||
@quotation
|
||||
Smart Game Format file containing 3-3 point openings
|
||||
@end quotation
|
||||
|
||||
@item @file{sansan.db}
|
||||
@quotation
|
||||
Pattern database compiled from @file{sansan.sgf}
|
||||
@end quotation
|
||||
|
||||
@item @file{takamoku.sgf}
|
||||
@quotation
|
||||
Smart Game Format file containing 5-4 point openings
|
||||
@end quotation
|
||||
|
||||
@item @file{takamoku.db}
|
||||
@quotation
|
||||
Pattern database compiled from takamoku.sgf.
|
||||
@end quotation
|
||||
|
||||
@item @file{patterns.c}
|
||||
@quotation
|
||||
Pattern data, compiled from patterns.db by mkpat.
|
||||
@end quotation
|
||||
|
||||
@item @file{patterns.h}
|
||||
@quotation
|
||||
Header file relating to the pattern databases.
|
||||
@end quotation
|
||||
|
||||
@item @file{patterns.db} and @file{patterns2.db}
|
||||
@quotation
|
||||
These contain pattern databases in human readable form.
|
||||
@end quotation
|
||||
|
||||
@end itemize
|
||||
|
||||
|
||||
@node Coding Styles
|
||||
@section Coding styles and conventions
|
||||
|
||||
@subsection Coding Conventions
|
||||
|
||||
Please follow the coding conventions at:
|
||||
@url{http://www.gnu.org/prep/standards_toc.html}
|
||||
|
||||
Please preface every function with a brief description
|
||||
of its usage.
|
||||
|
||||
Please help to keep this Texinfo documentation up-to-date.
|
||||
|
||||
@subsection Tracing
|
||||
|
||||
A function @code{gprintf()} is provided. It is a cut-down
|
||||
@code{printf}, supporting only @code{%c}, @code{%d},
|
||||
@code{%s}, and without field widths, etc. It does, however,
|
||||
add some useful facilities:
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{%m}
|
||||
@quotation
|
||||
Takes two parameters, and displays a formatted board co-ordinate.
|
||||
@end quotation
|
||||
@item indentation
|
||||
@quotation
|
||||
Trace messages are automatically indented to reflect
|
||||
the current stack depth, so it is clear during read-ahead
|
||||
when it puts a move down or takes one back.
|
||||
@end quotation
|
||||
@item "outdent"
|
||||
@quotation As a workaround, @code{%o} at the beginning of the
|
||||
format string suppresses the indentation.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
Normally @code{gprintf()} is wrapped in one of the following:
|
||||
|
||||
@code{TRACE(fmt, ...)}:
|
||||
@quotation
|
||||
Print the message if the 'verbose' variable > 0.
|
||||
(verbose is set by @command{-t} on the command line)
|
||||
@end quotation
|
||||
|
||||
@code{DEBUG(flags, fmt, ...)}:
|
||||
@quotation
|
||||
While @code{TRACE} is intended to afford an overview
|
||||
of what GNU Go is considering, @code{DEBUG} allows occasional
|
||||
in depth study of a module, usually needed when something
|
||||
goes wrong. @code{flags} is one of the @code{DEBUG_*} symbols in
|
||||
@file{engine/gnugo.h}. The @code{DEBUG} macro tests to
|
||||
see if that bit is set in the @code{debug} variable, and prints
|
||||
the message if it is. The debug variable is set using the
|
||||
@command{-d} command-line option.
|
||||
@end quotation
|
||||
|
||||
The variable @code{verbose} controls the tracing. It
|
||||
can equal 0 (no trace), 1, 2, 3 or 4 for increasing
|
||||
levels of tracing. You can set the trace level at
|
||||
the command line by @option{-t} for @code{verbose=1},
|
||||
@option{-t -t} for @code{verbose=2}, etc. But in
|
||||
practice if you want more verbose tracing than level
|
||||
1 it is better to use GDB to reach the point where
|
||||
you want the tracing; you will often find that the
|
||||
variable @code{verbose} has been temporarily set to zero
|
||||
and you can use the GDB command @command{set var verbose=1}
|
||||
to turn the tracing back on.
|
||||
|
||||
@subsection Assertions
|
||||
|
||||
Related to tracing are assertions. Developers are strongly encouraged
|
||||
to pepper their code with assertions to ensure that data structures
|
||||
are as they expect. For example, the helper functions make assertions
|
||||
about the contents of the board in the vicinity of the move they
|
||||
are evaluating.
|
||||
|
||||
@code{ASSERT()} is a wrapper around the standard C @code{assert()}
|
||||
function. In addition to the test, it takes an extra pair of parameters
|
||||
which are the co-ordinates of a "relevant" board position. If an
|
||||
assertion fails, the board position is included in the trace output, and
|
||||
@code{showboard()} and @code{popgo()} are called to unwind and display
|
||||
the stack.
|
||||
|
||||
@subsection FIXME
|
||||
@cindex FIXME
|
||||
|
||||
We have adopted the convention of putting the word FIXME
|
||||
in comments to denote known bugs, etc.
|
||||
|
||||
@node Navigating the Source
|
||||
@section Navigating the Source
|
||||
|
||||
If you are using Emacs, you may find it fast and convenient to use
|
||||
Emacs' built-in facility for navigating the source. Switch to the
|
||||
root directory @file{gnugo-3.6/} and execute the command:
|
||||
|
||||
@example
|
||||
find . -print|grep "\.[ch]$" | xargs etags
|
||||
@end example
|
||||
|
||||
This will build a file called @file{gnugo-3.6/TAGS}. Now to
|
||||
find any GNU Go function, type @command{M-.} and enter the
|
||||
command which you wish to find, or just @command{RET} if
|
||||
the cursor is at the name of the function sought.
|
||||
|
||||
The first time you do this you will be prompted for the location
|
||||
of the TAGS table. Enter the path to @file{gnugo-3.6/TAGS}, and
|
||||
henceforth you will be able to find any function with a minimum
|
||||
of keystrokes.
|
||||
|
||||
|
||||
|
||||
|
225
gnugo/doc/owl.texi
Normal file
|
@ -0,0 +1,225 @@
|
|||
In the tactical reading code in @file{reading.c}, the
|
||||
code generating the moves which are tried are all hand
|
||||
coded in C, for efficiency. There is much to be said for
|
||||
another type of reading, in which the moves to be tried are
|
||||
generated from a pattern database.
|
||||
|
||||
GNU Go does three main types of pattern based reading. First,
|
||||
there is the OWL code (Optics with Limit Negotiation) which
|
||||
attempts to read out to a point where the code in
|
||||
@file{engine/optics.c} (@pxref{Eyes}) can be used to evaluate
|
||||
it. Like the tactical reading code, a persistent cache is
|
||||
employed to maintain some of the owl data from move to
|
||||
move. This is an essential speedup without which GNU Go would
|
||||
play too slowly.
|
||||
|
||||
Secondly, there is the @file{engine/combination.c} which
|
||||
attempts to find combinations---situations where a series
|
||||
of threats eventually culminates in one that cannot be
|
||||
parried.
|
||||
|
||||
Finally there is the semeai module. A @strong{semeai} is
|
||||
a capturing race between two adjacent DEAD or CRITICAL
|
||||
dragons of opposite colors. The principal function,
|
||||
@code{owl_analyze_semeai()} is contained in @file{owl.c}.
|
||||
Due to the complex nature of semeais, the results of
|
||||
this function are more frequently wrong than the usual
|
||||
owl code.
|
||||
|
||||
@menu
|
||||
* The Owl Code:: Life and death reading
|
||||
* Combinations:: Combinations
|
||||
@end menu
|
||||
|
||||
@node The Owl Code
|
||||
@section The Owl Code
|
||||
|
||||
The life and death code in @file{optics.c}, described elsewhere
|
||||
(@pxref{Eyes}), works reasonably well as long as the position is in a
|
||||
@dfn{terminal position}, which we define to be one where there are no
|
||||
moves left which can expand the eye space, or limit it. In situations
|
||||
where the dragon is surrounded, yet has room to thrash around a bit
|
||||
making eyes, a simple application of the graph-based analysis will not
|
||||
work. Instead, a bit of reading is needed to reach a terminal position.
|
||||
|
||||
The defender tries to expand his eyespace, the attacker to limit
|
||||
it, and when neither finds an effective move, the position is
|
||||
evaluated. We call this type of life and death reading
|
||||
@dfn{Optics With Limit-negotiation} (OWL). The module which
|
||||
implements it is in @file{engine/owl.c}.
|
||||
|
||||
There are two reasonably small databases
|
||||
@file{patterns/owl_defendpats.db} and @file{patterns/owl_attackpats.db}
|
||||
of expanding and limiting moves. The code in @file{owl.c} generates a
|
||||
small move tree, allowing the attacker only moves from
|
||||
@file{owl_attackpats.db}, and the defender only moves from
|
||||
@file{owl_defendpats.db}. In addition to the moves suggested by
|
||||
patterns, vital moves from the eye space analysis are also tested.
|
||||
|
||||
A third database, @file{owl_vital_apats.db} includes patterns which
|
||||
override the eyespace analysis done by the optics code. Since the
|
||||
eyeshape graphs ignore the complications of shortage of liberties and
|
||||
cutting points in the surrounding chains, the static analysis of
|
||||
eyespace is sometimes wrong. The problem is when the optics code says
|
||||
that a dragon definitely has 2 eyes, but it isn't true due to
|
||||
shortage of liberties, so the ordinary owl patterns never get into play.
|
||||
In such situations @file{owl_vital_apats.db} is the only available measure
|
||||
to correct mistakes by the optics. Currently the patterns in
|
||||
@file{owl_vital_apats.db} are only matched when the level is 9 or
|
||||
greater.
|
||||
|
||||
The owl code is tuned by editing these three pattern databases,
|
||||
principally the first two.
|
||||
|
||||
@findex owl_attack
|
||||
@findex owl_defend
|
||||
@findex compute_eyes_pessimistic
|
||||
A node of the move tree is considered @code{terminal} if no further moves
|
||||
are found from @file{owl_attackpats.db} or @file{owl_defendpats.db}, or if
|
||||
the function @code{compute_eyes_pessimistic()} reports that the group is
|
||||
definitely alive. At this point, the status of the group is evaluated.
|
||||
The functions @code{owl_attack()} and @code{owl_defend()}, with
|
||||
usage similar to @code{attack()} and @code{find_defense()}, make
|
||||
use of the owl pattern databases to generate the move tree and decide
|
||||
the status of the group.
|
||||
|
||||
The function @code{compute_eyes_pessimistic()} used by the owl
|
||||
code is very conservative and only feels certain about eyes if the
|
||||
eyespace is completely closed (i.e. no marginal vertices).
|
||||
|
||||
The maximum number of moves tried at each node is limited by
|
||||
the parameter @code{MAX_MOVES} defined at the beginning of
|
||||
@file{engine/owl.c}. The most most valuable moves are
|
||||
tried first, with the following restrictions:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
If @code{stackp > owl_branch_depth} then only one move is tried per
|
||||
variation.
|
||||
@item
|
||||
If @code{stackp > owl_reading_depth} then the reading terminates,
|
||||
and the situation is declared a win for the defender (since
|
||||
deep reading may be a sign of escape).
|
||||
@item
|
||||
If the node count exceeds @code{owl_node_limit}, the reading also
|
||||
terminates with a win for the defender.
|
||||
@item
|
||||
Any pattern with value 99 is considered a forced move: no
|
||||
other move is tried, and if two such moves are found, the function
|
||||
returns false. This is only relevant for the attacker.
|
||||
@item
|
||||
Any pattern in @file{patterns/owl_attackpats.db} and
|
||||
@file{patterns/owl_defendpats.db} with value 100 is considered a win: if
|
||||
such a pattern is found by @code{owl_attack} or @code{owl_defend}, the
|
||||
function returns true. This feature must be used most carefully.
|
||||
@end itemize
|
||||
|
||||
The functions @code{owl_attack()} and @code{owl_defend()} may, like
|
||||
@code{attack()} and @code{find_defense()}, return an attacking or
|
||||
defending move through their pointer arguments. If the position is
|
||||
already won, @code{owl_attack()} may or may not return an attacking
|
||||
move. If it finds no move of interest, it will return @code{PASS}, that
|
||||
is, @code{0}. The same goes for @code{owl_defend()}.
|
||||
|
||||
When @code{owl_attack()} or @code{owl_defend()} is called,
|
||||
the dragon under attack is marked in the array @code{goal}.
|
||||
The stones of the dragon originally on the board are marked
|
||||
with goal=1; those added by @code{owl_defend()} are marked
|
||||
with goal=2. If all the original strings of the original dragon
|
||||
are captured, @code{owl_attack()} considers the dragon to be defeated,
|
||||
even if some stones added later can make a live group.
|
||||
|
||||
Only dragons with small escape route are studied when the
|
||||
functions are called from @code{make_dragons()}.
|
||||
|
||||
The owl code can be conveniently tested using the
|
||||
@option{--decide-owl @var{location}} option. This should be used with
|
||||
@option{-t} to produce a useful trace, @option{-o} to produce
|
||||
an SGF file of variations produced when the life and death of
|
||||
the dragon at @var{location} is checked, or both.
|
||||
@option{--decide-position} performs the same analysis for all
|
||||
dragons with small escape route.
|
||||
|
||||
@node Combinations
|
||||
@section Combination reading
|
||||
|
||||
It may happen that no single one of a set of worms can be killed,
|
||||
yet there is a move that guarantees that at least one can be captured.
|
||||
The simplest example is a double atari. The purpose of the code in
|
||||
@file{combination.c} is to find such moves.
|
||||
|
||||
For example, consider the following situation:
|
||||
|
||||
@example
|
||||
|
||||
+---------
|
||||
|....OOOOX
|
||||
|....OOXXX
|
||||
|..O.OXX..
|
||||
|.OXO.OX..
|
||||
|.OX..OO..
|
||||
|.XXOOOXO.
|
||||
|..*XXOX..
|
||||
|....XOX..
|
||||
|.XX..X...
|
||||
|X........
|
||||
|
||||
@end example
|
||||
|
||||
Every @samp{X} stone in this position is alive. However the move
|
||||
at @samp{*} produces a position in which at least one of four
|
||||
strings will get captured. This is a @emph{combination}.
|
||||
|
||||
The driving function is called @code{atari_atari} because typically
|
||||
a combination involves a sequence of ataris culminating in a capture,
|
||||
though sometimes the moves involved are not ataris. For example in
|
||||
the above example, the first move at @samp{*} is @emph{not} an
|
||||
atari, though after @samp{O} defends the four stones above, a
|
||||
sequence of ataris ensues resulting in the capture of some
|
||||
string.
|
||||
|
||||
Like the owl functions @code{atari_atari} does pattern-based
|
||||
reading. The database generating the attacking moves is
|
||||
@file{aa_attackpats.db}. One danger with this function is
|
||||
that the first atari tried might be irrelevant to the actual
|
||||
combination. To detect this possibility, once we've found a
|
||||
combination, we mark that first move as forbidden, then try
|
||||
again. If no combination of the same size or larger turns
|
||||
up, then the first move was indeed essential.
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{void combinations(int color)}
|
||||
@findex combinations
|
||||
@quotation
|
||||
Generate move reasons for combination attacks and defenses against
|
||||
them. This is one of the move generators called from genmove().
|
||||
@end quotation
|
||||
@item @code{int atari_atari(int color, int *attack_move, char defense_moves[BOARDMAX], int save_verbose)}
|
||||
@findex atari_atari
|
||||
@quotation
|
||||
Look for a combination for @code{color}. For the purpose of
|
||||
the move generation, returns the size of the smallest of the
|
||||
worms under attack.
|
||||
@end quotation
|
||||
@item @code{int atari_atari_confirm_safety(int color, int move, int *defense, int minsize, const char saved_dragons[BOARDMAX], const char saved_worms[BOARDMAX])}
|
||||
@findex atari_atari_confirm_safety
|
||||
@quotation
|
||||
Tries to determine whether a move is a blunder. Wrapper
|
||||
around atari_atari_blunder_size. Check whether a combination
|
||||
attack of size at least @code{minsize} appears after move at
|
||||
@code{move} has been made. The arrays @code{saved_dragons[]} and
|
||||
@code{saved_worms[]} should be one for stones belonging to dragons
|
||||
or worms respectively, which are supposedly saved by @code{move}.
|
||||
@end quotation
|
||||
@item @code{int atari_atari_blunder_size(int color, int move, int *defense, const char safe_stones[BOARDMAX])}
|
||||
@findex atari_atari_blunder_size
|
||||
@quotation
|
||||
This function checks whether any new combination attack appears after
|
||||
move at (move) has been made, and returns its size (in points).
|
||||
@code{safe_stones} marks which of our stones are supposedly safe
|
||||
after this move.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
|
||||
|
177
gnugo/doc/path.eps
Normal file
|
@ -0,0 +1,177 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: path.eps
|
||||
%%Creator: fig2dev Version 3.2 Patchlevel 1
|
||||
%%CreationDate: Tue Jun 19 15:53:05 2001
|
||||
%%For: turvoy@semeai.irisa.fr (Tanguy Urvoy, DEA, Paragraphe)
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 199 172
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%Magnification: 1.0000
|
||||
%%EndComments
|
||||
/$F2psDict 200 dict def
|
||||
$F2psDict begin
|
||||
$F2psDict /mtrx matrix put
|
||||
/col-1 {0 setgray} bind def
|
||||
/col0 {0.000 0.000 0.000 srgb} bind def
|
||||
/col1 {0.000 0.000 1.000 srgb} bind def
|
||||
/col2 {0.000 1.000 0.000 srgb} bind def
|
||||
/col3 {0.000 1.000 1.000 srgb} bind def
|
||||
/col4 {1.000 0.000 0.000 srgb} bind def
|
||||
/col5 {1.000 0.000 1.000 srgb} bind def
|
||||
/col6 {1.000 1.000 0.000 srgb} bind def
|
||||
/col7 {1.000 1.000 1.000 srgb} bind def
|
||||
/col8 {0.000 0.000 0.560 srgb} bind def
|
||||
/col9 {0.000 0.000 0.690 srgb} bind def
|
||||
/col10 {0.000 0.000 0.820 srgb} bind def
|
||||
/col11 {0.530 0.810 1.000 srgb} bind def
|
||||
/col12 {0.000 0.560 0.000 srgb} bind def
|
||||
/col13 {0.000 0.690 0.000 srgb} bind def
|
||||
/col14 {0.000 0.820 0.000 srgb} bind def
|
||||
/col15 {0.000 0.560 0.560 srgb} bind def
|
||||
/col16 {0.000 0.690 0.690 srgb} bind def
|
||||
/col17 {0.000 0.820 0.820 srgb} bind def
|
||||
/col18 {0.560 0.000 0.000 srgb} bind def
|
||||
/col19 {0.690 0.000 0.000 srgb} bind def
|
||||
/col20 {0.820 0.000 0.000 srgb} bind def
|
||||
/col21 {0.560 0.000 0.560 srgb} bind def
|
||||
/col22 {0.690 0.000 0.690 srgb} bind def
|
||||
/col23 {0.820 0.000 0.820 srgb} bind def
|
||||
/col24 {0.500 0.190 0.000 srgb} bind def
|
||||
/col25 {0.630 0.250 0.000 srgb} bind def
|
||||
/col26 {0.750 0.380 0.000 srgb} bind def
|
||||
/col27 {1.000 0.500 0.500 srgb} bind def
|
||||
/col28 {1.000 0.630 0.630 srgb} bind def
|
||||
/col29 {1.000 0.750 0.750 srgb} bind def
|
||||
/col30 {1.000 0.880 0.880 srgb} bind def
|
||||
/col31 {1.000 0.840 0.000 srgb} bind def
|
||||
|
||||
end
|
||||
save
|
||||
-90.0 199.0 translate
|
||||
1 -1 scale
|
||||
|
||||
/cp {closepath} bind def
|
||||
/ef {eofill} bind def
|
||||
/gr {grestore} bind def
|
||||
/gs {gsave} bind def
|
||||
/sa {save} bind def
|
||||
/rs {restore} bind def
|
||||
/l {lineto} bind def
|
||||
/m {moveto} bind def
|
||||
/rm {rmoveto} bind def
|
||||
/n {newpath} bind def
|
||||
/s {stroke} bind def
|
||||
/sh {show} bind def
|
||||
/slc {setlinecap} bind def
|
||||
/slj {setlinejoin} bind def
|
||||
/slw {setlinewidth} bind def
|
||||
/srgb {setrgbcolor} bind def
|
||||
/rot {rotate} bind def
|
||||
/sc {scale} bind def
|
||||
/sd {setdash} bind def
|
||||
/ff {findfont} bind def
|
||||
/sf {setfont} bind def
|
||||
/scf {scalefont} bind def
|
||||
/sw {stringwidth} bind def
|
||||
/tr {translate} bind def
|
||||
/tnt {dup dup currentrgbcolor
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
|
||||
bind def
|
||||
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
|
||||
4 -2 roll mul srgb} bind def
|
||||
/DrawEllipse {
|
||||
/endangle exch def
|
||||
/startangle exch def
|
||||
/yrad exch def
|
||||
/xrad exch def
|
||||
/y exch def
|
||||
/x exch def
|
||||
/savematrix mtrx currentmatrix def
|
||||
x y tr xrad yrad sc 0 0 1 startangle endangle arc
|
||||
closepath
|
||||
savematrix setmatrix
|
||||
} def
|
||||
|
||||
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
|
||||
/$F2psEnd {$F2psEnteredState restore end} def
|
||||
%%EndProlog
|
||||
|
||||
$F2psBegin
|
||||
10 setmiterlimit
|
||||
n -1000 4312 m -1000 -1000 l 5812 -1000 l 5812 4312 l cp clip
|
||||
0.06000 0.06000 sc
|
||||
7.500 slw
|
||||
% Ellipse
|
||||
n 3000 1800 150 150 0 360 DrawEllipse gs col7 1.00 shd ef gr gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2700 2700 150 150 0 360 DrawEllipse gs col7 1.00 shd ef gr gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 3900 2700 150 150 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 3900 1500 150 150 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2700 1500 150 150 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr
|
||||
|
||||
% Polyline
|
||||
n 2400 900 m 2400 3300 l gs col0 s gr
|
||||
% Polyline
|
||||
n 2700 3300 m 2700 900 l gs col0 s gr
|
||||
% Polyline
|
||||
n 3000 900 m 3000 3300 l gs col0 s gr
|
||||
% Polyline
|
||||
n 3300 900 m 3300 3300 l gs col0 s gr
|
||||
% Polyline
|
||||
n 3300 900 m 3300 900 l 3300 1050 l gs col0 s gr
|
||||
% Polyline
|
||||
n 3600 900 m 3600 3300 l gs col0 s gr
|
||||
% Polyline
|
||||
n 3900 3300 m 3900 900 l gs col0 s gr
|
||||
% Polyline
|
||||
n 4200 900 m 4200 3300 l gs col0 s gr
|
||||
% Polyline
|
||||
n 4500 900 m 4500 3300 l gs col0 s gr
|
||||
% Polyline
|
||||
n 4800 3000 m 2100 3000 l gs col0 s gr
|
||||
% Polyline
|
||||
n 4800 2700 m 2100 2700 l gs col0 s gr
|
||||
% Polyline
|
||||
n 4800 2400 m 2100 2400 l gs col0 s gr
|
||||
% Polyline
|
||||
n 4800 2100 m 2100 2100 l gs col0 s gr
|
||||
% Polyline
|
||||
n 4800 1800 m 2100 1800 l gs col0 s gr
|
||||
% Polyline
|
||||
n 4800 1500 m 2100 1500 l gs col0 s gr
|
||||
% Polyline
|
||||
n 2100 900 m 4800 900 l 4800 3300 l 2100 3300 l cp gs col0 s gr
|
||||
% Polyline
|
||||
n 4800 1200 m 2100 1200 l gs col0 s gr
|
||||
% Polyline
|
||||
15.000 slw
|
||||
gs clippath
|
||||
3216 2099 m 3428 1971 l 3301 2184 l 3514 1971 l 3429 1886 l cp
|
||||
clip
|
||||
n 1800 1800 m 2700 2700 l 3450 1950 l gs col8 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 3216 2099 m 3428 1971 l 3301 2184 l 3258 2142 l 3216 2099 l cp gs col8 1.00 shd ef gr col8 s
|
||||
% Polyline
|
||||
n 2700 1500 m 2700 1800 l 3000 1500 l 2700 1200 l 2400 1500 l 2400 1800 l
|
||||
2700 2100 l 3300 1500 l 2700 900 l 2100 1500 l 2100 1800 l
|
||||
2700 2400 l 3600 1500 l 2700 600 l 1800 1500 l 1800 1800 l gs col8 s gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
2850 600 m
|
||||
gs 1 -1 sc (out) col8 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
1500 1350 m
|
||||
gs 1 -1 sc (out) col8 sh gr
|
||||
$F2psEnd
|
||||
rs
|
57
gnugo/doc/path.fig
Normal file
|
@ -0,0 +1,57 @@
|
|||
#FIG 3.2
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
60.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
1 3 0 1 0 7 100 0 20 0.000 1 0.0000 3000 1800 150 150 3000 1800 3150 1800
|
||||
1 3 0 1 0 7 100 0 20 0.000 1 0.0000 2700 2700 150 150 2700 2700 2850 2700
|
||||
1 3 0 1 0 0 100 0 20 0.000 1 0.0000 3900 2700 150 150 3900 2700 4050 2700
|
||||
1 3 0 1 0 0 100 0 20 0.000 1 0.0000 3900 1500 150 150 3900 1500 4050 1500
|
||||
1 3 0 1 0 0 100 0 20 0.000 1 0.0000 2700 1500 150 150 2700 1500 2850 1500
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
2400 900 2400 3300
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
2700 3300 2700 900
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
3000 900 3000 3300
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
3300 900 3300 3300
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 3
|
||||
3300 900 3300 900 3300 1050
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
3600 900 3600 3300
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
3900 3300 3900 900
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
4200 900 4200 3300
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
4500 900 4500 3300
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
4800 3000 2100 3000
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
4800 2700 2100 2700
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
4800 2400 2100 2400
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
4800 2100 2100 2100
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
4800 1800 2100 1800
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
4800 1500 2100 1500
|
||||
2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5
|
||||
2100 900 4800 900 4800 3300 2100 3300 2100 900
|
||||
2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
|
||||
4800 1200 2100 1200
|
||||
2 1 0 2 8 0 100 0 -1 0.000 0 0 -1 1 0 3
|
||||
1 1 2.00 120.00 240.00
|
||||
1800 1800 2700 2700 3450 1950
|
||||
2 1 0 2 8 0 100 0 -1 0.000 0 0 -1 0 0 16
|
||||
2700 1500 2700 1800 3000 1500 2700 1200 2400 1500 2400 1800
|
||||
2700 2100 3300 1500 2700 900 2100 1500 2100 1800 2700 2400
|
||||
3600 1500 2700 600 1800 1500 1800 1800
|
||||
4 0 8 100 0 0 16 0.0000 4 150 315 2850 600 out\001
|
||||
4 0 8 100 0 0 16 0.0000 4 150 315 1500 1350 out\001
|
BIN
gnugo/doc/path.jpg
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
gnugo/doc/path.pdf
Normal file
BIN
gnugo/doc/path.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
1924
gnugo/doc/patterns.texi
Normal file
1153
gnugo/doc/reading.texi
Normal file
334
gnugo/doc/regression.texi
Normal file
|
@ -0,0 +1,334 @@
|
|||
The standard purpose of regression testing is to avoid getting the same
|
||||
bug twice. When a bug is found, the programmer fixes the bug and adds a
|
||||
test to the test suite. The test should fail before the fix and pass
|
||||
after the fix. When a new version is about to be released, all the tests
|
||||
in the regression test suite are run and if an old bug reappears, this
|
||||
will be seen quickly since the appropriate test will fail.
|
||||
|
||||
The regression testing in GNU Go is slightly different. A typical test
|
||||
case involves specifying a position and asking the engine what move it
|
||||
would make. This is compared to one or more correct moves to decide
|
||||
whether the test case passes or fails. It is also stored whether a test
|
||||
case is expected to pass or fail, and deviations in this status signify
|
||||
whether a change has solved some problem and/or broken something
|
||||
else. Thus the regression tests both include positions highlighting some
|
||||
mistake being done by the engine, which are waiting to be fixed, and
|
||||
positions where the engine does the right thing, where we want to detect
|
||||
if a change breaks something.
|
||||
|
||||
@menu
|
||||
* Regression Testing:: Regression Testing in GNU Go
|
||||
* Test Suites:: Test Suites
|
||||
* Running the Regressions:: Running the Regression Tests
|
||||
* Running regress.pike:: Running regress.pike
|
||||
* Viewing with Emacs:: Viewing tests with Emacs
|
||||
* HTML Views:: HTML Views
|
||||
@end menu
|
||||
|
||||
@node Regression Testing
|
||||
@section Regression testing in GNU Go
|
||||
|
||||
Regression testing is performed by the files in the @file{regression/}
|
||||
directory. The tests are specified as GTP commands in files with the
|
||||
suffix @file{.tst}, with corresponding correct results and expected
|
||||
pass/fail status encoded in GTP comments following the test. To run a
|
||||
test suite the shell scripts @file{test.sh}, @file{eval.sh}, and
|
||||
@file{regress.sh} can be used. There are also Makefile targets to do
|
||||
this. If you @command{make all_batches} most of the tests are run. The
|
||||
Pike script @file{regress.pike} can also be used to run all tests or a
|
||||
subset of the tests.
|
||||
|
||||
Game records used by the regression tests are stored in the
|
||||
directory @file{regression/games/} and its subdirectories.
|
||||
|
||||
@node Test Suites
|
||||
@section Test suites
|
||||
|
||||
The regression tests are grouped into suites and stored in files as GTP
|
||||
commands. A part of a test suite can look as follows:
|
||||
@example
|
||||
@group
|
||||
# Connecting with ko at B14 looks best. Cutting at D17 might be
|
||||
# considered. B17 (game move) is inferior.
|
||||
loadsgf games/strategy25.sgf 61
|
||||
90 gg_genmove black
|
||||
#? [B14|D17]
|
||||
|
||||
# The game move at P13 is a suicidal blunder.
|
||||
loadsgf games/strategy25.sgf 249
|
||||
95 gg_genmove black
|
||||
#? [!P13]
|
||||
|
||||
loadsgf games/strategy26.sgf 257
|
||||
100 gg_genmove black
|
||||
#? [M16]*
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Lines starting with a hash sign, or in general anything following a hash
|
||||
sign, are interpreted as comments by the GTP mode and thus ignored by
|
||||
the engine. GTP commands are executed in the order they appear, but only
|
||||
those on numbered lines are used for testing. The comment lines starting
|
||||
with @code{#?} are magical to the regression testing scripts and
|
||||
indicate correct results and expected pass/fail status. The string
|
||||
within brackets is matched as a regular expression against the response
|
||||
from the previous numbered GTP command. A particular useful feature of
|
||||
regular expressions is that by using @samp{|} it is possible to specify
|
||||
alternatives. Thus @code{B14|D17} above means that if either @code{B14}
|
||||
or @code{D17} is the move generated in test case 90, it passes. There is
|
||||
one important special case to be aware of. If the correct result string
|
||||
starts with an exclamation mark, this is excluded from the regular
|
||||
expression but afterwards the result of the matching is negated. Thus
|
||||
@code{!P13} in test case 95 means that any move except @code{P13} is
|
||||
accepted as a correct result.
|
||||
|
||||
In test case 100, the brackets on the @code{#?} line is followed by an
|
||||
asterisk. This means that the test is expected to fail. If there is no
|
||||
asterisk, the test is expected to pass. The brackets may also be
|
||||
followed by a @samp{&}, meaning that the result is ignored. This is
|
||||
primarily used to report statistics, e.g. how many tactical reading
|
||||
nodes were spent while running the test suite.
|
||||
|
||||
@node Running the Regressions
|
||||
@section Running the Regression Tests
|
||||
|
||||
@code{./test.sh blunder.tst} runs the tests in @file{blunder.tst} and
|
||||
prints the results of the commands on numbered lines, which may look
|
||||
like:
|
||||
|
||||
@example
|
||||
1 E5
|
||||
2 F9
|
||||
3 O18
|
||||
4 B7
|
||||
5 A4
|
||||
6 E4
|
||||
7 E3
|
||||
8 A3
|
||||
9 D9
|
||||
10 J9
|
||||
11 B3
|
||||
12 C6
|
||||
13 C6
|
||||
@end example
|
||||
|
||||
This is usually not very informative, however. More interesting is
|
||||
@code{./eval.sh blunder.tst} which also compares the results above
|
||||
against the correct ones in the test file and prints a report for each
|
||||
test on the form:
|
||||
|
||||
@example
|
||||
1 failed: Correct '!E5', got 'E5'
|
||||
2 failed: Correct 'C9|H9', got 'F9'
|
||||
3 PASSED
|
||||
4 failed: Correct 'B5|C5|C4|D4|E4|E3|F3', got 'B7'
|
||||
5 PASSED
|
||||
6 failed: Correct 'D4', got 'E4'
|
||||
7 PASSED
|
||||
8 failed: Correct 'B4', got 'A3'
|
||||
9 failed: Correct 'G8|G9|H8', got 'D9'
|
||||
10 failed: Correct 'G9|F9|C7', got 'J9'
|
||||
11 failed: Correct 'D4|E4|E5|F4|C6', got 'B3'
|
||||
12 failed: Correct 'D4', got 'C6'
|
||||
13 failed: Correct 'D4|E4|E5|F4', got 'C6'
|
||||
@end example
|
||||
|
||||
The result of a test can be one of four different cases:
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{passed}: An expected pass
|
||||
|
||||
This is the ideal result.
|
||||
|
||||
@item @code{PASSED}: An unexpected pass
|
||||
|
||||
This is a result that we are hoping for when we fix a bug. An old test
|
||||
case that used to fail is now passing.
|
||||
|
||||
@item @code{failed}: An expected failure
|
||||
|
||||
The test failed but this was also what we expected, unless we were
|
||||
trying to fix the particular mistake highlighted by the test case.
|
||||
These tests show weaknesses of the GNU Go engine and are good places to
|
||||
search if you want to detect an area which needs improvement.
|
||||
|
||||
@item @code{FAILED}: An unexpected failure
|
||||
|
||||
This should nominally only happen if something is broken by a
|
||||
change. However, sometimes GNU Go passes a test, but for the wrong
|
||||
reason or for a combination of wrong reasons. When one of these reasons
|
||||
is fixed, the other one may shine through so that the test suddenly
|
||||
fails. When a test case unexpectedly fails, it is necessary to make a
|
||||
closer examination in order to determine whether a change has broken
|
||||
something.
|
||||
|
||||
@end itemize
|
||||
|
||||
If you want a less verbose report, @code{./regress.sh . blunder.tst}
|
||||
does the same thing as the previous command, but only reports unexpected
|
||||
results. The example above is compressed to
|
||||
|
||||
@example
|
||||
3 unexpected PASS!
|
||||
5 unexpected PASS!
|
||||
7 unexpected PASS!
|
||||
@end example
|
||||
|
||||
For convenience the tests are also available as makefile targets. For
|
||||
example, @code{make blunder} runs the tests in the blunder test suite by
|
||||
executing @code{eval.sh blunder.tst}. @code{make all_batches} runs all
|
||||
test suites in a sequence using the @code{regress.sh} script.
|
||||
|
||||
@node Running regress.pike
|
||||
@section Running regress.pike
|
||||
|
||||
A more powerful way to run regressions is with the script
|
||||
@file{regress.pike}. This requires that you have Pike
|
||||
(@url{http://pike.ida.liu.se}) installed.
|
||||
|
||||
Executing @code{./regress.pike} without arguments will run all
|
||||
testsuites that @code{make all_batches} would run. The difference is
|
||||
that unexpected results are reported immediately when they have been
|
||||
found (instead of after the whole file has been run) and that statistics
|
||||
of time consumption and node usage is presented for each test file and
|
||||
in total.
|
||||
|
||||
To run a single test suite do e.g. @code{./regress.pike nicklas3.tst} or
|
||||
@code{./regress.pike nicklas3}. The result may look like:
|
||||
@example
|
||||
nicklas3 2.96 614772 3322 469
|
||||
Total nodes: 614772 3322 469
|
||||
Total time: 2.96 (3.22)
|
||||
Total uncertainty: 0.00
|
||||
@end example
|
||||
The numbers here mean that the test suite took 2.96 seconds of processor
|
||||
time and 3.22 seconds of real time. The consumption of reading nodes was
|
||||
614772 for tactical reading, 3322 for owl reading, and 469 for
|
||||
connection reading. The last line relates to the variability of the
|
||||
generated moves in the test suite, and 0 means that none was decided by
|
||||
the randomness contribution to the move valuation. Multiple testsuites
|
||||
can be run by e.g. @code{./regress.pike owl ld_owl owl1}.
|
||||
|
||||
It is also possible to run a single testcase, e.g. @code{./regress.pike
|
||||
strategy:6}, a number of testcases, e.g. @code{./regress.pike
|
||||
strategy:6,23,45}, a range of testcases, e.g. @code{./regress.pike
|
||||
strategy:13-15} or more complex combinations e.g. @code{./regress.pike
|
||||
strategy:6,13-15,23,45 nicklas3:602,1403}.
|
||||
|
||||
There are also command line options to choose what engine to run, what
|
||||
options to send to the engine, to turn on verbose output, and to use a
|
||||
file to specify which testcases to run. Run @code{./regress.pike --help}
|
||||
for a complete and up to date list of options.
|
||||
|
||||
@node Viewing with Emacs
|
||||
@section Viewing tests with Emacs
|
||||
|
||||
To get a quick regression view, you may use the graphical
|
||||
display mode available with Emacs (@pxref{Emacs}). You will
|
||||
want the cursor in the regression buffer when you enter
|
||||
@command{M-x gnugo}, so that GNU Go opens in the correct
|
||||
directory. A good way to be in the right directory is to
|
||||
open the window of the test you want to investigate. Then
|
||||
you can cut and past GTP commands directly from the test to
|
||||
the minibuffer, using the @command{:} command from
|
||||
Emacs. Although Emacs mode does not have a coordinate grid,
|
||||
you may get an ascii board with the coordinate grid using
|
||||
@command{: showboard} command.
|
||||
|
||||
@node HTML Views
|
||||
@section HTML Regression Views
|
||||
|
||||
Extremely useful HTML Views of the regression tests may be
|
||||
produced using two perl scripts @file{regression/regress.pl}
|
||||
and @file{regression/regress.plx}.
|
||||
|
||||
@enumerate
|
||||
@item The driver program (regress.pl) which:
|
||||
@itemize @bullet
|
||||
@item Runs the regression tests, invoking GNU Go.
|
||||
@item Captures the trace output, board position, and pass/fail status,
|
||||
sgf output, and dragon status information.
|
||||
@end itemize
|
||||
@item The interface to view the captured output (regress.plx) which:
|
||||
@itemize @bullet
|
||||
@item Never invokes GNU Go.
|
||||
@item Displays the captured output in helpful formats (i.e. HTML).
|
||||
@end itemize
|
||||
@end enumerate
|
||||
|
||||
@subsection Setting up the HTML regression Views
|
||||
|
||||
There are many ways configuring Apache to permit CGI scripts, all of them are
|
||||
featured in Apache documentation, which can be found at
|
||||
@url{http://httpd.apache.org/docs/2.0/howto/cgi.html}
|
||||
|
||||
Below you will find one example.
|
||||
|
||||
This documentation assumes an Apache 2.0 included in Fedora Core distribution,
|
||||
but it should be fairly close to the config for other distributions.
|
||||
|
||||
First, you will need to configure Apache to run CGI scripts in the directory
|
||||
you wish to serve the html views from. In @file{/etc/httpd/conf/httpd.conf}
|
||||
there should be a line:
|
||||
|
||||
@code{DocumentRoot "/var/www/html"}
|
||||
|
||||
Search for a line @code{<Directory "/path/to/directory">}, where
|
||||
@code{/path/to/directory} is the same as provided in @code{DocumentRoot},
|
||||
then add @code{ExecCGI} to list of @code{Options}.
|
||||
The whole section should look like:
|
||||
|
||||
@example
|
||||
<Directory "/var/www/html">
|
||||
...
|
||||
Options ... ExecCGI
|
||||
...
|
||||
</Directory>
|
||||
@end example
|
||||
|
||||
This allows CGI scripts to be executed in the directory used by regress.plx.
|
||||
Next, you need to tell Apache that @file{.plx} is a CGI script ending. Your
|
||||
@file{httpd.conf} file should contain a line:
|
||||
|
||||
@code{AddHandler cgi-script ...}
|
||||
|
||||
If there isn't already, add it; add @file{.plx} to the list of extensions,
|
||||
so line should look like:
|
||||
|
||||
@code{AddHandler cgi-script ... .plx}
|
||||
|
||||
You will also need to make sure you have the necessary modules loaded to run
|
||||
CGI scripts; mod_cgi and mod_mime should be sufficient. Your @file{httpd.conf}
|
||||
should have the relevant @code{LoadModule cgi_module modules/mod_cgi.so} and
|
||||
@code{LoadModule mime_module modules/mod_mime.so} lines; uncomment them if
|
||||
necessary.
|
||||
|
||||
Next, you need to put a copy of @file{regress.plx} in the @code{DocumentRoot}
|
||||
directory @code{/var/www/html} or it subdirectories where you plan to serve the
|
||||
html views from.
|
||||
|
||||
You will also need to install the Perl module GD
|
||||
(@url{http://search.cpan.org/dist/GD/}), available from CPAN.
|
||||
|
||||
Finally, run @file{regression/regress.pl} to create the xml data used to
|
||||
generate the html views (to do all regression tests run
|
||||
@file{regression/regress.pl -a 1}); then, copy the @file{html/} directory to
|
||||
the same directory as @file{regress.plx} resides in.
|
||||
|
||||
At this point, you should have a working copy of the html regression views.
|
||||
|
||||
Additional notes for Debian users: The Perl GD module can be installed
|
||||
by @code{apt-get install libgd-perl}. It may suffice to add this to
|
||||
the apache2 configuration:
|
||||
|
||||
@example
|
||||
<Directory "/var/www/regression">
|
||||
Options +ExecCGI
|
||||
AddHandler cgi-script .plx
|
||||
RedirectMatch ^/regression$ /regression/regress.plx
|
||||
</Directory>
|
||||
@end example
|
||||
|
||||
and then make a link from @file{/var/www/regression} to the GNU Go
|
||||
regression directory. The @code{RedirectMatch} statement is only
|
||||
needed to set up a shorter entry URL.
|
101
gnugo/doc/sgf.texi
Normal file
|
@ -0,0 +1,101 @@
|
|||
@cindex SGF files in memory
|
||||
|
||||
@dfn{SGF} - Smart Game Format - is a file format which is used for storing
|
||||
game records for a number of different games, among them chess and
|
||||
go. The format is a framework with special adaptions to each game. This
|
||||
is not a description of the file format standard. Too see the exact
|
||||
definition of the file format, see @url{http://www.red-bean.com/sgf/}.
|
||||
|
||||
GNU Go contains a library to handle go game records in the SGF format in
|
||||
memory and to read and write SGF files. This library - @code{libsgf.a} -
|
||||
is in the @code{sgf} subdirectory. To use the SGF routines, include the
|
||||
file @file{sgftree.h}.
|
||||
|
||||
Each game record is stored as a tree of @dfn{nodes}, where each node
|
||||
represents a state of the game, often after some move is made. Each node
|
||||
contains zero or more @dfn{properties}, which gives meaning to the
|
||||
node. There can also be a number of @dfn{child nodes} which are
|
||||
different variations of the game tree. The first child node is the main
|
||||
variation.
|
||||
|
||||
Here is the definition of @code{SGFNode}, and @code{SGFProperty}, the
|
||||
data structures which are used to encode the game tree.
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
typedef struct SGFProperty_t @{
|
||||
struct SGFProperty_t *next;
|
||||
short name;
|
||||
char value[1];
|
||||
@} SGFProperty;
|
||||
|
||||
@end group
|
||||
@group
|
||||
|
||||
typedef struct SGFNode_t @{
|
||||
SGFProperty *props;
|
||||
struct SGFNode_t *parent;
|
||||
struct SGFNode_t *child;
|
||||
struct SGFNode_t *next;
|
||||
@} SGFNode;
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Each node of the SGF tree is stored in an @code{SGFNode} struct. It has
|
||||
a pointer to a linked list of properties (see below) called
|
||||
@code{props}. It also has a pointer to a linked list of children, where
|
||||
each child is a variation which starts at this node. The variations are
|
||||
linked through the @code{next} pointer and each variation continues
|
||||
through the @code{child} pointer. Each and every node also has a pointer
|
||||
to its parent node (the @code{parent} field), except the top node whose
|
||||
parent pointer is @code{NULL}.
|
||||
|
||||
An SGF property is encoded in the @code{SGFPoperty} struct. It is linked
|
||||
in a list through the @code{next} field. A property has a @code{name}
|
||||
which is encoded in a short int. Symbolic names of properties can be
|
||||
found in @file{sgf_properties.h}.
|
||||
|
||||
Some properties also have a value, which could be an integer, a floating
|
||||
point value, a character or a string. These values can be accessed or
|
||||
set through special functions.
|
||||
|
||||
@section The SGFTree datatype
|
||||
|
||||
Sometimes we just want to record an ongoing game or something similarly
|
||||
simple and not do any sofisticated tree manipulation. In that case we
|
||||
can use the simplified interface provided by @code{SGFTree} below.
|
||||
|
||||
@example
|
||||
@group
|
||||
|
||||
typedef struct SGFTree_t @{
|
||||
SGFNode *root;
|
||||
SGFNode *lastnode;
|
||||
@} SGFTree;
|
||||
|
||||
@end group
|
||||
@end example
|
||||
|
||||
An @code{SGFTree} contains a pointer to the root node of an SGF tree and
|
||||
a pointer to the node that we last accessed. Most of the time this will
|
||||
be the last move of an ongoing game.
|
||||
|
||||
Most of the functions which manipulate an @code{SGFTree} work exactly
|
||||
like their @code{SGFNode} counterparts, except that they work on the
|
||||
current node of the tree.
|
||||
|
||||
All the functions below that take arguments @code{tree} and @code{node}
|
||||
will work on:
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
@code{node} if non-@code{NULL}
|
||||
@item
|
||||
@code{tree->lastnode} if non-@code{NULL}
|
||||
@item
|
||||
The current end of the game tree.
|
||||
@end enumerate
|
||||
in that order.
|
||||
|
502
gnugo/doc/sync-prod1.eps
Normal file
|
@ -0,0 +1,502 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: sync-prod1.eps
|
||||
%%Creator: fig2dev Version 3.2 Patchlevel 1
|
||||
%%CreationDate: Tue Jun 19 10:48:42 2001
|
||||
%%For: turvoy@semeai.irisa.fr (Tanguy Urvoy, DEA, Paragraphe)
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 211 201
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%Magnification: 0.6000
|
||||
%%EndComments
|
||||
/$F2psDict 200 dict def
|
||||
$F2psDict begin
|
||||
$F2psDict /mtrx matrix put
|
||||
/col-1 {0 setgray} bind def
|
||||
/col0 {0.000 0.000 0.000 srgb} bind def
|
||||
/col1 {0.000 0.000 1.000 srgb} bind def
|
||||
/col2 {0.000 1.000 0.000 srgb} bind def
|
||||
/col3 {0.000 1.000 1.000 srgb} bind def
|
||||
/col4 {1.000 0.000 0.000 srgb} bind def
|
||||
/col5 {1.000 0.000 1.000 srgb} bind def
|
||||
/col6 {1.000 1.000 0.000 srgb} bind def
|
||||
/col7 {1.000 1.000 1.000 srgb} bind def
|
||||
/col8 {0.000 0.000 0.560 srgb} bind def
|
||||
/col9 {0.000 0.000 0.690 srgb} bind def
|
||||
/col10 {0.000 0.000 0.820 srgb} bind def
|
||||
/col11 {0.530 0.810 1.000 srgb} bind def
|
||||
/col12 {0.000 0.560 0.000 srgb} bind def
|
||||
/col13 {0.000 0.690 0.000 srgb} bind def
|
||||
/col14 {0.000 0.820 0.000 srgb} bind def
|
||||
/col15 {0.000 0.560 0.560 srgb} bind def
|
||||
/col16 {0.000 0.690 0.690 srgb} bind def
|
||||
/col17 {0.000 0.820 0.820 srgb} bind def
|
||||
/col18 {0.560 0.000 0.000 srgb} bind def
|
||||
/col19 {0.690 0.000 0.000 srgb} bind def
|
||||
/col20 {0.820 0.000 0.000 srgb} bind def
|
||||
/col21 {0.560 0.000 0.560 srgb} bind def
|
||||
/col22 {0.690 0.000 0.690 srgb} bind def
|
||||
/col23 {0.820 0.000 0.820 srgb} bind def
|
||||
/col24 {0.500 0.190 0.000 srgb} bind def
|
||||
/col25 {0.630 0.250 0.000 srgb} bind def
|
||||
/col26 {0.750 0.380 0.000 srgb} bind def
|
||||
/col27 {1.000 0.500 0.500 srgb} bind def
|
||||
/col28 {1.000 0.630 0.630 srgb} bind def
|
||||
/col29 {1.000 0.750 0.750 srgb} bind def
|
||||
/col30 {1.000 0.880 0.880 srgb} bind def
|
||||
/col31 {1.000 0.840 0.000 srgb} bind def
|
||||
|
||||
end
|
||||
save
|
||||
-5.0 203.0 translate
|
||||
1 -1 scale
|
||||
|
||||
/cp {closepath} bind def
|
||||
/ef {eofill} bind def
|
||||
/gr {grestore} bind def
|
||||
/gs {gsave} bind def
|
||||
/sa {save} bind def
|
||||
/rs {restore} bind def
|
||||
/l {lineto} bind def
|
||||
/m {moveto} bind def
|
||||
/rm {rmoveto} bind def
|
||||
/n {newpath} bind def
|
||||
/s {stroke} bind def
|
||||
/sh {show} bind def
|
||||
/slc {setlinecap} bind def
|
||||
/slj {setlinejoin} bind def
|
||||
/slw {setlinewidth} bind def
|
||||
/srgb {setrgbcolor} bind def
|
||||
/rot {rotate} bind def
|
||||
/sc {scale} bind def
|
||||
/sd {setdash} bind def
|
||||
/ff {findfont} bind def
|
||||
/sf {setfont} bind def
|
||||
/scf {scalefont} bind def
|
||||
/sw {stringwidth} bind def
|
||||
/tr {translate} bind def
|
||||
/tnt {dup dup currentrgbcolor
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
|
||||
bind def
|
||||
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
|
||||
4 -2 roll mul srgb} bind def
|
||||
/DrawEllipse {
|
||||
/endangle exch def
|
||||
/startangle exch def
|
||||
/yrad exch def
|
||||
/xrad exch def
|
||||
/y exch def
|
||||
/x exch def
|
||||
/savematrix mtrx currentmatrix def
|
||||
x y tr xrad yrad sc 0 0 1 startangle endangle arc
|
||||
closepath
|
||||
savematrix setmatrix
|
||||
} def
|
||||
|
||||
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
|
||||
/$F2psEnd {$F2psEnteredState restore end} def
|
||||
%%EndProlog
|
||||
|
||||
$F2psBegin
|
||||
10 setmiterlimit
|
||||
n -1000 6625 m -1000 -1000 l 6994 -1000 l 6994 6625 l cp clip
|
||||
0.03600 0.03600 sc
|
||||
7.500 slw
|
||||
% Ellipse
|
||||
n 1200 1800 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2700 1800 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 4200 1800 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 1200 600 309 309 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 1200 3900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2700 3900 300 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 4200 3900 309 309 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 1200 5100 309 309 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Polyline
|
||||
gs clippath
|
||||
3780 1770 m 3900 1800 l 3780 1830 l 3915 1830 l 3915 1770 l cp
|
||||
clip
|
||||
n 3000 1800 m 3003 1800 l 3011 1800 l 3024 1800 l 3043 1800 l 3067 1800 l
|
||||
3097 1800 l 3129 1800 l 3162 1800 l 3196 1800 l 3229 1800 l
|
||||
3260 1800 l 3289 1800 l 3316 1800 l 3341 1800 l 3365 1800 l
|
||||
3387 1800 l 3408 1800 l 3429 1800 l 3450 1800 l 3471 1800 l
|
||||
3492 1800 l 3513 1800 l 3535 1800 l 3559 1800 l 3584 1800 l
|
||||
3611 1800 l 3640 1800 l 3671 1800 l 3704 1800 l 3738 1800 l
|
||||
3771 1800 l 3803 1800 l 3833 1800 l 3857 1800 l 3900 1800 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 3780 1770 m 3900 1800 l 3780 1830 l 3780 1800 l 3780 1770 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
780 1770 m 900 1800 l 780 1830 l 915 1830 l 915 1770 l cp
|
||||
clip
|
||||
n 300 1800 m 900 1800 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 780 1770 m 900 1800 l 780 1830 l 780 1800 l 780 1770 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4980 1770 m 5100 1800 l 4980 1830 l 5115 1830 l 5115 1770 l cp
|
||||
clip
|
||||
n 4500 1800 m 5100 1800 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4980 1770 m 5100 1800 l 4980 1830 l 4980 1800 l 4980 1770 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2313 1712 m 2400 1800 l 2282 1763 l 2397 1833 l 2428 1782 l cp
|
||||
clip
|
||||
n 1500 1800 m 1503 1798 l 1508 1795 l 1518 1789 l 1533 1780 l 1553 1768 l
|
||||
1578 1753 l 1605 1737 l 1635 1720 l 1666 1703 l 1696 1686 l
|
||||
1726 1671 l 1754 1657 l 1781 1644 l 1806 1633 l 1830 1624 l
|
||||
1852 1616 l 1873 1610 l 1893 1606 l 1912 1602 l 1931 1601 l
|
||||
1950 1600 l 1969 1601 l 1988 1602 l 2007 1606 l 2027 1610 l
|
||||
2048 1616 l 2070 1624 l 2094 1633 l 2119 1644 l 2146 1657 l
|
||||
2174 1671 l 2204 1686 l 2234 1703 l 2265 1720 l 2295 1737 l
|
||||
2322 1753 l 2347 1768 l 2367 1780 l 2400 1800 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2313 1712 m 2400 1800 l 2282 1763 l 2297 1738 l 2313 1712 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
1694 633 m 1575 600 l 1696 573 l 1561 570 l 1559 630 l cp
|
||||
clip
|
||||
n 2700 1500 m 2700 1497 l 2700 1490 l 2699 1478 l 2698 1459 l 2696 1433 l
|
||||
2694 1401 l 2691 1364 l 2688 1321 l 2684 1276 l 2679 1228 l
|
||||
2674 1181 l 2668 1134 l 2661 1088 l 2654 1046 l 2646 1005 l
|
||||
2637 968 l 2627 934 l 2617 903 l 2606 875 l 2593 849 l
|
||||
2580 825 l 2565 804 l 2549 784 l 2532 766 l 2513 750 l
|
||||
2495 737 l 2476 724 l 2455 713 l 2433 702 l 2409 692 l
|
||||
2383 683 l 2354 675 l 2324 667 l 2290 660 l 2254 653 l
|
||||
2215 647 l 2174 641 l 2129 635 l 2082 630 l 2033 626 l
|
||||
1982 622 l 1931 618 l 1879 614 l 1829 611 l 1780 609 l
|
||||
1736 606 l 1695 604 l 1661 603 l 1632 602 l 1610 601 l
|
||||
1575 600 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 1694 633 m 1575 600 l 1696 573 l 1695 603 l 1694 633 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
1697 546 m 1575 525 l 1693 487 l 1558 496 l 1562 556 l cp
|
||||
clip
|
||||
n 4200 1500 m 4200 1498 l 4199 1492 l 4199 1482 l 4197 1466 l 4195 1445 l
|
||||
4193 1418 l 4189 1385 l 4184 1348 l 4179 1307 l 4173 1263 l
|
||||
4166 1218 l 4157 1174 l 4148 1129 l 4138 1086 l 4128 1046 l
|
||||
4116 1007 l 4103 971 l 4089 937 l 4075 906 l 4058 877 l
|
||||
4041 850 l 4022 825 l 4001 802 l 3979 781 l 3955 761 l
|
||||
3928 743 l 3900 725 l 3876 712 l 3852 699 l 3825 687 l
|
||||
3798 675 l 3769 664 l 3739 653 l 3707 642 l 3674 632 l
|
||||
3640 622 l 3604 612 l 3567 603 l 3529 594 l 3489 585 l
|
||||
3449 577 l 3408 569 l 3366 561 l 3324 554 l 3281 548 l
|
||||
3238 541 l 3194 535 l 3151 530 l 3107 525 l 3064 520 l
|
||||
3021 516 l 2979 512 l 2937 508 l 2896 505 l 2856 502 l
|
||||
2816 499 l 2777 497 l 2739 495 l 2702 493 l 2666 491 l
|
||||
2631 490 l 2596 489 l 2563 488 l 2523 486 l 2484 486 l
|
||||
2446 485 l 2408 485 l 2371 485 l 2334 485 l 2296 485 l
|
||||
2258 486 l 2219 487 l 2179 489 l 2138 490 l 2096 492 l
|
||||
2052 494 l 2008 496 l 1963 499 l 1917 501 l 1871 504 l
|
||||
1827 507 l 1784 510 l 1743 513 l 1706 515 l 1672 518 l
|
||||
1644 520 l 1621 522 l 1603 523 l 1575 525 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 1697 546 m 1575 525 l 1693 487 l 1695 516 l 1697 546 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2282 1837 m 2400 1800 l 2313 1888 l 2428 1818 l 2397 1767 l cp
|
||||
clip
|
||||
n 1500 1800 m 1503 1802 l 1508 1805 l 1518 1811 l 1533 1820 l 1553 1832 l
|
||||
1578 1847 l 1605 1863 l 1635 1880 l 1666 1897 l 1696 1914 l
|
||||
1726 1929 l 1754 1943 l 1781 1956 l 1806 1967 l 1830 1976 l
|
||||
1852 1984 l 1873 1990 l 1893 1994 l 1912 1998 l 1931 1999 l
|
||||
1950 2000 l 1969 1999 l 1988 1998 l 2007 1994 l 2027 1990 l
|
||||
2048 1984 l 2070 1976 l 2094 1967 l 2119 1956 l 2146 1943 l
|
||||
2174 1929 l 2204 1914 l 2234 1897 l 2265 1880 l 2295 1863 l
|
||||
2322 1847 l 2347 1832 l 2367 1820 l 2400 1800 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2282 1837 m 2400 1800 l 2313 1888 l 2297 1862 l 2282 1837 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
1696 475 m 1575 450 l 1694 415 l 1559 421 l 1561 481 l cp
|
||||
clip
|
||||
n 4200 1500 m 4200 1498 l 4201 1494 l 4202 1485 l 4204 1472 l 4207 1454 l
|
||||
4210 1431 l 4213 1402 l 4217 1367 l 4221 1328 l 4225 1285 l
|
||||
4229 1238 l 4233 1189 l 4236 1139 l 4238 1088 l 4238 1037 l
|
||||
4238 987 l 4237 939 l 4234 893 l 4229 849 l 4223 807 l
|
||||
4215 768 l 4206 732 l 4194 698 l 4181 666 l 4166 637 l
|
||||
4149 610 l 4129 586 l 4108 563 l 4084 542 l 4057 523 l
|
||||
4028 506 l 3997 490 l 3963 475 l 3937 465 l 3910 456 l
|
||||
3881 448 l 3851 440 l 3819 432 l 3786 426 l 3750 420 l
|
||||
3712 414 l 3673 409 l 3630 405 l 3586 401 l 3539 397 l
|
||||
3489 395 l 3437 392 l 3381 390 l 3323 389 l 3262 388 l
|
||||
3198 388 l 3131 388 l 3062 389 l 2989 390 l 2914 391 l
|
||||
2837 393 l 2757 395 l 2676 398 l 2594 400 l 2511 403 l
|
||||
2427 407 l 2344 410 l 2263 414 l 2183 417 l 2106 421 l
|
||||
2033 425 l 1963 428 l 1899 432 l 1840 435 l 1786 438 l
|
||||
1739 440 l 1699 443 l 1665 445 l 1637 446 l 1615 448 l
|
||||
1599 449 l 1575 450 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 1696 475 m 1575 450 l 1694 415 l 1695 445 l 1696 475 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2280 3870 m 2400 3900 l 2280 3930 l 2415 3930 l 2415 3870 l cp
|
||||
clip
|
||||
n 1500 3900 m 2400 3900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2280 3870 m 2400 3900 l 2280 3930 l 2280 3900 l 2280 3870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
3780 3870 m 3900 3900 l 3780 3930 l 3915 3930 l 3915 3870 l cp
|
||||
clip
|
||||
n 3000 3900 m 3900 3900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 3780 3870 m 3900 3900 l 3780 3930 l 3780 3900 l 3780 3870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4980 3870 m 5100 3900 l 4980 3930 l 5115 3930 l 5115 3870 l cp
|
||||
clip
|
||||
n 4500 3900 m 5100 3900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4980 3870 m 5100 3900 l 4980 3930 l 4980 3900 l 4980 3870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
780 3870 m 900 3900 l 780 3930 l 915 3930 l 915 3870 l cp
|
||||
clip
|
||||
n 300 3900 m 900 3900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 780 3870 m 900 3900 l 780 3930 l 780 3900 l 780 3870 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
1230 4680 m 1200 4800 l 1170 4680 l 1170 4815 l 1230 4815 l cp
|
||||
clip
|
||||
n 1200 4200 m 1200 4800 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 1230 4680 m 1200 4800 l 1170 4680 l 1200 4680 l 1230 4680 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
1624 5099 m 1500 5100 l 1609 5041 l 1478 5075 l 1493 5133 l cp
|
||||
clip
|
||||
n 2700 4200 m 2700 4203 l 2699 4208 l 2699 4219 l 2697 4235 l 2695 4256 l
|
||||
2692 4282 l 2689 4312 l 2684 4346 l 2679 4381 l 2673 4417 l
|
||||
2666 4453 l 2658 4487 l 2649 4520 l 2640 4551 l 2629 4580 l
|
||||
2618 4607 l 2606 4631 l 2592 4654 l 2577 4676 l 2560 4696 l
|
||||
2542 4714 l 2522 4733 l 2500 4750 l 2482 4763 l 2463 4775 l
|
||||
2443 4788 l 2421 4800 l 2398 4812 l 2372 4824 l 2345 4837 l
|
||||
2315 4849 l 2283 4862 l 2249 4875 l 2212 4888 l 2172 4902 l
|
||||
2130 4916 l 2085 4931 l 2038 4945 l 1989 4961 l 1938 4976 l
|
||||
1886 4991 l 1835 5006 l 1784 5021 l 1735 5035 l 1689 5048 l
|
||||
1647 5060 l 1609 5070 l 1577 5079 l 1551 5086 l 1531 5092 l
|
||||
1500 5100 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 1624 5099 m 1500 5100 l 1609 5041 l 1616 5070 l 1624 5099 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
1696 5200 m 1575 5175 l 1694 5140 l 1559 5146 l 1561 5206 l cp
|
||||
clip
|
||||
n 4200 4200 m 4200 4202 l 4199 4207 l 4198 4215 l 4197 4228 l 4194 4246 l
|
||||
4191 4269 l 4187 4297 l 4181 4329 l 4175 4365 l 4167 4404 l
|
||||
4158 4444 l 4148 4486 l 4137 4528 l 4125 4569 l 4111 4608 l
|
||||
4097 4646 l 4081 4682 l 4064 4716 l 4046 4748 l 4026 4777 l
|
||||
4005 4805 l 3982 4830 l 3957 4853 l 3931 4875 l 3902 4895 l
|
||||
3871 4914 l 3837 4931 l 3801 4947 l 3763 4963 l 3736 4972 l
|
||||
3708 4981 l 3679 4990 l 3648 4999 l 3616 5007 l 3582 5015 l
|
||||
3546 5022 l 3508 5030 l 3468 5037 l 3426 5043 l 3382 5050 l
|
||||
3335 5056 l 3285 5063 l 3233 5069 l 3179 5075 l 3121 5081 l
|
||||
3061 5086 l 2998 5092 l 2932 5098 l 2863 5103 l 2792 5108 l
|
||||
2719 5114 l 2644 5119 l 2567 5124 l 2489 5128 l 2410 5133 l
|
||||
2332 5138 l 2254 5142 l 2177 5146 l 2102 5150 l 2031 5154 l
|
||||
1963 5157 l 1899 5160 l 1841 5163 l 1788 5166 l 1741 5168 l
|
||||
1700 5170 l 1666 5171 l 1638 5172 l 1616 5173 l 1599 5174 l
|
||||
1575 5175 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 1696 5200 m 1575 5175 l 1694 5140 l 1695 5170 l 1696 5200 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
817 5192 m 900 5100 l 870 5220 l 934 5101 l 881 5073 l cp
|
||||
clip
|
||||
n 900 5100 m 899 5100 l 896 5100 l 886 5101 l 870 5101 l 847 5102 l
|
||||
816 5104 l 781 5107 l 743 5110 l 703 5113 l 664 5117 l
|
||||
628 5122 l 594 5127 l 565 5133 l 538 5140 l 516 5147 l
|
||||
497 5155 l 481 5165 l 468 5175 l 458 5187 l 450 5200 l
|
||||
445 5213 l 441 5227 l 438 5242 l 438 5259 l 438 5276 l
|
||||
440 5293 l 444 5312 l 449 5330 l 455 5349 l 462 5368 l
|
||||
471 5386 l 480 5404 l 491 5421 l 502 5436 l 513 5450 l
|
||||
525 5463 l 537 5474 l 550 5483 l 562 5490 l 575 5496 l
|
||||
587 5499 l 600 5500 l 613 5499 l 625 5495 l 638 5489 l
|
||||
651 5480 l 665 5468 l 680 5452 l 696 5434 l 713 5412 l
|
||||
730 5387 l 749 5358 l 769 5327 l 790 5294 l 810 5260 l
|
||||
830 5226 l 848 5193 l 864 5165 l 878 5141 l 900 5100 l cp gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 817 5192 m 900 5100 l 870 5220 l 843 5206 l 817 5192 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
870 4980 m 900 5100 l 817 5008 l 881 5127 l 934 5099 l cp
|
||||
clip
|
||||
n 900 5100 m 899 5100 l 896 5100 l 886 5099 l 870 5099 l 847 5098 l
|
||||
816 5096 l 781 5093 l 743 5090 l 703 5087 l 664 5083 l
|
||||
628 5078 l 594 5073 l 565 5067 l 538 5060 l 516 5053 l
|
||||
497 5045 l 481 5035 l 468 5025 l 458 5013 l 450 5000 l
|
||||
445 4987 l 441 4973 l 438 4958 l 438 4941 l 438 4924 l
|
||||
440 4907 l 444 4888 l 449 4870 l 455 4851 l 462 4832 l
|
||||
471 4814 l 480 4796 l 491 4779 l 502 4764 l 513 4750 l
|
||||
525 4737 l 537 4726 l 550 4717 l 562 4710 l 575 4704 l
|
||||
587 4701 l 600 4700 l 613 4701 l 625 4705 l 638 4711 l
|
||||
651 4720 l 665 4732 l 680 4748 l 696 4766 l 713 4788 l
|
||||
730 4813 l 749 4842 l 769 4873 l 790 4906 l 810 4940 l
|
||||
830 4974 l 848 5007 l 864 5035 l 878 5059 l 900 5100 l cp gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 870 4980 m 900 5100 l 817 5008 l 843 4994 l 870 4980 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
817 692 m 900 600 l 870 720 l 934 601 l 881 573 l cp
|
||||
clip
|
||||
n 900 600 m 899 600 l 896 600 l 886 601 l 870 601 l 847 602 l
|
||||
816 604 l 781 607 l 743 610 l 703 613 l 664 617 l
|
||||
628 622 l 594 627 l 565 633 l 538 640 l 516 647 l
|
||||
497 655 l 481 665 l 468 675 l 458 687 l 450 700 l
|
||||
445 713 l 441 727 l 438 742 l 438 759 l 438 776 l
|
||||
440 793 l 444 812 l 449 830 l 455 849 l 462 868 l
|
||||
471 886 l 480 904 l 491 921 l 502 936 l 513 950 l
|
||||
525 963 l 537 974 l 550 983 l 562 990 l 575 996 l
|
||||
587 999 l 600 1000 l 613 999 l 625 995 l 638 989 l
|
||||
651 980 l 665 968 l 680 952 l 696 934 l 713 912 l
|
||||
730 887 l 749 858 l 769 827 l 790 794 l 810 760 l
|
||||
830 726 l 848 693 l 864 665 l 878 641 l 900 600 l cp gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 817 692 m 900 600 l 870 720 l 843 706 l 817 692 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
870 480 m 900 600 l 817 508 l 881 627 l 934 599 l cp
|
||||
clip
|
||||
n 900 600 m 899 600 l 896 600 l 886 599 l 870 599 l 847 598 l
|
||||
816 596 l 781 593 l 743 590 l 703 587 l 664 583 l
|
||||
628 578 l 594 573 l 565 567 l 538 560 l 516 553 l
|
||||
497 545 l 481 535 l 468 525 l 458 513 l 450 500 l
|
||||
445 487 l 441 473 l 438 458 l 438 441 l 438 424 l
|
||||
440 407 l 444 388 l 449 370 l 455 351 l 462 332 l
|
||||
471 314 l 480 296 l 491 279 l 502 264 l 513 250 l
|
||||
525 237 l 537 226 l 550 217 l 562 210 l 575 204 l
|
||||
587 201 l 600 200 l 613 201 l 625 205 l 638 211 l
|
||||
651 220 l 665 232 l 680 248 l 696 266 l 713 288 l
|
||||
730 313 l 749 342 l 769 373 l 790 406 l 810 440 l
|
||||
830 474 l 848 507 l 864 535 l 878 559 l 900 600 l cp gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 870 480 m 900 600 l 817 508 l 843 494 l 870 480 l cp gs 0.00 setgray ef gr col0 s
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
2700 975 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
1125 675 m
|
||||
gs 1 -1 sc (0) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
1125 1875 m
|
||||
gs 1 -1 sc (1) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
2625 1875 m
|
||||
gs 1 -1 sc (2) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
4125 1875 m
|
||||
gs 1 -1 sc (3) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
3375 1725 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
1875 1575 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
1875 2175 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
3750 900 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
4200 600 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
1125 3975 m
|
||||
gs 1 -1 sc (1) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
2625 3975 m
|
||||
gs 1 -1 sc (2) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
4125 3975 m
|
||||
gs 1 -1 sc (3) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
1125 5175 m
|
||||
gs 1 -1 sc (0) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
1875 3825 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
3375 3825 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
1275 4500 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
2700 4725 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
4200 4725 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
5025 1725 m
|
||||
gs 1 -1 sc (Pattern A) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
5025 3750 m
|
||||
gs 1 -1 sc (Pattern B) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
150 5475 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
150 4950 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
150 975 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
150 450 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
975 225 m
|
||||
gs 1 -1 sc (Error state) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
900 5625 m
|
||||
gs 1 -1 sc (Error state) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
225 2100 m
|
||||
gs 1 -1 sc (Start) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
225 3750 m
|
||||
gs 1 -1 sc (Start) col0 sh gr
|
||||
$F2psEnd
|
||||
rs
|
122
gnugo/doc/sync-prod1.fig
Normal file
|
@ -0,0 +1,122 @@
|
|||
#FIG 3.2
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
100.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1200 1800 300 300 1200 1800 1500 1800
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2700 1800 300 300 2700 1800 3000 1800
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 4200 1800 300 300 4200 1800 4500 1800
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1200 600 309 309 1200 600 1500 675
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1200 3900 300 300 1200 3900 1500 3900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 2700 3900 300 300 2700 3900 3000 3900
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 4200 3900 309 309 4200 3900 4500 3975
|
||||
1 3 0 1 0 7 100 0 -1 0.000 1 0.0000 1200 5100 309 309 1200 5100 1500 5175
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
3000 1800 3450 1800 3900 1800
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
300 1800 900 1800
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
4500 1800 5100 1800
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
1500 1800 1950 1500 2400 1800
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
2700 1500 2700 600 1575 600
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 1.00 60.00 120.00
|
||||
4200 1500 4200 600 2400 450 1575 525
|
||||
0.000 1.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
1500 1800 1950 2100 2400 1800
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
4200 1500 4500 225 1575 450
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
1500 3900 2400 3900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
3000 3900 3900 3900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
4500 3900 5100 3900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
300 3900 900 3900
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
1200 4200 1200 4800
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
2700 4200 2700 4800 1500 5100
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
4200 4200 4200 5100 1575 5175
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 1.00 60.00 120.00
|
||||
900 5100 300 5100 600 5700 900 5100
|
||||
0.000 1.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 1.00 60.00 120.00
|
||||
900 5100 300 5100 600 4500 900 5100
|
||||
0.000 1.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 1.00 60.00 120.00
|
||||
900 600 300 600 600 1200 900 600
|
||||
0.000 1.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 1.00 60.00 120.00
|
||||
900 600 300 600 600 0 900 600
|
||||
0.000 1.000 1.000 0.000
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 2700 975 O\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 120 1125 675 0\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 120 1125 1875 1\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 120 2625 1875 2\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 120 4125 1875 3\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 3375 1725 X\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 1875 1575 X\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 1875 2175 O\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 3750 900 X\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 4200 600 O\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 120 1125 3975 1\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 120 2625 3975 2\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 120 4125 3975 3\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 120 1125 5175 0\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 1875 3825 O\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 3375 3825 O\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 1275 4500 X\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 2700 4725 X\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 4200 4725 X\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 945 5025 1725 Pattern A\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 930 5025 3750 Pattern B\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 150 5475 X\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 150 4950 O\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 150 975 X\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 150 450 O\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 1050 975 225 Error state\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 1050 900 5625 Error state\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 480 225 2100 Start\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 480 225 3750 Start\001
|
BIN
gnugo/doc/sync-prod1.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
gnugo/doc/sync-prod1.pdf
Normal file
BIN
gnugo/doc/sync-prod1.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
418
gnugo/doc/sync-prod2.eps
Normal file
|
@ -0,0 +1,418 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: sync-prod2.eps
|
||||
%%Creator: fig2dev Version 3.2 Patchlevel 1
|
||||
%%CreationDate: Tue Jun 19 10:48:29 2001
|
||||
%%For: turvoy@semeai.irisa.fr (Tanguy Urvoy, DEA, Paragraphe)
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 221 153
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%Magnification: 0.6000
|
||||
%%EndComments
|
||||
/$F2psDict 200 dict def
|
||||
$F2psDict begin
|
||||
$F2psDict /mtrx matrix put
|
||||
/col-1 {0 setgray} bind def
|
||||
/col0 {0.000 0.000 0.000 srgb} bind def
|
||||
/col1 {0.000 0.000 1.000 srgb} bind def
|
||||
/col2 {0.000 1.000 0.000 srgb} bind def
|
||||
/col3 {0.000 1.000 1.000 srgb} bind def
|
||||
/col4 {1.000 0.000 0.000 srgb} bind def
|
||||
/col5 {1.000 0.000 1.000 srgb} bind def
|
||||
/col6 {1.000 1.000 0.000 srgb} bind def
|
||||
/col7 {1.000 1.000 1.000 srgb} bind def
|
||||
/col8 {0.000 0.000 0.560 srgb} bind def
|
||||
/col9 {0.000 0.000 0.690 srgb} bind def
|
||||
/col10 {0.000 0.000 0.820 srgb} bind def
|
||||
/col11 {0.530 0.810 1.000 srgb} bind def
|
||||
/col12 {0.000 0.560 0.000 srgb} bind def
|
||||
/col13 {0.000 0.690 0.000 srgb} bind def
|
||||
/col14 {0.000 0.820 0.000 srgb} bind def
|
||||
/col15 {0.000 0.560 0.560 srgb} bind def
|
||||
/col16 {0.000 0.690 0.690 srgb} bind def
|
||||
/col17 {0.000 0.820 0.820 srgb} bind def
|
||||
/col18 {0.560 0.000 0.000 srgb} bind def
|
||||
/col19 {0.690 0.000 0.000 srgb} bind def
|
||||
/col20 {0.820 0.000 0.000 srgb} bind def
|
||||
/col21 {0.560 0.000 0.560 srgb} bind def
|
||||
/col22 {0.690 0.000 0.690 srgb} bind def
|
||||
/col23 {0.820 0.000 0.820 srgb} bind def
|
||||
/col24 {0.500 0.190 0.000 srgb} bind def
|
||||
/col25 {0.630 0.250 0.000 srgb} bind def
|
||||
/col26 {0.750 0.380 0.000 srgb} bind def
|
||||
/col27 {1.000 0.500 0.500 srgb} bind def
|
||||
/col28 {1.000 0.630 0.630 srgb} bind def
|
||||
/col29 {1.000 0.750 0.750 srgb} bind def
|
||||
/col30 {1.000 0.880 0.880 srgb} bind def
|
||||
/col31 {1.000 0.840 0.000 srgb} bind def
|
||||
|
||||
end
|
||||
save
|
||||
-7.0 163.0 translate
|
||||
1 -1 scale
|
||||
|
||||
/cp {closepath} bind def
|
||||
/ef {eofill} bind def
|
||||
/gr {grestore} bind def
|
||||
/gs {gsave} bind def
|
||||
/sa {save} bind def
|
||||
/rs {restore} bind def
|
||||
/l {lineto} bind def
|
||||
/m {moveto} bind def
|
||||
/rm {rmoveto} bind def
|
||||
/n {newpath} bind def
|
||||
/s {stroke} bind def
|
||||
/sh {show} bind def
|
||||
/slc {setlinecap} bind def
|
||||
/slj {setlinejoin} bind def
|
||||
/slw {setlinewidth} bind def
|
||||
/srgb {setrgbcolor} bind def
|
||||
/rot {rotate} bind def
|
||||
/sc {scale} bind def
|
||||
/sd {setdash} bind def
|
||||
/ff {findfont} bind def
|
||||
/sf {setfont} bind def
|
||||
/scf {scalefont} bind def
|
||||
/sw {stringwidth} bind def
|
||||
/tr {translate} bind def
|
||||
/tnt {dup dup currentrgbcolor
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
|
||||
bind def
|
||||
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
|
||||
4 -2 roll mul srgb} bind def
|
||||
/DrawEllipse {
|
||||
/endangle exch def
|
||||
/startangle exch def
|
||||
/yrad exch def
|
||||
/xrad exch def
|
||||
/y exch def
|
||||
/x exch def
|
||||
/savematrix mtrx currentmatrix def
|
||||
x y tr xrad yrad sc 0 0 1 startangle endangle arc
|
||||
closepath
|
||||
savematrix setmatrix
|
||||
} def
|
||||
|
||||
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
|
||||
/$F2psEnd {$F2psEnteredState restore end} def
|
||||
%%EndProlog
|
||||
|
||||
$F2psBegin
|
||||
10 setmiterlimit
|
||||
n -1000 5507 m -1000 -1000 l 7326 -1000 l 7326 5507 l cp clip
|
||||
0.03600 0.03600 sc
|
||||
7.500 slw
|
||||
% Ellipse
|
||||
n 1275 2400 600 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2775 1500 600 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2779 3299 600 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 4275 600 600 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 4271 2409 600 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 4275 4200 600 300 0 360 DrawEllipse gs col0 s gr
|
||||
|
||||
% Polyline
|
||||
gs clippath
|
||||
555 2370 m 675 2400 l 555 2430 l 690 2430 l 690 2370 l cp
|
||||
clip
|
||||
n 225 2400 m 675 2400 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 555 2370 m 675 2400 l 555 2430 l 555 2400 l 555 2370 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2054 1473 m 2175 1500 l 2056 1533 l 2191 1530 l 2189 1470 l cp
|
||||
clip
|
||||
n 1275 2100 m 1275 2097 l 1276 2089 l 1276 2077 l 1278 2057 l 1280 2032 l
|
||||
1283 2002 l 1286 1967 l 1290 1930 l 1295 1893 l 1301 1856 l
|
||||
1307 1820 l 1314 1787 l 1322 1757 l 1331 1729 l 1341 1704 l
|
||||
1351 1681 l 1363 1661 l 1376 1644 l 1391 1628 l 1407 1613 l
|
||||
1425 1600 l 1441 1590 l 1459 1580 l 1479 1572 l 1500 1564 l
|
||||
1524 1557 l 1550 1550 l 1578 1544 l 1609 1539 l 1643 1534 l
|
||||
1680 1529 l 1721 1525 l 1763 1521 l 1809 1517 l 1856 1514 l
|
||||
1903 1511 l 1951 1509 l 1996 1506 l 2039 1505 l 2076 1503 l
|
||||
2108 1502 l 2134 1501 l 2175 1500 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2054 1473 m 2175 1500 l 2056 1533 l 2055 1503 l 2054 1473 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
2056 3267 m 2175 3300 l 2054 3327 l 2189 3330 l 2191 3270 l cp
|
||||
clip
|
||||
n 1275 2700 m 1275 2703 l 1276 2711 l 1276 2723 l 1278 2743 l 1280 2768 l
|
||||
1283 2798 l 1286 2833 l 1290 2870 l 1295 2907 l 1301 2944 l
|
||||
1307 2980 l 1314 3013 l 1322 3043 l 1331 3071 l 1341 3096 l
|
||||
1351 3119 l 1363 3139 l 1376 3156 l 1391 3172 l 1407 3187 l
|
||||
1425 3200 l 1441 3210 l 1459 3220 l 1479 3228 l 1500 3236 l
|
||||
1524 3243 l 1550 3250 l 1578 3256 l 1609 3261 l 1643 3266 l
|
||||
1680 3271 l 1721 3275 l 1763 3279 l 1809 3283 l 1856 3286 l
|
||||
1903 3289 l 1951 3291 l 1996 3294 l 2039 3295 l 2076 3297 l
|
||||
2108 3298 l 2134 3299 l 2175 3300 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 2056 3267 m 2175 3300 l 2054 3327 l 2055 3297 l 2056 3267 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
3554 573 m 3675 600 l 3556 633 l 3691 630 l 3689 570 l cp
|
||||
clip
|
||||
n 2775 1200 m 2775 1197 l 2776 1189 l 2776 1177 l 2778 1157 l 2780 1132 l
|
||||
2783 1102 l 2786 1067 l 2790 1030 l 2795 993 l 2801 956 l
|
||||
2807 920 l 2814 887 l 2822 857 l 2831 829 l 2841 804 l
|
||||
2851 781 l 2863 761 l 2876 744 l 2891 728 l 2907 713 l
|
||||
2925 700 l 2941 690 l 2959 680 l 2979 672 l 3000 664 l
|
||||
3024 657 l 3050 650 l 3078 644 l 3109 639 l 3143 634 l
|
||||
3180 629 l 3221 625 l 3263 621 l 3309 617 l 3356 614 l
|
||||
3403 611 l 3451 609 l 3496 606 l 3539 605 l 3576 603 l
|
||||
3608 602 l 3634 601 l 3675 600 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 3554 573 m 3675 600 l 3556 633 l 3555 603 l 3554 573 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
3572 2331 m 3675 2400 l 3552 2388 l 3679 2433 l 3699 2377 l cp
|
||||
clip
|
||||
n 2775 1800 m 2777 1803 l 2781 1809 l 2788 1819 l 2798 1835 l 2812 1855 l
|
||||
2828 1879 l 2847 1905 l 2866 1932 l 2886 1959 l 2906 1985 l
|
||||
2925 2010 l 2944 2032 l 2963 2053 l 2981 2072 l 2999 2090 l
|
||||
3017 2106 l 3036 2122 l 3055 2136 l 3075 2150 l 3093 2161 l
|
||||
3111 2173 l 3131 2184 l 3152 2195 l 3174 2206 l 3199 2218 l
|
||||
3225 2230 l 3254 2242 l 3286 2255 l 3320 2269 l 3356 2283 l
|
||||
3394 2298 l 3433 2313 l 3473 2327 l 3512 2342 l 3550 2355 l
|
||||
3583 2368 l 3613 2378 l 3636 2386 l 3675 2400 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 3572 2331 m 3675 2400 l 3552 2388 l 3562 2359 l 3572 2331 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4995 2370 m 4875 2400 l 4967 2317 l 4848 2381 l 4876 2434 l cp
|
||||
clip
|
||||
n 4875 2400 m 4875 2399 l 4875 2396 l 4876 2386 l 4876 2370 l 4877 2347 l
|
||||
4879 2316 l 4882 2281 l 4885 2243 l 4888 2203 l 4892 2164 l
|
||||
4897 2128 l 4902 2094 l 4908 2065 l 4915 2038 l 4922 2016 l
|
||||
4930 1997 l 4940 1981 l 4950 1968 l 4962 1958 l 4975 1950 l
|
||||
4988 1945 l 5002 1941 l 5017 1938 l 5034 1938 l 5051 1938 l
|
||||
5068 1940 l 5087 1944 l 5105 1949 l 5124 1955 l 5143 1962 l
|
||||
5161 1971 l 5179 1980 l 5196 1991 l 5211 2002 l 5225 2013 l
|
||||
5238 2025 l 5249 2037 l 5258 2050 l 5265 2062 l 5271 2075 l
|
||||
5274 2087 l 5275 2100 l 5274 2113 l 5270 2125 l 5264 2138 l
|
||||
5255 2151 l 5243 2165 l 5227 2180 l 5209 2196 l 5187 2213 l
|
||||
5162 2230 l 5133 2249 l 5102 2269 l 5069 2290 l 5035 2310 l
|
||||
5001 2330 l 4968 2348 l 4940 2364 l 4916 2378 l 4875 2400 l cp gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4995 2370 m 4875 2400 l 4967 2317 l 4981 2343 l 4995 2370 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4967 2483 m 4875 2400 l 4995 2430 l 4876 2366 l 4848 2419 l cp
|
||||
clip
|
||||
n 4875 2400 m 4875 2401 l 4875 2404 l 4876 2414 l 4876 2430 l 4877 2453 l
|
||||
4879 2484 l 4882 2519 l 4885 2557 l 4888 2597 l 4892 2636 l
|
||||
4897 2672 l 4902 2706 l 4908 2735 l 4915 2762 l 4922 2784 l
|
||||
4930 2803 l 4940 2819 l 4950 2832 l 4962 2842 l 4975 2850 l
|
||||
4988 2855 l 5002 2859 l 5017 2862 l 5034 2862 l 5051 2862 l
|
||||
5068 2860 l 5087 2856 l 5105 2851 l 5124 2845 l 5143 2838 l
|
||||
5161 2829 l 5179 2820 l 5196 2809 l 5211 2798 l 5225 2787 l
|
||||
5238 2775 l 5249 2763 l 5258 2750 l 5265 2738 l 5271 2725 l
|
||||
5274 2713 l 5275 2700 l 5274 2687 l 5270 2675 l 5264 2662 l
|
||||
5255 2649 l 5243 2635 l 5227 2620 l 5209 2604 l 5187 2587 l
|
||||
5162 2570 l 5133 2551 l 5102 2531 l 5069 2510 l 5035 2490 l
|
||||
5001 2470 l 4968 2452 l 4940 2436 l 4916 2422 l 4875 2400 l cp gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4967 2483 m 4875 2400 l 4995 2430 l 4981 2457 l 4967 2483 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4252 1978 m 4275 2100 l 4198 2003 l 4254 2126 l 4309 2101 l cp
|
||||
clip
|
||||
n 4275 900 m 4274 903 l 4271 909 l 4266 919 l 4259 935 l 4249 957 l
|
||||
4237 984 l 4223 1015 l 4208 1050 l 4192 1087 l 4177 1124 l
|
||||
4161 1161 l 4147 1198 l 4134 1233 l 4122 1266 l 4112 1298 l
|
||||
4102 1327 l 4095 1355 l 4088 1381 l 4083 1406 l 4080 1430 l
|
||||
4077 1454 l 4075 1477 l 4075 1500 l 4075 1523 l 4077 1546 l
|
||||
4080 1570 l 4083 1594 l 4088 1619 l 4095 1645 l 4102 1673 l
|
||||
4112 1702 l 4122 1734 l 4134 1767 l 4147 1802 l 4161 1839 l
|
||||
4177 1876 l 4192 1913 l 4208 1950 l 4223 1985 l 4237 2016 l
|
||||
4249 2043 l 4259 2065 l 4275 2100 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4252 1978 m 4275 2100 l 4198 2003 l 4225 1991 l 4252 1978 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4352 2003 m 4275 2100 l 4298 1978 l 4241 2101 l 4296 2126 l cp
|
||||
clip
|
||||
n 4275 900 m 4276 903 l 4279 909 l 4284 919 l 4291 935 l 4301 957 l
|
||||
4313 984 l 4327 1015 l 4342 1050 l 4358 1087 l 4373 1124 l
|
||||
4389 1161 l 4403 1198 l 4416 1233 l 4428 1266 l 4438 1298 l
|
||||
4448 1327 l 4455 1355 l 4462 1381 l 4467 1406 l 4470 1430 l
|
||||
4473 1454 l 4475 1477 l 4475 1500 l 4475 1523 l 4473 1546 l
|
||||
4470 1570 l 4467 1594 l 4462 1619 l 4455 1645 l 4448 1673 l
|
||||
4438 1702 l 4428 1734 l 4416 1767 l 4403 1802 l 4389 1839 l
|
||||
4373 1876 l 4358 1913 l 4342 1950 l 4327 1985 l 4313 2016 l
|
||||
4301 2043 l 4291 2065 l 4275 2100 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4352 2003 m 4275 2100 l 4298 1978 l 4325 1991 l 4352 2003 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
5280 570 m 5400 600 l 5280 630 l 5415 630 l 5415 570 l cp
|
||||
clip
|
||||
n 4875 600 m 5400 600 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5280 570 m 5400 600 l 5280 630 l 5280 600 l 5280 570 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
3556 4167 m 3675 4200 l 3554 4227 l 3689 4230 l 3691 4170 l cp
|
||||
clip
|
||||
n 2775 3600 m 2775 3603 l 2776 3611 l 2776 3623 l 2778 3643 l 2780 3668 l
|
||||
2783 3698 l 2786 3733 l 2790 3770 l 2795 3807 l 2801 3844 l
|
||||
2807 3880 l 2814 3913 l 2822 3943 l 2831 3971 l 2841 3996 l
|
||||
2851 4019 l 2863 4039 l 2876 4056 l 2891 4072 l 2907 4087 l
|
||||
2925 4100 l 2941 4110 l 2959 4120 l 2979 4128 l 3000 4136 l
|
||||
3024 4143 l 3050 4150 l 3078 4156 l 3109 4161 l 3143 4166 l
|
||||
3180 4171 l 3221 4175 l 3263 4179 l 3309 4183 l 3356 4186 l
|
||||
3403 4189 l 3451 4191 l 3496 4194 l 3539 4195 l 3576 4197 l
|
||||
3608 4198 l 3634 4199 l 3675 4200 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 3556 4167 m 3675 4200 l 3554 4227 l 3555 4197 l 3556 4167 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
3885 985 m 3975 900 l 3936 1017 l 4008 903 l 3958 871 l cp
|
||||
clip
|
||||
n 2775 3000 m 2775 2998 l 2776 2995 l 2776 2989 l 2778 2979 l 2780 2965 l
|
||||
2783 2948 l 2786 2928 l 2791 2905 l 2796 2880 l 2802 2854 l
|
||||
2809 2826 l 2817 2798 l 2826 2770 l 2835 2742 l 2846 2713 l
|
||||
2857 2684 l 2869 2655 l 2883 2624 l 2898 2593 l 2915 2560 l
|
||||
2933 2526 l 2953 2489 l 2975 2450 l 2988 2427 l 3002 2403 l
|
||||
3017 2377 l 3033 2351 l 3049 2324 l 3067 2295 l 3085 2265 l
|
||||
3105 2233 l 3126 2200 l 3148 2165 l 3172 2128 l 3196 2089 l
|
||||
3223 2048 l 3251 2004 l 3280 1959 l 3311 1911 l 3343 1861 l
|
||||
3377 1809 l 3412 1755 l 3449 1699 l 3486 1641 l 3525 1583 l
|
||||
3564 1523 l 3603 1463 l 3643 1403 l 3682 1344 l 3719 1287 l
|
||||
3756 1232 l 3790 1179 l 3823 1130 l 3852 1086 l 3879 1045 l
|
||||
3902 1010 l 3922 980 l 3938 956 l 3951 936 l 3961 922 l
|
||||
3975 900 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 3885 985 m 3975 900 l 3936 1017 l 3911 1001 l 3885 985 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
5280 4170 m 5400 4200 l 5280 4230 l 5415 4230 l 5415 4170 l cp
|
||||
clip
|
||||
n 4875 4200 m 5400 4200 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 5280 4170 m 5400 4200 l 5280 4230 l 5280 4200 l 5280 4170 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4298 2822 m 4275 2700 l 4352 2797 l 4296 2674 l 4241 2699 l cp
|
||||
clip
|
||||
n 4275 3900 m 4276 3897 l 4279 3891 l 4284 3881 l 4291 3865 l 4301 3843 l
|
||||
4313 3816 l 4327 3785 l 4342 3750 l 4358 3713 l 4373 3676 l
|
||||
4389 3639 l 4403 3602 l 4416 3567 l 4428 3534 l 4438 3502 l
|
||||
4448 3473 l 4455 3445 l 4462 3419 l 4467 3394 l 4470 3370 l
|
||||
4473 3346 l 4475 3323 l 4475 3300 l 4475 3277 l 4473 3254 l
|
||||
4470 3230 l 4467 3206 l 4462 3181 l 4455 3155 l 4448 3127 l
|
||||
4438 3098 l 4428 3066 l 4416 3033 l 4403 2998 l 4389 2961 l
|
||||
4373 2924 l 4358 2887 l 4342 2850 l 4327 2815 l 4313 2784 l
|
||||
4301 2757 l 4291 2735 l 4275 2700 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4298 2822 m 4275 2700 l 4352 2797 l 4325 2809 l 4298 2822 l cp gs 0.00 setgray ef gr col0 s
|
||||
% Polyline
|
||||
gs clippath
|
||||
4198 2797 m 4275 2700 l 4252 2822 l 4309 2699 l 4254 2674 l cp
|
||||
clip
|
||||
n 4275 3900 m 4274 3897 l 4271 3891 l 4266 3881 l 4259 3865 l 4249 3843 l
|
||||
4237 3816 l 4223 3785 l 4208 3750 l 4192 3713 l 4177 3676 l
|
||||
4161 3639 l 4147 3602 l 4134 3567 l 4122 3534 l 4112 3502 l
|
||||
4102 3473 l 4095 3445 l 4088 3419 l 4083 3394 l 4080 3370 l
|
||||
4077 3346 l 4075 3323 l 4075 3300 l 4075 3277 l 4077 3254 l
|
||||
4080 3230 l 4083 3206 l 4088 3181 l 4095 3155 l 4102 3127 l
|
||||
4112 3098 l 4122 3066 l 4134 3033 l 4147 2998 l 4161 2961 l
|
||||
4177 2924 l 4192 2887 l 4208 2850 l 4223 2815 l 4237 2784 l
|
||||
4249 2757 l 4259 2735 l 4275 2700 l gs col0 s gr gr
|
||||
|
||||
% arrowhead
|
||||
n 4198 2797 m 4275 2700 l 4252 2822 l 4225 2809 l 4198 2797 l cp gs 0.00 setgray ef gr col0 s
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
1050 2475 m
|
||||
gs 1 -1 sc (1 , 1) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
1350 1500 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
2475 1575 m
|
||||
gs 1 -1 sc (2 , 0) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
2475 3375 m
|
||||
gs 1 -1 sc (2 , 2) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
1350 3450 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
3975 675 m
|
||||
gs 1 -1 sc (3 , 0) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
2850 600 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
3975 2475 m
|
||||
gs 1 -1 sc (0 , 0) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
5250 1950 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
5250 2925 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
5250 2475 m
|
||||
gs 1 -1 sc (Error state) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
3900 1575 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
4500 1575 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
5025 525 m
|
||||
gs 1 -1 sc (Pattern A) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
225 2250 m
|
||||
gs 1 -1 sc (Start) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
2775 2250 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
3975 4275 m
|
||||
gs 1 -1 sc (0 , 3) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
2775 4275 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
2550 2850 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 240.00 scf sf
|
||||
4950 4125 m
|
||||
gs 1 -1 sc (Pattern B) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
3900 3375 m
|
||||
gs 1 -1 sc (X) col0 sh gr
|
||||
/Times-Roman ff 180.00 scf sf
|
||||
4500 3375 m
|
||||
gs 1 -1 sc (O) col0 sh gr
|
||||
$F2psEnd
|
||||
rs
|
99
gnugo/doc/sync-prod2.fig
Normal file
|
@ -0,0 +1,99 @@
|
|||
#FIG 3.2
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
100.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
6 225 300 6300 4500
|
||||
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 1275 2400 600 300 1275 2400 1875 2100
|
||||
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 2775 1500 600 300 2775 1500 3375 1200
|
||||
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 2779 3299 600 300 2779 3299 3379 2999
|
||||
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 4275 600 600 300 4275 600 4875 300
|
||||
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 4271 2409 600 300 4271 2409 4871 2109
|
||||
1 1 0 1 0 7 100 0 -1 0.000 1 0.0000 4275 4200 600 300 4275 4200 4875 3900
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
225 2400 675 2400
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
1275 2100 1275 1500 2175 1500
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
1275 2700 1275 3300 2175 3300
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
2775 1200 2775 600 3675 600
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
2775 1800 3000 2175 3675 2400
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 1.00 60.00 120.00
|
||||
4875 2400 4875 1800 5475 2100 4875 2400
|
||||
0.000 1.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 4
|
||||
1 1 1.00 60.00 120.00
|
||||
4875 2400 4875 3000 5475 2700 4875 2400
|
||||
0.000 1.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
4275 900 3975 1500 4275 2100
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
4275 900 4575 1500 4275 2100
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
4875 600 5400 600
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
2775 3600 2775 4200 3675 4200
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
2775 3000 2775 2700 3975 900
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
4875 4200 5400 4200
|
||||
0.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
4275 3900 4575 3300 4275 2700
|
||||
0.000 1.000 0.000
|
||||
3 0 0 1 0 7 100 0 -1 0.000 0 1 0 3
|
||||
1 1 1.00 60.00 120.00
|
||||
4275 3900 3975 3300 4275 2700
|
||||
0.000 1.000 0.000
|
||||
4 0 0 100 0 0 16 0.0000 4 180 540 1050 2475 1 , 1\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 1350 1500 X\001
|
||||
4 0 0 100 0 0 16 0.0000 4 180 540 2475 1575 2 , 0\001
|
||||
4 0 0 100 0 0 16 0.0000 4 180 540 2475 3375 2 , 2\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 1350 3450 O\001
|
||||
4 0 0 100 0 0 16 0.0000 4 180 540 3975 675 3 , 0\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 2850 600 X\001
|
||||
4 0 0 100 0 0 16 0.0000 4 180 540 3975 2475 0 , 0\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 5250 1950 X\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 5250 2925 O\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 1050 5250 2475 Error state\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 3900 1575 X\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 4500 1575 O\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 945 5025 525 Pattern A\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 480 225 2250 Start\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 2775 2250 O\001
|
||||
4 0 0 100 0 0 16 0.0000 4 180 540 3975 4275 0 , 3\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 2775 4275 O\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 2550 2850 X\001
|
||||
4 0 0 100 0 0 16 0.0000 4 165 930 4950 4125 Pattern B\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 3900 3375 X\001
|
||||
4 0 0 100 0 0 12 0.0000 4 135 135 4500 3375 O\001
|
||||
-6
|
BIN
gnugo/doc/sync-prod2.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
gnugo/doc/sync-prod2.pdf
Normal file
BIN
gnugo/doc/sync-prod2.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
8677
gnugo/doc/texinfo.tex
Normal file
891
gnugo/doc/using.texi
Normal file
|
@ -0,0 +1,891 @@
|
|||
@menu
|
||||
* Documentation:: Getting Documentation
|
||||
* CGoban:: Running GNU Go with CGoban
|
||||
* Other Clients:: Other Clients
|
||||
* Ascii:: The Ascii Interface
|
||||
* Emacs:: GNU Go mode in Emacs
|
||||
* GMP and GTP:: The Go Modem Protocol and Go Text Protocol
|
||||
* Tournaments:: Computer Tournaments
|
||||
* SGF Support:: The Smart Game Format
|
||||
* Invoking GNU Go:: Command line options
|
||||
@end menu
|
||||
|
||||
@node Documentation
|
||||
|
||||
@section Getting Documentation
|
||||
|
||||
You can obtain a printed copy of the manual by running @command{make
|
||||
gnugo.pdf} in the @file{doc/}directory, then printing the resulting file. The
|
||||
manual contains a great deal of information about the algorithms of GNU Go.
|
||||
|
||||
On platforms supporting info documentation, you can usually
|
||||
install the manual by executing `make install' (running as
|
||||
root) from the @file{doc/} directory. This will create a file
|
||||
called @file{gnugo.info} (and a few others) and copy them into
|
||||
a system directory such as @file{/usr/local/share/info}. You
|
||||
may then add them to your info directory tree with the command
|
||||
@command{install-info --info-file=[path to gnugo.info] --info-dir=[path to dir]}.
|
||||
The info documentation can be read conveniently from within Emacs by executing
|
||||
the command @command{Control-h i}.
|
||||
|
||||
Documentation in @file{doc/} consists of a man page @file{gnugo.6}, the
|
||||
info files @file{gnugo.info}, @file{gnugo.info-1}, ... and the
|
||||
Texinfo files from which the info files are built. The Texinfo
|
||||
documentation contains this User's Guide and extensive information
|
||||
about the algorithms of GNU Go, for developers.
|
||||
|
||||
If you want a typeset copy of the Texinfo documentation, you can
|
||||
@command{make gnugo.dvi}, @command{make gnugo.ps}, or @command{make
|
||||
gnugo.pdf} in the @file{doc/} directory. (@command{make gnugo.pdf} only
|
||||
works after you have converted all .eps-files in the doc/ directory to
|
||||
.pdf files, e.g. with the utility epstopdf.)
|
||||
|
||||
You can make an HTML version with the command @command{makeinfo --html
|
||||
gnugo.texi}. If you have @command{texi2html}, better HTML documentation
|
||||
may be obtained by @command{make gnugo.html} in the @file{doc/}
|
||||
directory.
|
||||
|
||||
User documentation can be obtained by running @command{gnugo --help}
|
||||
or @command{man gnugo} from any terminal, or from the Texinfo
|
||||
documentation.
|
||||
|
||||
Documentation for developers is in the Texinfo documentation, and in comments
|
||||
throughout the source. Contact us at @email{gnugo@@gnu.org} if you are
|
||||
interested in helping to develop this program.
|
||||
|
||||
@node CGoban
|
||||
@section Running GNU Go via CGoban
|
||||
@cindex CGoban
|
||||
|
||||
There are two different programs called CGoban, both written by
|
||||
William Shubert. In this documentation, CGoban means CGoban 1.x,
|
||||
the older program. You should get a copy with version number 1.12
|
||||
or higher.
|
||||
|
||||
CGoban is an extremely nice way to run GNU Go. CGoban provides a
|
||||
beautiful graphic user interface under X Window System.
|
||||
|
||||
Start CGoban. When the CGoban Control panel comes up, select ``Go
|
||||
Modem''. You will get the Go Modem Protocol Setup. Choose one (or
|
||||
both) of the players to be ``Program,'' and fill out the box with the
|
||||
path to @file{gnugo}. After clicking OK, you get the Game Setup
|
||||
window. Choose ``Rules Set'' to be Japanese (otherwise handicaps
|
||||
won't work). Set the board size and handicap if you want.
|
||||
|
||||
If you want to play with a komi, you should bear in mind that
|
||||
the GMP does not have any provision for communicating the komi.
|
||||
Because of this misfeature, unless you set the komi at the command
|
||||
line GNU Go will have to guess it. It assumes the komi is 5.5 for
|
||||
even games, 0.5 for handicap games. If this is not what you want,
|
||||
you can specify the komi at the command line with the
|
||||
@option{--komi} option, in the Go Modem Protocol Setup window.
|
||||
You have to set the komi again in the Game Setup window, which
|
||||
comes up next.
|
||||
|
||||
Click OK and you are ready to go.
|
||||
|
||||
In the Go Modem Protocol Setup window, when you specify the path to
|
||||
GNU Go, you can give it command line options, such as @option{--quiet} to
|
||||
suppress most messages. Since the Go Modem Protocol preempts standard
|
||||
I/O other messages are sent to stderr, even if they are not error
|
||||
messages. These will appear in the terminal from which you started
|
||||
CGoban.
|
||||
|
||||
@node Other Clients
|
||||
@section Other Clients
|
||||
@cindex jago
|
||||
@cindex quarry
|
||||
@cindex qGo
|
||||
|
||||
In addition to CGoban (@pxref{CGoban}) there are a number of
|
||||
other good clients that are capable of running GNU Go. Here
|
||||
are the ones that we are aware of that are Free Software. This
|
||||
list is part of a larger list of free Go programs that is maintained
|
||||
at @url{http://www.gnu.org/software/gnugo/free_go_software.html}.
|
||||
|
||||
@itemize @bullet
|
||||
@item Quarry (@url{http://home.gna.org/quarry/}) is a GPL'd
|
||||
client that supports GTP. Works under GNU/Linux and requires
|
||||
GTK+ 2.x and librsvg 2.5. Supports GNU Go as well as other
|
||||
engines. Can play not only Go, but also a few other board
|
||||
games.
|
||||
@item qGo (@url{http://sourceforge.net/projects/qgo/}) is a
|
||||
full featured Client for playing on the servers, SGF viewing/editing,
|
||||
and GNU Go client written in C++ for GNU/Linux, Windows and Mac OS X.
|
||||
Can play One Color Go. Licensed GPL and QPL.
|
||||
@item ccGo (@url{http://ccdw.org/~cjj/prog/ccgo/}) is a GPL'd client
|
||||
written in C++ capable of playing with GNU Go, or on IGS.
|
||||
@item RubyGo (@url{http://rubygo.rubyforge.org/}) is a GPL'd
|
||||
client by J.-F. Menon for IGS written in the scripting language Ruby.
|
||||
RubyGo is capable of playing with GNU Go using the GTP.
|
||||
@item Dingoui (@url{http://dingoui.sourceforge.net/}) is a free
|
||||
GMP client written in GTK+ which can run GNU Go.
|
||||
@item Jago (@url{http://www.rene-grothmann.de/jago/})
|
||||
is a GPL'd Java client which works for both Microsoft Windows
|
||||
and X Window System.
|
||||
@item Sente Software's FreeGoban
|
||||
(@url{http://www.sente.ch/software/goban/freegoban.html}) is a
|
||||
well-liked user interface for GNU Go (and potentially other
|
||||
programs) distributed under the GPL.
|
||||
@item Mac GNU Go (@url{http://www1.u-netsurf.ne.jp/~future/HTML/macgnugo.html}) is a front end for GNU Go 3.2 with both
|
||||
English and Japanese versions. License is GPL.
|
||||
@item Quickiego (@url{http://www.geocities.com/secretmojo/QuickieGo/})
|
||||
is a Mac interface to GNU Go 2.6.
|
||||
@item Gogui (@url{http://sourceforge.net/projects/gogui/}) from
|
||||
Markus Enzenberger is a Java workbench that allows you to play
|
||||
with a gtp (@url{http://www.lysator.liu.se/~gunnar/gtp})
|
||||
engine such as GNU Go. Licence is GPL. Gogui does not
|
||||
support gmp or play on servers but is potentially very useful for programmers
|
||||
working on GNU Go or other engines.
|
||||
@end itemize
|
||||
|
||||
@node Ascii
|
||||
@section Ascii Interface
|
||||
@cindex ascii interface
|
||||
|
||||
Even if you do not have any client program, you can play with GNU Go
|
||||
using its default Ascii interface. Simply type @command{gnugo}
|
||||
at the command line, and GNU Go will draw a board. Typing
|
||||
@command{help} will give a list of options. At the end of the
|
||||
game, pass twice, and GNU Go will prompt you through the
|
||||
counting. You and GNU Go must agree on the dead groups---you
|
||||
can toggle the status of groups to be removed, and when you
|
||||
are done, GNU Go will report the score.
|
||||
|
||||
You can save the game at any point using the @command{save @var{filename}}
|
||||
command. You can reload the game from the resulting SGF file with
|
||||
the command @command{gnugo -l @var{filename} --mode ascii}. Reloading
|
||||
games is not supported when playing with CGoban. However you can
|
||||
use CGoban to save a file, then reload it in ascii mode.
|
||||
|
||||
You may play games with a time limit against GNU Go in
|
||||
ascii mode. For this, the Canadian time control system
|
||||
is used. (See @uref{http://en.wikipedia.org/wiki/Byoyomi}
|
||||
and @uref{http://senseis.xmp.net/?CanadianByoyomi}.)
|
||||
That is, you have a main time to be followed by byo-yomi
|
||||
periods. After the main time is exhausted you have a certain
|
||||
number of moves to be made in a certain number of seconds.
|
||||
(@pxref{Invoking GNU Go})
|
||||
|
||||
@node Emacs
|
||||
@section GNU Go mode in Emacs
|
||||
@cindex emacs mode
|
||||
|
||||
You can run GNU Go from Emacs. This has the advantage
|
||||
that you place the stones using the cursor arrow keys
|
||||
or with the mouse, and you can have a nice graphical display of the board
|
||||
within emacs.
|
||||
|
||||
You will need the file @file{interface/gnugo.el}. There is
|
||||
a version of this distributed with GNU Go but it only
|
||||
works with Emacs 21. Most Emacsen are Emacs 22 however.
|
||||
Therefore you should get the latest version of
|
||||
gnugo.el by Thien-Thi Nguyen, which you can find at
|
||||
@uref{http://www.gnuvola.org/software/j/gnugo/} or
|
||||
@uref{http://www.emacswiki.org/emacs/gnugo.el}.
|
||||
|
||||
You will also need some xpm files for the graphical
|
||||
display. You can either use those distributed by
|
||||
Thien-Thi Nguyen (at the first URL above) or those
|
||||
distributed with GNU Go, either the file
|
||||
@file{interface/gnugo-xpms.el} or (for high resolution
|
||||
displays) @file{interface/gnugo-big-xpms.el}.
|
||||
|
||||
Load the file @file{interface/gnugo.el} and
|
||||
@file{interface/gnugo-xpms.el}. You may do this using the
|
||||
Emacs @command{M-x load-file} command.
|
||||
|
||||
When you start a game with @command{M-x gnugo},
|
||||
you will first see an ascii board. However typing `i'
|
||||
toggles a graphical board display which is very nice.
|
||||
This is a pleasant way to play GNU Go. You may get
|
||||
help by typing @command{C-x m}.
|
||||
|
||||
@node GMP and GTP
|
||||
@section The Go Modem Protocol and Go Text Protocol
|
||||
@cindex GMP
|
||||
@cindex GTP
|
||||
@cindex The Go Modem Protocol and Go Text Protocol
|
||||
|
||||
@paragraphindent 3
|
||||
The Go Modem Protocol (GMP) was developed by Bruce Wilcox with input from
|
||||
David Fotland, Anders Kierulf and others, according to the history in
|
||||
@url{http://www.britgo.org/tech/gmp.html}.
|
||||
|
||||
Any Go program @emph{should} support this protocol since it is a
|
||||
standard. Since CGoban supports this protocol, the user interface for
|
||||
any Go program can be done entirely through CGoban. The programmer can
|
||||
concentrate on the real issues without worrying about drawing stones,
|
||||
resizing the board and other distracting issues.
|
||||
|
||||
GNU Go 3.0 introduced a new protocol, the Go Text Protocol
|
||||
(@pxref{GTP}) which we hope can serve the functions currently
|
||||
used by the GMP. The GTP is becoming increasingly adopted by
|
||||
other programs as a method of interprocess communication,
|
||||
both by computer programs and by clients. Still the GMP is
|
||||
widely used in tournaments.
|
||||
|
||||
@node Tournaments
|
||||
|
||||
@section Computer Go Tournaments
|
||||
|
||||
Computer Tournaments currently use the Go Modem Protocol.
|
||||
The current method followed in such tournaments is to connect
|
||||
the serial ports of the two computers by a ``null modem'' cable.
|
||||
If you are running GNU/Linux it is convenient to use CGoban.
|
||||
If your program is black, set it up in the Go Modem Protocol
|
||||
Setup window as usual. For White, select ``Device'' and set
|
||||
the device to @file{/dev/cua0} if your serial port is COM1
|
||||
and @file{/dev/cua1} if the port is COM2.
|
||||
|
||||
@node SGF Support
|
||||
@section Smart Game Format
|
||||
@cindex SGF (Smart Game Format)
|
||||
@cindex Smart Game Format
|
||||
|
||||
The Smart Game Format (SGF), is the standard format for storing Go games.
|
||||
GNU Go supports both reading and writing SGF files. The SGF specification
|
||||
(FF[4]) is at:
|
||||
@url{http://www.red-bean.com/sgf/}
|
||||
|
||||
@node Invoking GNU Go
|
||||
@section Invoking GNU Go: Command line options
|
||||
@cindex command line options
|
||||
@cindex invoking GNU Go
|
||||
|
||||
@subsection Some basic options
|
||||
@itemize
|
||||
@item @option{--help}, @option{-h}
|
||||
@quotation
|
||||
Print a help message describing the options. This will also
|
||||
tell you the defaults of various parameters, most importantly
|
||||
the level and cache size. The default values of these
|
||||
parameters can be set before compiling by @command{configure}.
|
||||
If you forget the defaults you can find out using @option{--help}.
|
||||
@end quotation
|
||||
@item @option{--boardsize @var{size}}
|
||||
@quotation
|
||||
Set the board size
|
||||
@end quotation
|
||||
@item @option{--komi @var{num}}
|
||||
@quotation
|
||||
Set the komi
|
||||
@end quotation
|
||||
@item @option{--level @var{level}}
|
||||
@cindex level of play
|
||||
@quotation
|
||||
GNU Go can play with different strengths and speeds. Level 10
|
||||
is the default. Decreasing the level will make GNU Go faster
|
||||
but less accurate in its reading.
|
||||
@end quotation
|
||||
@item @option{--quiet}, @option{--silent}
|
||||
@quotation
|
||||
Don't print copyright and other messages. Messages specifically
|
||||
requested by other command line options, such as @option{--trace},
|
||||
are not supressed.
|
||||
@end quotation
|
||||
@item @option{-l}, @option{--infile @var{filename}}
|
||||
@quotation
|
||||
Load the named SGF file. GNU Go will generate a move for
|
||||
the player who is about to move. If you want to override this
|
||||
and generate a move for the other player you may add the
|
||||
option @option{--color @var{<color>}} where @var{<color>} is
|
||||
@code{black} or @code{white}.
|
||||
@end quotation
|
||||
@item @option{-L}, @option{--until @var{move}}
|
||||
@quotation
|
||||
Stop loading just before the indicated move is played. @var{move} can
|
||||
be either the move number or location.
|
||||
@end quotation
|
||||
@item @option{-o}, @option{--outfile @var{filename}}
|
||||
@quotation
|
||||
Write sgf output to file
|
||||
@end quotation
|
||||
@item @option{-O}, @option{--output-flags @var{flags}}
|
||||
@quotation
|
||||
Add useful information to the sgf file. Flags can be 'd', 'v' or
|
||||
both (i.e. 'dv'). If 'd' is specified, dead and critical dragons
|
||||
are marked in the sgf file. If 'v' is specified, move valuations
|
||||
around the board are indicated.
|
||||
@end quotation
|
||||
@item @option{--mode @var{mode}}
|
||||
@quotation
|
||||
Force the playing mode ('ascii', 'emacs,' 'gmp' or 'gtp'). The default is
|
||||
ASCII, but if no terminal is detected GMP (Go Modem Protocol) will be
|
||||
assumed. In practice this is usually what you want, so you may never
|
||||
need this option.
|
||||
@end quotation
|
||||
@item @option{--resign-allowed}
|
||||
@quotation
|
||||
GNU Go will resign games if this option is enabled. This is the default unless
|
||||
you build the engine with the configure option
|
||||
@option{--disable-resignation-allowed}. Unfortunately
|
||||
the Go Modem Protocol has no provision for passing a resignation,
|
||||
so this option has no effect in GMP mode.
|
||||
@end quotation
|
||||
@item @option{--never-resign}
|
||||
@quotation
|
||||
GNU Go will not resign games.
|
||||
@end quotation
|
||||
@item @option{--resign-allowed}
|
||||
@quotation
|
||||
GNU Go will resign lost games. This is the default.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@subsection Monte Carlo Options
|
||||
|
||||
GNU Go can play Monte Carlo Go on a 9x9 board. (Not
|
||||
available for larger boards.) It makes quite a strong
|
||||
engine. Here are the command line options.
|
||||
|
||||
@itemize
|
||||
@item @option{--monte-carlo}
|
||||
@quotation
|
||||
Use Monte Carlo move generation (9x9 or smaller).
|
||||
@end quotation
|
||||
@item @option{--mc-games-per-level <number>}
|
||||
@quotation
|
||||
Number of Monte Carlo simulations per level. Default 8000.
|
||||
Thus at level 10, GNU Go simulates 80,000 games in order
|
||||
to generate a move.
|
||||
@end quotation
|
||||
@item @option{--mc-list-patterns}
|
||||
@quotation
|
||||
list names of builtin Monte Carlo patterns
|
||||
@end quotation
|
||||
@item @option{--mc-patterns <name>}
|
||||
@quotation
|
||||
Choose a built in Monte Carlo pattern database. The
|
||||
argument can be @file{mc_mogo_classic}, @file{mc_montegnu_classic}
|
||||
or @file{mc_uniform}.
|
||||
@end quotation
|
||||
@item @option{--mc-load-patterns <filename>}
|
||||
@quotation
|
||||
read Monte Carlo patterns from file
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@subsection Other general options
|
||||
@itemize
|
||||
@item @option{-M}, @option{--cache-size @var{megs}}
|
||||
@quotation
|
||||
@cindex cache-size
|
||||
@cindex cache
|
||||
Memory in megabytes used for caching of read results. The default size
|
||||
is 8 unless you configure gnugo with the command @command{configure
|
||||
--enable-cache-size=@var{size}} before compiling to make @var{size} the
|
||||
default (@pxref{Installation}). GNU Go stores results of its reading
|
||||
calculations in a hash table (@pxref{Hashing}). If the hash table is
|
||||
filled, it is emptied and the reading continues, but some reading may
|
||||
have to be repeated that was done earlier, so a larger cache size will
|
||||
make GNU Go run faster, provided the cache is not so large that swapping
|
||||
occurs. Swapping may be detected on GNU/Linux machines using the program
|
||||
@command{top}. However, if you have ample memory or if performance seems
|
||||
to be a problem you may want to increase the size of the cache using
|
||||
this option.
|
||||
@end quotation
|
||||
@item @option{--chinese-rules}
|
||||
@quotation
|
||||
Use Chinese rules. This means that the Chinese or Area Counting is
|
||||
followed. It may affect the score of the game by one point in even
|
||||
games, more if there is a handicap (since in Chinese Counting the
|
||||
handicap stones count for Black) or if either player passes during the
|
||||
game.
|
||||
@end quotation
|
||||
@item @option{--japanese-rules}
|
||||
@quotation
|
||||
Use Japanese Rules. This is the default unless you specify
|
||||
@option{--enable-chinese-rules} as a configure option.
|
||||
@end quotation
|
||||
@item @option{--play-out-aftermath}
|
||||
@item @option{--capture-all-dead}
|
||||
@quotation
|
||||
These options cause GNU Go to play out moves that are usually left
|
||||
unplayed after the end of the game. Such moves lose points under
|
||||
Japanese rules but not Chinese rules. With
|
||||
@option{--play-out-aftermath}, GNU Go may play inside its
|
||||
territory in order to reach a position where it considers every
|
||||
group demonstrably alive or dead. The option
|
||||
@option{--capture-all-dead} causes GNU Go to play inside its own
|
||||
territory to remove dead stones.
|
||||
@end quotation
|
||||
@item @option{--forbid-suicide}
|
||||
@quotation
|
||||
Do not allow suicide moves (playing a stone so that it ends up without
|
||||
liberties and is therefore immediately removed). This is the default.
|
||||
@end quotation
|
||||
@item @option{--allow-suicide}
|
||||
@quotation
|
||||
Allow suicide moves, except single-stone suicide. The latter would not
|
||||
change the board at all and pass should be used instead.
|
||||
@end quotation
|
||||
@item @option{--allow-all-suicide}
|
||||
@quotation
|
||||
Allow suicide moves, including single-stone suicide. This is only
|
||||
interesting in exceptional cases. Normally the
|
||||
@option{--allow-suicide} option should be used instead.
|
||||
@end quotation
|
||||
@item @option{--simple-ko}
|
||||
@quotation
|
||||
Do not allow an immediate recapture of a ko so that the previous
|
||||
position is recreated. Repetition of earlier positions than that are
|
||||
allowed. This is default.
|
||||
@end quotation
|
||||
@item @option{--no-ko}
|
||||
@quotation
|
||||
Allow all kinds of board repetition.
|
||||
@end quotation
|
||||
@item @option{--positional-superko}
|
||||
@quotation
|
||||
Forbid repetition of any earlier board position. This only applies to
|
||||
moves on the board; passing is always allowed.
|
||||
@end quotation
|
||||
@item @option{--situational-superko}
|
||||
@quotation
|
||||
Forbid repetition of any earlier board position with the same player
|
||||
to move. This only applies to moves on the board; passing is always
|
||||
allowed.
|
||||
@end quotation
|
||||
@item @option{--copyright}: Display the copyright notice
|
||||
@item @option{--version} or @option{-v}: Print the version number
|
||||
@item @option{--printsgf @var{filename}}:
|
||||
@quotation
|
||||
Create an SGF file containing a diagram of the board. Useful with
|
||||
@option{-l} and @option{-L} to create a diagram of the board from
|
||||
another sgf file. Illegal moves are indicated with the private
|
||||
@code{IL} property. This property is not used in the FF4 SGF
|
||||
specification, so we are free to preempt it.
|
||||
@end quotation
|
||||
@item @option{--options}
|
||||
@quotation
|
||||
Print which experimental configure options were compiled into the program
|
||||
(@pxref{Other Options}).
|
||||
@end quotation
|
||||
@item @option{--orientation @var{n}}
|
||||
@quotation
|
||||
Combine with @option{-l}. The Go board can be oriented in 8 different
|
||||
ways, counting reflections and rotations of the position; this option
|
||||
selects an orientation (default 0). The parameter @samp{n} is an integer
|
||||
between 0 and 7.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@subsection Other options affecting strength and speed
|
||||
|
||||
@itemize @bullet
|
||||
@item @option{--level @var{amount}}
|
||||
@cindex level
|
||||
@quotation
|
||||
The higher the level, the deeper GNU Go reads. Level 10 is the default.
|
||||
If GNU Go plays too slowly on your machine, you may want to decrease it.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
This single parameter @option{--level} is the best way of
|
||||
choosing whether to play stronger or faster. It controls
|
||||
a host of other parameters which may themselves be set
|
||||
individually at the command line. The default values of
|
||||
these parameters may be found by running @command{gnugo --help}.
|
||||
|
||||
Unless you are working on the program you probably don't
|
||||
need the remaining options in this category. Instead,
|
||||
just adjust the single variable @option{--level}. The
|
||||
following options are of use to developers tuning the
|
||||
program for performance and accuracy. For completeness,
|
||||
here they are.
|
||||
|
||||
@itemize @bullet
|
||||
@item @option{-D}, @option{--depth @var{depth}}
|
||||
@cindex depth
|
||||
@quotation
|
||||
Deep reading cutoff. When reading beyond this depth (default 16) GNU
|
||||
Go assumes that any string which can obtain 3 liberties is alive. Thus
|
||||
GNU Go can read ladders to an arbitrary depth, but will miss other
|
||||
types of capturing moves.
|
||||
@end quotation
|
||||
@item @option{-B}, @option{--backfill-depth @var{depth}}
|
||||
@quotation
|
||||
Deep reading cutoff. Beyond this depth (default 12) GNU Go will no
|
||||
longer try backfilling moves in its reading.
|
||||
@end quotation
|
||||
@item @option{--backfill2-depth @var{depth}}
|
||||
@quotation
|
||||
Another depth controlling how deeply GNU Go looks for backfilling
|
||||
moves. The moves tried below @code{backfill2_depth} are generally more obscure
|
||||
and time intensive than those controlled by @code{backfill_depth}, so this
|
||||
parameter has a lower default.
|
||||
@end quotation
|
||||
@item @option{-F}, @option{--fourlib-depth @var{depth}}
|
||||
@quotation
|
||||
Deep reading cutoff. When reading beyond this depth (default 7) GNU
|
||||
Go assumes that any string which can obtain 4 liberties is alive.
|
||||
@end quotation
|
||||
@item @option{-K}, @option{--ko-depth @var{depth}}
|
||||
@quotation
|
||||
Deep reading cutoff. Beyond this depth (default 8) GNU Go no longer
|
||||
tries very hard to analyze kos.
|
||||
@end quotation
|
||||
@item @option{--branch-depth @var{depth}}
|
||||
@quotation
|
||||
This sets the @code{branch_depth}, typically a little below the
|
||||
@code{depth}. Between @code{branch_depth} and @code{depth},
|
||||
attacks on strings with 3 liberties are considered but branching
|
||||
is inhibited, so fewer variations are considered. Below this
|
||||
depth (default 13), GNU Go still tries to attack strings with only
|
||||
3 liberties, but only tries one move at each node.
|
||||
@end quotation
|
||||
@item @option{--break-chain-depth @var{depth}}
|
||||
@quotation
|
||||
Set the @code{break_chain_depth}. Beyond this depth, GNU Go abandons
|
||||
some attempts to defend groups by trying to capture part of the surrounding
|
||||
chain.
|
||||
@end quotation
|
||||
@item @option{--aa-depth @var{depth}}
|
||||
@quotation
|
||||
The reading function @code{atari_atari} looks for combinations beginning
|
||||
with a series of ataris, and culminating with some string having an
|
||||
unexpected change in status (e.g. alive to dead or critical). This
|
||||
command line optio sets the parameter @code{aa_depth} which determines
|
||||
how deeply this function looks for combinations.
|
||||
@end quotation
|
||||
@item @option{--superstring-depth}
|
||||
@quotation
|
||||
A superstring (@pxref{Superstrings}) is an amalgamation of
|
||||
tightly strings. Sometimes the best way to attack or defend a
|
||||
string is by attacking or defending an element of the superstring.
|
||||
Such tactics are tried below @code{superstring_depth} and this
|
||||
command line option allows this parameter to be set.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
The preceeding options are documented with the reading code
|
||||
(@pxref{Reading Basics}).
|
||||
|
||||
@itemize @bullet
|
||||
@item @option{--owl-branch} Below this depth Owl only considers
|
||||
one move. Default 8.
|
||||
@item @option{--owl-reading} Below this depth Owl assumes the
|
||||
dragon has escaped. Default 20.
|
||||
@item @option{--owl-node-limit}
|
||||
@quotation
|
||||
If the number of variations exceeds this limit, Owl assumes the dragon can
|
||||
make life. Default 1000. We caution the user that increasing
|
||||
@code{owl_node_limit} does not necessarily increase the strength of the
|
||||
program.
|
||||
@end quotation
|
||||
@item @option{--owl-node-limit @var{n}}
|
||||
@quotation
|
||||
If the number of variations exceeds this limit, Owl assumes the dragon can
|
||||
make life. Default 1000. We caution the user that increasing
|
||||
@code{owl_node_limit} does not necessarily increase the strength of the
|
||||
program.
|
||||
@end quotation
|
||||
@item @option{--owl-distrust @var{n}}
|
||||
@quotation
|
||||
Below this limit some owl reading is truncated.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@subsection Ascii mode options
|
||||
@cindex ascii mode
|
||||
|
||||
@itemize
|
||||
@item @option{--color @var{color}}
|
||||
@quotation
|
||||
Choose your color ('black' or 'white').
|
||||
@end quotation
|
||||
@item @option{--handicap @var{number}}
|
||||
@quotation
|
||||
Choose the number of handicap stones (0--9)
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
For more information about the following clock options see @xref{Ascii}.
|
||||
|
||||
@itemize
|
||||
@item @option{--clock @var{seconds}}
|
||||
@quotation
|
||||
Initialize the timer.
|
||||
@end quotation
|
||||
@item @option{--byo-time @var{seconds}}
|
||||
@quotation
|
||||
Number of seconds per (Canadian) byo-yomi period
|
||||
@end quotation
|
||||
@item @option{--byo-period @var{stones}}
|
||||
@quotation
|
||||
Number of stones per (Canadian) byo-yomi period
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@subsection Development options
|
||||
|
||||
@itemize
|
||||
@item @option{--replay @var{color}}
|
||||
@quotation
|
||||
Replay all moves in a game for either or both colors. If used with the
|
||||
@option{-o} option the game record is annotated with move values. This
|
||||
option requires @option{-l @var{filename}}. The color can be:
|
||||
@itemize
|
||||
@item white: replay white moves only
|
||||
@item black: replay black moves only
|
||||
@item both: replay all moves
|
||||
@end itemize
|
||||
When the move found by genmove differs from the move in the sgf
|
||||
file the values of both moves are reported thus:
|
||||
|
||||
@example
|
||||
Move 13 (white): GNU Go plays C6 (20.60) - Game move F4 (20.60)
|
||||
@end example
|
||||
|
||||
This option is useful if one wants to confirm that a change such as a
|
||||
speedup or other optimization has not affected the behavior of the
|
||||
engine. Note that when several moves have the same top value (or
|
||||
nearly equal) the move generated is not deterministic (though it can be
|
||||
made deterministic by starting with the same random seed). Thus a few
|
||||
deviations from the move in the sgf file are to be expected. Only if the
|
||||
two reported values differ should we conclude that the engine plays
|
||||
differently from the engine which generated the sgf file.
|
||||
@xref{Regression}.
|
||||
@end quotation
|
||||
@item @option{-a}, @option{--allpats}
|
||||
@quotation
|
||||
Test all patterns, even those smaller in value than the largest move
|
||||
found so far. This should never affect GNU Go's final move, and it
|
||||
will make it run slower. However this can be very useful when "tuning"
|
||||
GNU Go. It causes both the traces and the output file (@option{-o}) to
|
||||
be more informative.
|
||||
@end quotation
|
||||
@item @option{-T}, @option{--printboard}: colored display of dragons.
|
||||
@quotation
|
||||
Use rxvt, xterm or Linux Console. (@pxref{Colored Display})
|
||||
@end quotation
|
||||
@item @option{--showtime}
|
||||
@quotation
|
||||
Print timing information to stderr.
|
||||
@end quotation
|
||||
@item @option{-E}, @option{--printeyes}: colored display of eye spaces
|
||||
@quotation
|
||||
Use rxvt, xterm or Linux Console. (@pxref{Colored Display})
|
||||
@end quotation
|
||||
@item @option{-d}, @option{--debug @var{level}}
|
||||
@quotation
|
||||
Produce debugging output. The debug level is given in hexadecimal, using the
|
||||
bits defined in the following table from @file{engine/gnugo.h}. A list of
|
||||
these may be produced using @option{--debug-flags}. Here they are in
|
||||
hexadecimal:
|
||||
|
||||
@cindex debugging options
|
||||
@example
|
||||
DEBUG_INFLUENCE 0x0001
|
||||
DEBUG_EYES 0x0002
|
||||
DEBUG_OWL 0x0004
|
||||
DEBUG_ESCAPE 0x0008
|
||||
DEBUG_MATCHER 0x0010
|
||||
DEBUG_DRAGONS 0x0020
|
||||
DEBUG_SEMEAI 0x0040
|
||||
DEBUG_LOADSGF 0x0080
|
||||
DEBUG_HELPER 0x0100
|
||||
DEBUG_READING 0x0200
|
||||
DEBUG_WORMS 0x0400
|
||||
DEBUG_MOVE_REASONS 0x0800
|
||||
DEBUG_OWL_PERFORMANCE 0x1000
|
||||
DEBUG_LIFE 0x2000
|
||||
DEBUG_FILLLIB 0x4000
|
||||
DEBUG_READING_PERFORMANCE 0x8000
|
||||
DEBUG_SCORING 0x010000
|
||||
DEBUG_AFTERMATH 0x020000
|
||||
DEBUG_ATARI_ATARI 0x040000
|
||||
DEBUG_READING_CACHE 0x080000
|
||||
DEBUG_TERRITORY 0x100000
|
||||
DEBUG_OWL_PERSISTENT_CACHE 0X200000
|
||||
DEBUG_TOP_MOVES 0x400000
|
||||
DEBUG_MISCELLANEOUS 0x800000
|
||||
DEBUG_ORACLE_STREAM 0x1000000
|
||||
@end example
|
||||
|
||||
These debug flags are additive. If you want to turn on both
|
||||
dragon and worm debugging you can use @option{-d0x420}.
|
||||
@end quotation
|
||||
@item @option{--debug-flags}
|
||||
@quotation
|
||||
Print the list of debug flags
|
||||
@end quotation
|
||||
@item @option{-w}, @option{--worms}
|
||||
@quotation
|
||||
Print more information about worm data.
|
||||
@end quotation
|
||||
@item @option{-m}, @option{--moyo @var{level}}
|
||||
@quotation
|
||||
moyo debugging, show moyo board. The @var{level} is fully
|
||||
documented elsewhere (@pxref{Influential Display}).
|
||||
@end quotation
|
||||
@item @option{-b}, @option{--benchmark @var{number}}
|
||||
@quotation
|
||||
benchmarking mode - can be used with @option{-l}. Causes GNU Go to play itself
|
||||
repeatedly, seeding the start of the game with a few random moves. This method
|
||||
of testing the program is largely superceded by use of the @command{twogtp}
|
||||
program.
|
||||
@end quotation
|
||||
@item @option{-S}, @option{--statistics}
|
||||
@quotation
|
||||
Print statistics (for debugging purposes).
|
||||
@end quotation
|
||||
@item @option{-t}, @option{--trace}
|
||||
@quotation
|
||||
Print debugging information. Use twice for more detail.
|
||||
@end quotation
|
||||
@item @option{-r}, @option{--seed @var{seed}}
|
||||
@quotation
|
||||
Set random number seed. This can be used to guarantee that GNU Go will make
|
||||
the same decisions on multiple runs through the same game. If @code{seed} is
|
||||
zero, GNU Go will play a different game each time.
|
||||
@end quotation
|
||||
@item @option{--decide-string @var{location}}
|
||||
@quotation
|
||||
Invoke the tactical reading code (@pxref{Tactical Reading} to decide
|
||||
whether the string at @var{location} can be captured, and if so, whether it
|
||||
can be defended. If used with @option{-o}, this will produce a variation tree
|
||||
in SGF.
|
||||
@end quotation
|
||||
@item @option{--decide-owl @var{location}}
|
||||
@quotation
|
||||
Invoke the owl code (@pxref{The Owl Code}) to decide whether the dragon at
|
||||
@var{location} can be captured, and whether it can be defended. If used with
|
||||
@option{-o}, this will produce a variation tree in SGF.
|
||||
@end quotation
|
||||
@item @option{--decide-connection @var{location1}/@var{location2}}
|
||||
@quotation
|
||||
Decide whether dragons at @var{location1} and @var{location2} can be connected.
|
||||
Useful in connection with @option{-o} to write the variations to an SGF file.
|
||||
@end quotation
|
||||
@item @option{--decide-dragon-data @var{location}}
|
||||
@quotation
|
||||
Print complete information about the status of the dragon at @var{location}.
|
||||
@end quotation
|
||||
@item @option{--decide-semeai @var{location1}/@var{location2}}
|
||||
@quotation
|
||||
At @var{location1} and @var{location2} are adjacent dragons of the
|
||||
opposite color. Neither is aliveby itself, and their fate (alive,
|
||||
dead or seki) depends on the outcome of a semeai (capturing race).
|
||||
Decide what happens. Useful in connection with @option{-o} to
|
||||
write the variations to an SGF file.
|
||||
@end quotation
|
||||
@item @option{--decide-tactical-semeai @var{location1}/@var{location2}}
|
||||
@quotation
|
||||
Similar to @option{--decide-semeai}, except that moves proposed by the
|
||||
owl code are not considered.
|
||||
@end quotation
|
||||
@item @option{--decide-position}
|
||||
@quotation
|
||||
Try to attack and defend every dragon with dragon.escape<6. If
|
||||
used with @option{-o}, writes the variations to an sgf file.
|
||||
@end quotation
|
||||
@item @option{--decide-eye @var{location}}
|
||||
@quotation
|
||||
Evaluates the eyespace at @var{location} and prints a report. You can get
|
||||
more information by adding @option{-d0x02} to the command line.
|
||||
(@pxref{Eye Local Game Values}.)
|
||||
@end quotation
|
||||
@item @option{--decide-surrounded @var{location}}
|
||||
@quotation
|
||||
A dragon is @emph{surrounded} if it is contained in the convex hull of
|
||||
its unfriendly neighbor dragons. This does not mean that it cannot escape,
|
||||
but it is often a good indicator that the dragon is under attack. This
|
||||
option draws the convex hull of the neighbor dragons and decides whether
|
||||
the dragon at @var{location} is surrounded.
|
||||
@end quotation
|
||||
@item @option{--decide-combination}
|
||||
@quotation
|
||||
Calls the function @code{atari_atari} to decide whether there
|
||||
exist combinations on the board.
|
||||
@end quotation
|
||||
@item @option{--score @var{method}}
|
||||
@quotation
|
||||
Requires @option{-l} to specify which game to score and @option{-L} if
|
||||
you want to score anywhere else than at the end of the game record.
|
||||
@var{method} can be "estimate", "finish", or "aftermath". "finish" and
|
||||
"aftermath" are appropriate when the game is complete, or nearly so, and
|
||||
both try to supply an accurate final score. Notice that if the game is
|
||||
not already finished it will be played out, which may take quite a long
|
||||
time if the game is far from complete. The "estimate" method may be used
|
||||
to get a quick estimate during the middle of the game. Any of these
|
||||
options may be combined with @option{--chinese-rules} if you want to use
|
||||
Chinese (Area) counting.
|
||||
|
||||
If the option @option{-o @var{outputfilename}} is provided, the result
|
||||
will also be written as a comment in the output file. For the "finish"
|
||||
and "aftermath" scoring algorithms, the selfplayed moves completing the
|
||||
game are also stored.
|
||||
|
||||
@itemize
|
||||
@item finish
|
||||
@quotation
|
||||
Finish the game by selfplaying until two passes, then determine the
|
||||
status of all stones and compute territory.
|
||||
@end quotation
|
||||
@item aftermath
|
||||
@quotation
|
||||
Finish the game by selfplaying until two passes, then accurately
|
||||
determine status of all stones by playing out the "aftermath", i.e.
|
||||
playing on until all stones except ones involved in seki have become
|
||||
either unconditionally (in the strongest sense) alive or unconditionally
|
||||
dead (or captured). Slower than @option{--score finish}, and while these
|
||||
algorithms usually agree, if they differ, @option{--score aftermath} is
|
||||
most likely to be correct.
|
||||
@end quotation
|
||||
@end itemize
|
||||
@end quotation
|
||||
@item @code{--score aftermath --capture-all-dead --chinese-rules}
|
||||
@quotation
|
||||
This combination mandates @strong{Tromp-Taylor} scoring. The
|
||||
Tromp-Taylor ruleset requires the game to be played out until
|
||||
all dead stones are removed, then uses area (Chinese) scoring.
|
||||
The option @option{--capture-all-dead} requires the aftermath
|
||||
code to finish capturing all dead stones.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@subsection Experimental options
|
||||
|
||||
Most of these are available as configure options and are
|
||||
described in @ref{Other Options}.
|
||||
|
||||
@itemize @bullet
|
||||
@item @option{--options}
|
||||
@quotation
|
||||
Print which experimental configure options were compiled into the program.
|
||||
@end quotation
|
||||
@item @option{--with-break-in}
|
||||
@item @option{--without-break-in}
|
||||
@quotation
|
||||
Use or do not use the experimental break-in code. This option
|
||||
has no effect at level 9 or below. The break in code is enabled
|
||||
by default at level 10, and the only difference between levels
|
||||
9 and level 10 is that the break in code is disabled at level 9.
|
||||
@end quotation
|
||||
@item @option{--cosmic-gnugo}
|
||||
@quotation
|
||||
Use center oriented influence.
|
||||
@end quotation
|
||||
@item @option{--nofusekidb}
|
||||
@quotation
|
||||
Turn off the fuseki database.
|
||||
@end quotation
|
||||
@item @option{--nofuseki}
|
||||
@quotation
|
||||
Turn off fuseki moves entirely
|
||||
@end quotation
|
||||
@item @option{--nojosekidb}
|
||||
@quotation
|
||||
Turn off the joseki database.
|
||||
@end quotation
|
||||
@item @option{--mirror}
|
||||
@quotation
|
||||
Try to play mirror go.
|
||||
@end quotation
|
||||
@item @option{--mirror-limit @var{n}}
|
||||
@quotation
|
||||
Stop mirroring when @var{n} stones are on the board.
|
||||
@end quotation
|
||||
@end itemize
|
873
gnugo/doc/utils.texi
Normal file
|
@ -0,0 +1,873 @@
|
|||
In this Chapter, we document some of the utilities which may be
|
||||
called from the GNU Go engine.
|
||||
|
||||
@menu
|
||||
* General Utilities:: Utilities from @file{engine/utils.c}
|
||||
* Print Utilities:: Utilities from @file{engine/printutils.c}
|
||||
* Board Utilities:: Utilities from @file{engine/board.c}
|
||||
* Influence Utilities:: Utilities from @file{engine/influence.c}
|
||||
@end menu
|
||||
|
||||
@node General Utilities
|
||||
@section General Utilities
|
||||
|
||||
Utility functions from @file{engine/utils.c}. Many of these
|
||||
functions underlie autohelper functions (@pxref{Autohelper Functions}).
|
||||
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{void change_dragon_status(int dr, int status)}
|
||||
@findex change_dragon_status
|
||||
@quotation
|
||||
Change the status of all the stones in the dragon at @code{dr}.
|
||||
@end quotation
|
||||
@item @code{int defend_against(int move, int color, int apos)}
|
||||
@findex defend_against
|
||||
@quotation
|
||||
Check whether a move at @code{move} stops the enemy from playing at (apos).
|
||||
@end quotation
|
||||
@item @code{int cut_possible(int pos, int color)}
|
||||
@quotation
|
||||
Returns true if @code{color} can cut at @code{pos}, or if connection through
|
||||
@code{pos} is inhibited. This information is collected by @code{find_cuts()},
|
||||
using the B patterns in the connections database.
|
||||
@end quotation
|
||||
@item @code{int does_attack(int move, int str)}
|
||||
@findex does_attack
|
||||
@quotation
|
||||
returns true if the move at @code{move} attacks @code{str}. This means that it captures
|
||||
the string, and that @code{str} is not already dead.
|
||||
@end quotation
|
||||
@item @code{int does_defend(int move, int str)}
|
||||
@findex does_defend
|
||||
@quotation
|
||||
@code{does_defend(move, str)} returns true if the move at @code{move}
|
||||
defends @code{str}. This means that it defends the string, and that
|
||||
@code{str} can be captured if no defense is made.
|
||||
@end quotation
|
||||
@item @code{int somewhere(int color, int last_move, ...)}
|
||||
@findex somewhere
|
||||
@quotation
|
||||
Example: @code{somewhere(WHITE, 2, apos, bpos, cpos)}.
|
||||
Returns true if one of the vertices listed satisfies
|
||||
@code{board[pos]==color}. Here num_moves is the number of moves minus one.
|
||||
If the check is true the dragon is not allowed to be dead. This
|
||||
check is only valid if @code{stackp==0}.
|
||||
@end quotation
|
||||
@item @code{int visible_along_edge(int color, int apos, int bpos)}
|
||||
@quotation
|
||||
Search along the edge for the first visible stone. Start at apos
|
||||
and move in the direction of bpos. Return 1 if the first visible
|
||||
stone is of the given color. It is required that apos and bpos are
|
||||
at the same distance from the edge.
|
||||
@end quotation
|
||||
@item @code{int test_symmetry_after_move(int move, int color, int strict)}
|
||||
@findex test_symmetry_after_move
|
||||
@quotation
|
||||
Is the board symmetric (or rather antisymmetric) with respect to
|
||||
mirroring in tengen after a specific move has been played? If the
|
||||
move is PASS_MOVE, check the current board.
|
||||
If strict is set we require that each stone is matched by a stone
|
||||
of the opposite color at the mirrored vertex. Otherwise we only
|
||||
require that each stone is matched by a stone of either color.
|
||||
@end quotation
|
||||
@item @code{int play_break_through_n(int color, int num_moves, ...)}
|
||||
@findex play_break_through_n
|
||||
@quotation
|
||||
The function @code{play_break_through_n()} plays a sequence of moves,
|
||||
alternating between the players and starting with color. After
|
||||
having played through the sequence, the three last coordinate pairs
|
||||
gives a position to be analyzed by @code{break_through()}, to see whether
|
||||
either color has managed to enclose some stones and/or connected
|
||||
his own stones. If any of the three last positions is empty, it's
|
||||
assumed that the enclosure has failed, as well as the attempt to
|
||||
connect. If one or more of the moves to play turns out to be illegal for
|
||||
some reason, the rest of the sequence is played anyway, and
|
||||
@code{break_through()} is called as if nothing special happened.
|
||||
Like @code{break_through()}, this function returns 1 if the attempt to
|
||||
break through was succesful and 2 if it only managed to cut
|
||||
through.
|
||||
@end quotation
|
||||
@item @code{int play_attack_defend_n(int color, int do_attack, int num_moves, ...)}
|
||||
@item @code{int play_attack_defend2_n(int color, int do_attack, int num_moves, ...)}
|
||||
@findex play_attack_defend2_n
|
||||
@findex play_attack_defend_n
|
||||
@quotation
|
||||
The function @code{play_attack_defend_n()} plays a sequence of moves,
|
||||
alternating between the players and starting with @code{color}. After
|
||||
having played through the sequence, the last coordinate pair gives
|
||||
a target to attack or defend, depending on the value of do_attack.
|
||||
If there is no stone present to attack or defend, it is assumed
|
||||
that it has already been captured. If one or more of the moves to
|
||||
play turns out to be illegal for some reason, the rest of the
|
||||
sequence is played anyway, and attack/defense is tested as if
|
||||
nothing special happened. Conversely,
|
||||
@code{play_attack_defend2_n()} plays a sequence of moves,
|
||||
alternating between the players and starting with @code{color}. After
|
||||
having played through the sequence, the two last coordinate pairs
|
||||
give two targets to simultaneously attack or defend, depending on
|
||||
the value of do_attack. If there is no stone present to attack or
|
||||
defend, it is assumed that it has already been captured. If one or
|
||||
more of the moves to play turns out to be illegal for some reason,
|
||||
the rest of the sequence is played anyway, and attack/defense is
|
||||
tested as if nothing special happened. A typical use of these functions is to
|
||||
set up a ladder in an autohelper and see whether it works or not.
|
||||
@end quotation
|
||||
@item @code{int play_connect_n(int color, int do_connect, int num_moves, ...)}
|
||||
@findex play_connect_n
|
||||
@quotation
|
||||
Plays a sequence of moves, alternating between the players and starting
|
||||
with @code{color}. After having played through the sequence, the two last
|
||||
coordinates give two targets that should be connected or disconnected,
|
||||
depending on the value of do_connect. If there is no stone present to
|
||||
connect or disconnect, it is assumed that the connection has failed. If
|
||||
one or more of the moves to play turns out to be illegal for some
|
||||
reason, the rest of the sequence is played anyway, and
|
||||
connection/disconnection is tested as if nothing special happened.
|
||||
Ultimately the connection is decided by the functions
|
||||
@code{string_connect} and @code{disconnect} (@pxref{Connection Reading}).
|
||||
@end quotation
|
||||
@item @code{void set_depth_values(int level)}
|
||||
@findex set_depth_values
|
||||
@quotation
|
||||
It is assumed in reading a ladder if @code{stackp >= depth} that
|
||||
as soon as a bounding stone is in atari, the string is safe.
|
||||
Similar uses are made of the other depth parameters such
|
||||
as @code{backfill_depth} and so forth. In short, simplifying
|
||||
assumptions are made when @code{stackp} is large. Unfortunately any such
|
||||
scheme invites the ``horizon effect,'' in which a stalling move is perceived
|
||||
as a win, by pushing the refutation past the ``horizon''---the value of
|
||||
@code{stackp} in which the reading assumptions are relaxed. To avoid the depth
|
||||
it is sometimes necessary to increase the depth parameters. This
|
||||
function can be used to set the various reading depth parameters. If
|
||||
@code{mandated_depth_value} is not -1 that value is used; otherwise the depth
|
||||
values are set as a function of level. The parameter
|
||||
@code{mandated_depth_value} can be set at the command line to force a
|
||||
particular value of depth; normally it is -1.
|
||||
@end quotation
|
||||
@item @code{void modify_depth_values(int n)}
|
||||
@findex modify_depth_values
|
||||
@quotation
|
||||
Modify the various tactical reading depth parameters. This is
|
||||
typically used to avoid horizon effects. By temporarily increasing
|
||||
the depth values when trying some move, one can avoid that an
|
||||
irrelevant move seems effective just because the reading hits a
|
||||
depth limit earlier than it did when reading only on relevant
|
||||
moves.
|
||||
@end quotation
|
||||
@item @code{void increase_depth_values(void)}
|
||||
@findex increase_depth_values
|
||||
@quotation
|
||||
@code{modify_depth_values(1)}.
|
||||
@end quotation
|
||||
@item @code{void decrease_depth_values(void)}
|
||||
@findex decrease_depth_values
|
||||
@quotation
|
||||
@code{modify_depth_values(-1)}.
|
||||
@end quotation
|
||||
@item @code{void restore_depth_values()}
|
||||
@findex restore_depth_values
|
||||
@quotation
|
||||
Sets @code{depth} and so forth to their saved values.
|
||||
@end quotation
|
||||
@item @code{void set_temporary_depth_values(int d, int b, int b2, int bc, int ss, int br, int f, int k)}
|
||||
@quotation
|
||||
Explicitly set the depth values. This function is currently never
|
||||
called.
|
||||
@end quotation
|
||||
@item @code{int confirm_safety(int move, int color, int *defense_point, char safe_stones[BOARDMAX])}
|
||||
@findex confirm_safety
|
||||
@quotation
|
||||
Check that the move at color doesn't involve any kind of blunder,
|
||||
regardless of size.
|
||||
@end quotation
|
||||
@item @code{float blunder_size(int move, int color, int *defense_point, char safe_stones[BOARDMAX])}
|
||||
@findex blunder_size
|
||||
@quotation
|
||||
This function will detect some blunders. If the move reduces the number of
|
||||
liberties of an adjacent friendly string, there is a danger that the move
|
||||
could backfire, so the function checks that no friendly worm which was
|
||||
formerly not attackable becomes attackable, and it checks that no opposing
|
||||
worm which was not defendable becomes defendable. It returns the estimated
|
||||
size of the blunder, or 0.0 if nothing bad has happened. The array
|
||||
@code{safe_stones[]} contains the stones that are supposedly safe after
|
||||
@code{move}. It may be @code{NULL}. For use when called from
|
||||
@code{fill_liberty()}, this function may optionally return a point of defense,
|
||||
which, if taken, will presumably make the move at @code{move} safe on a
|
||||
subsequent turn.
|
||||
@end quotation
|
||||
@item @code{int double_atari(int move, int color, float *value, char safe_stones[BOARDMAX])}
|
||||
@findex double_atari
|
||||
@quotation
|
||||
Returns true if a move by (color) fits the following shape:
|
||||
@example
|
||||
X* (O=color)
|
||||
OX
|
||||
@end example
|
||||
capturing one of the two @samp{X} strings. The name is a slight misnomer since
|
||||
this includes attacks which are not necessarily double ataris, though the
|
||||
common double atari is the most important special case. If @code{safe_stones
|
||||
!= NULL}, then only attacks on stones marked as safe are tried. The value of
|
||||
the double atari attack is returned in value (unless value is @code{NULL}),
|
||||
and the attacked stones are marked unsafe.
|
||||
@end quotation
|
||||
@item @code{void unconditional_life(int unconditional_territory[BOARDMAX], int color)}
|
||||
@findex unconditional_life
|
||||
@quotation
|
||||
Find those worms of the given color that can never be captured, even if the
|
||||
opponent is allowed an arbitrary number of consecutive moves. The coordinates
|
||||
of the origins of these worms are written to the worm arrays and the number of
|
||||
non-capturable worms is returned. The algorithm is to cycle through the worms
|
||||
until none remains or no more can be captured. A worm is removed when it is
|
||||
found to be capturable, by letting the opponent try to play on all its
|
||||
liberties. If the attack fails, the moves are undone. When no more worm can be
|
||||
removed in this way, the remaining ones are unconditionally alive. After
|
||||
this, unconditionally dead opponent worms and unconditional territory are
|
||||
identified. To find these, we continue from the position obtained at the end
|
||||
of the previous operation (only unconditionally alive strings remain for
|
||||
color) with the following steps:
|
||||
|
||||
@enumerate
|
||||
@item Play opponent stones on all liberties of the unconditionally
|
||||
alive strings except where illegal. (That the move order may
|
||||
determine exactly which liberties can be played legally is not
|
||||
important. Just pick an arbitrary order).
|
||||
@item
|
||||
Recursively extend opponent strings in atari, except where this
|
||||
would be suicide.
|
||||
@item
|
||||
Play an opponent stone anywhere it can get two empty
|
||||
neighbors. (I.e. split big eyes into small ones).
|
||||
@item
|
||||
an opponent stone anywhere it can get one empty
|
||||
neighbor. (I.e. reduce two space eyes to one space eyes.)
|
||||
Remaining opponent strings in atari and remaining liberties of the
|
||||
unconditionally alive strings constitute the unconditional
|
||||
territory.
|
||||
Opponent strings from the initial position placed on
|
||||
unconditional territory are unconditionally dead.
|
||||
On return, @code{unconditional_territory[][]} is 1 where color has
|
||||
unconditionally alive stones, 2 where it has unconditional
|
||||
territory, and 0 otherwise.
|
||||
@end enumerate
|
||||
@end quotation
|
||||
@item @code{void who_wins(int color, FILE *outfile)}
|
||||
@quotation
|
||||
Score the game and determine the winner
|
||||
@end quotation
|
||||
@item @code{void find_superstring(int str, int *num_stones, int *stones)}
|
||||
@findex find_superstring
|
||||
@cindex superstring
|
||||
@quotation
|
||||
Find the stones of an extended string, where the extensions are
|
||||
through the following kinds of connections:
|
||||
@enumerate
|
||||
@item Solid connections (just like ordinary string).
|
||||
@example
|
||||
OO
|
||||
@end example
|
||||
@item Diagonal connection or one space jump through an intersection
|
||||
where an opponent move would be suicide or self-atari.
|
||||
@example
|
||||
...
|
||||
O.O
|
||||
XOX
|
||||
X.X
|
||||
@end example
|
||||
@item
|
||||
Bamboo joint.
|
||||
@example
|
||||
OO
|
||||
..
|
||||
OO
|
||||
@end example
|
||||
@item Diagonal connection where both adjacent intersections are empty.
|
||||
@example
|
||||
.O
|
||||
O.
|
||||
@end example
|
||||
@item Connection through adjacent or diagonal tactically captured stones.
|
||||
Connections of this type are omitted when the superstring code is
|
||||
called from reading.c, but included when the superstring code is
|
||||
called from owl.c
|
||||
@end enumerate
|
||||
@end quotation
|
||||
@item @code{void find_superstring_liberties(int str, int *num_libs, int *libs, int liberty_cap)}
|
||||
@findex find_superstring_liberties
|
||||
@quotation
|
||||
This function computes the superstring at @code{str} as described above, but
|
||||
omitting connections of type 5. Then it constructs a list of liberties of the
|
||||
superstring which are not already liberties of @code{str}. If
|
||||
@code{liberty_cap} is nonzero, only liberties of substrings of the superstring
|
||||
which have fewer than @code{liberty_cap} liberties are generated.
|
||||
@end quotation
|
||||
@item @code{void find_proper_superstring_liberties(int str, int *num_libs, int *libs, int liberty_cap)}
|
||||
@findex find_proper_superstring_liberties
|
||||
@quotation
|
||||
This function is the same as find_superstring_liberties, but it omits those
|
||||
liberties of the string @code{str}, presumably since those have already been
|
||||
treated elsewhere. If @code{liberty_cap} is nonzero, only liberties of
|
||||
substrings of the superstring which have at most @code{liberty_cap} liberties
|
||||
are generated.
|
||||
@end quotation
|
||||
@item @code{void find_superstring_stones_and_liberties(int str, int *num_stones, int *stones, int *num_libs, int *libs, int liberty_cap)}
|
||||
@findex find_superstring_stones_and_liberties
|
||||
@quotation
|
||||
This function computes the superstring at @code{str} as described above,
|
||||
but omitting connections of type 5. Then it constructs a list of
|
||||
liberties of the superstring which are not already liberties of
|
||||
@code{str}. If liberty_cap is nonzero, only liberties of substrings of the
|
||||
superstring which have fewer than liberty_cap liberties are
|
||||
generated.
|
||||
@end quotation
|
||||
@item @code{void superstring_chainlinks(int str, int *num_adj, int adjs[MAXCHAIN], int liberty_cap)}
|
||||
@findex superstring_chainlinks
|
||||
@quotation
|
||||
analogous to chainlinks, this function finds boundary chains of the
|
||||
superstring at @code{str}, including those which are boundary chains of
|
||||
@code{str} itself. If @code{liberty_cap != 0}, only those boundary chains with
|
||||
@code{<= liberty_cap} liberties are reported.
|
||||
@end quotation
|
||||
@item @code{void proper_superstring_chainlinks(int str, int *num_adj, int adjs[MAXCHAIN], int liberty_cap)}
|
||||
@findex proper_superstring_chainlingks
|
||||
@quotation
|
||||
analogous to chainlinks, this function finds boundary chains of the
|
||||
superstring at @code{str}, omitting those which are boundary chains of
|
||||
@code{str} itself. If @code{liberty_cap != 0}, only those boundary chains with
|
||||
@code{<= liberty_cap} liberties are reported.
|
||||
@end quotation
|
||||
@item @code{void start_timer(int n)}
|
||||
@findex start_timer
|
||||
@cindex timers
|
||||
@quotation
|
||||
Start a timer. GNU Go has four internal timers available for
|
||||
assessing the time spent on various tasks.
|
||||
@end quotation
|
||||
@item @code{double time_report(int n, const char *occupation, int move, double mintime)}
|
||||
@findex time_report
|
||||
@quotation
|
||||
Report time spent and restart the timer. Make no report if elapsed
|
||||
time is less than mintime.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@node Print Utilities
|
||||
@section Print Utilities
|
||||
@cindex formatted printing
|
||||
|
||||
Functions in @file{engine/printutils.c} do formatted printing similar to
|
||||
@code{printf} and its allies. The following formats are recognized:
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{%c}, @code{%d}, @code{%f}, @code{%s}, @code{%x}
|
||||
@quotation
|
||||
These have their usual meaning in formatted output, printing
|
||||
a character, integer, float, string or hexadecimal, respectively.
|
||||
@end quotation
|
||||
@item @code{%o}
|
||||
@quotation
|
||||
`Outdent.' Normally output is indented by @code{2*stackp} spaces,
|
||||
so that the depth can be seen at a glance in traces. At the
|
||||
beginning of a format, this @code{%o} inhibits the indentation.
|
||||
@end quotation
|
||||
@item @code{%H}
|
||||
@quotation
|
||||
Print a hashvalue.
|
||||
@end quotation
|
||||
@item @code{%C}
|
||||
@quotation
|
||||
Print a color as a string.
|
||||
@end quotation
|
||||
@item @code{%m}, @code{%2m} (synonyms)
|
||||
@quotation
|
||||
Takes 2 integers and writes a move, using the two dimensional
|
||||
board representation (@pxref{The Board Array})
|
||||
@end quotation
|
||||
@item @code{%1m}
|
||||
@quotation
|
||||
Takes 1 integers and writes a move, using the one dimensional
|
||||
board representation (@pxref{The Board Array})
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
We list the non statically declared functions in @file{printutils.c}.
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{void gfprintf(FILE *outfile, const char *fmt, ...)}
|
||||
@findex gfprintf
|
||||
@quotation
|
||||
Formatted output to @file{outfile}.
|
||||
@end quotation
|
||||
@item @code{int gprintf(const char *fmt, ...)}
|
||||
@findex gprintf
|
||||
@quotation
|
||||
Formatted output to stderr. Always returns 1 to allow use in short-circuit
|
||||
logical expressions.
|
||||
@end quotation
|
||||
@item @code{int mprintf(const char *fmt, ...)}
|
||||
@findex mprintf
|
||||
@quotation
|
||||
Formatted output to stdout.
|
||||
@end quotation
|
||||
@item @code{DEBUG(level, fmt, args...)}
|
||||
@findex DEBUG
|
||||
@quotation
|
||||
If @code{level & debug}, do formatted output to stderr. Otherwise, ignore.
|
||||
@end quotation
|
||||
@item @code{void abortgo(const char *file, int line, const char *msg, int pos)}
|
||||
@findex abortgo
|
||||
@quotation
|
||||
Print debugging output in an error situation, then exit.
|
||||
@end quotation
|
||||
@item @code{const char * color_to_string(int color)}
|
||||
@findex color_to_string
|
||||
@quotation
|
||||
Convert a color value to a string
|
||||
@end quotation
|
||||
@item @code{const char * location_to_string(int pos)}
|
||||
@findex location_to_string
|
||||
@quotation
|
||||
Convert a location to a string
|
||||
@end quotation
|
||||
@item @code{void location_to_buffer(int pos, char *buf)}
|
||||
@findex location_to_buffer
|
||||
@quotation
|
||||
Convert a location to a string, writing to a buffer.
|
||||
@end quotation
|
||||
@item @code{int string_to_location(int boardsize, char *str, int *m, int *n)}
|
||||
@findex string_to_location
|
||||
@quotation
|
||||
Get the @code{(m, n)} coordinates in the standard GNU Go coordinate system
|
||||
from the string @code{str}. This means that @samp{m} is the nth row from the
|
||||
top and @samp{n} is the column. Both coordinates are between 0 and
|
||||
@code{boardsize-1}, inclusive. Return 1 if ok, otherwise return 0;
|
||||
@end quotation
|
||||
@item @code{int is_hoshi_point(int m, int n)}
|
||||
@findex is_hoshi_point
|
||||
True if the coordinate is a hoshi point.
|
||||
@item @code{void draw_letter_coordinates(FILE *outfile)}
|
||||
@findex draw_letter_coordinates
|
||||
Print a line with coordinate letters above the board.
|
||||
@item @code{void simple_showboard(FILE *outfile)}
|
||||
@findex simple_showboard
|
||||
@quotation
|
||||
Bare bones version of @code{showboard(0)}. No fancy options, no hint of
|
||||
color, and you can choose where to write it.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
The following functions are in @file{showbord.c}. Not all public
|
||||
functions in that file are listed here.
|
||||
|
||||
@itemize
|
||||
@item @code{void showboard(int xo)}
|
||||
@findex showboard
|
||||
@quotation
|
||||
Show go board.
|
||||
@example
|
||||
xo=0: black and white XO board for ascii game
|
||||
xo=1: colored dragon display
|
||||
xo=2: colored eye display
|
||||
xo=3: colored owl display
|
||||
xo=4: colored matcher status display
|
||||
@end example
|
||||
@end quotation
|
||||
@item @code{const char * status_to_string(int status)}
|
||||
@findex status_to_string
|
||||
@quotation
|
||||
Convert a status value to a string.
|
||||
@end quotation
|
||||
@item @code{const char * safety_to_string(int status)}
|
||||
@findex safety_to_string
|
||||
@quotation
|
||||
Convert a safety value to a string.
|
||||
@end quotation
|
||||
@item @code{const char * result_to_string(int result)}
|
||||
@findex result_to_string
|
||||
@quotation
|
||||
Convert a read result to a string
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@node Board Utilities
|
||||
@section Board Utilities
|
||||
|
||||
The functions documented in this section are from @file{board.c}. Other
|
||||
functions in @file{board.c} are described in @xref{Some Board Functions}.
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{void store_board(struct board_state *state)}
|
||||
@findex store_board
|
||||
@quotation
|
||||
Save board state.
|
||||
@end quotation
|
||||
@item @code{void restore_board(struct board_state *state)}
|
||||
@findex restore_board
|
||||
@quotation
|
||||
Restore a saved board state.
|
||||
@end quotation
|
||||
@item @code{void clear_board(void)}
|
||||
@findex clear_board
|
||||
@quotation
|
||||
Clear the internal board.
|
||||
@end quotation
|
||||
@item @code{void dump_stack(void)}
|
||||
@findex dump_stack
|
||||
@quotation
|
||||
for use under GDB prints the move stack.
|
||||
@end quotation
|
||||
@item @code{void add_stone(int pos, int color)}
|
||||
@findex add_stone
|
||||
@quotation
|
||||
Place a stone on the board and update the board_hash. This operation
|
||||
destroys all move history.
|
||||
@end quotation
|
||||
@item @code{void remove_stone(int pos)}
|
||||
@findex remove_stone
|
||||
@quotation
|
||||
Remove a stone from the board and update the board_hash. This
|
||||
operation destroys the move history.
|
||||
@end quotation
|
||||
@item @code{int is_pass(int pos)}
|
||||
@findex is_pass
|
||||
@quotation
|
||||
Test if the move is a pass or not. Return 1 if it is.
|
||||
@end quotation
|
||||
@item @code{int is_legal(int pos, int color)}
|
||||
@findex is_legal
|
||||
@quotation
|
||||
Determines whether the move @code{color} at @code{pos} is legal.
|
||||
@end quotation
|
||||
@item @code{int is_suicide(int pos, int color)}
|
||||
@findex is_suicide
|
||||
@quotation
|
||||
Determines whether the move @code{color} at @code{pos} would be a suicide.
|
||||
This is the case if
|
||||
@enumerate
|
||||
@item There is no neighboring empty intersection.
|
||||
@item There is no neighboring opponent string with exactly one liberty.
|
||||
@item There is no neighboring friendly string with more than one liberty.
|
||||
@end enumerate
|
||||
@end quotation
|
||||
@item @code{int is_illegal_ko_capture(int pos, int color)}
|
||||
@findex is_illegal_ko_capture
|
||||
@quotation
|
||||
Determines whether the move @code{color} at @code{pos} would be an illegal ko
|
||||
capture.
|
||||
@end quotation
|
||||
@item @code{int is_edge_vertex(int pos)}
|
||||
@findex is_edge_vertex
|
||||
@quotation
|
||||
Determine whether vertex is on the edge.
|
||||
@end quotation
|
||||
@item @code{int edge_distance(int pos)}
|
||||
@findex edge_distance
|
||||
@quotation
|
||||
Distance to the edge.
|
||||
@end quotation
|
||||
@item @code{int is_corner_vertex(int pos)}
|
||||
@findex is_corner_vertex
|
||||
@quotation
|
||||
Determine whether vertex is a corner.
|
||||
@end quotation
|
||||
@item @code{int get_komaster()}
|
||||
@findex get_komaster
|
||||
@item @code{int get_kom_pos()}
|
||||
@findex get_kom_pos
|
||||
@quotation
|
||||
Public functions to access the variable @code{komaster} and @code{kom_pos},
|
||||
which are static in @file{board.c}.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
Next we come to @code{countlib()} and its allies, which
|
||||
address the problem of determining how many liberties a
|
||||
string has. Although @code{countlib()} addresses this
|
||||
basic question, other functions can often get the needed
|
||||
information more quickly, so there are a number of
|
||||
different functions in this family.
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{int countlib(int str)}
|
||||
@findex countlib
|
||||
@quotation
|
||||
Count the number of liberties of the string at @code{pos}. There
|
||||
must be a stone at this location.
|
||||
@end quotation
|
||||
@item @code{int findlib(int str, int maxlib, int *libs)}
|
||||
@findex findlib
|
||||
@quotation
|
||||
Find the liberties of the string at @code{str}. This location must not be
|
||||
empty. The locations of up to maxlib liberties are written into
|
||||
@code{libs[]}. The full number of liberties is returned. If you want the
|
||||
locations of all liberties, whatever their number, you should pass
|
||||
@code{MAXLIBS} as the value for @code{maxlib} and allocate space for
|
||||
@code{libs[]} accordingly.
|
||||
@end quotation
|
||||
@item @code{int fastlib(int pos, int color, int ignore_captures)}
|
||||
@findex fastlib
|
||||
@quotation
|
||||
Count the liberties a stone of the given color would get if played
|
||||
at @code{pos}. The intent of this function is to be as fast as possible, not
|
||||
necessarily complete. But if it returns a positive value (meaning
|
||||
it has succeeded), the value is guaranteed to be correct. Captures are ignored
|
||||
based if the @code{ignore_captures} field is nonzero. The location @code{pos}
|
||||
must be empty. The function fails if there are more than two neighbor strings
|
||||
of the same color. In this case, the return value is -1. Captures are
|
||||
handled in a very limited way, so if ignore_capture is 0, and a capture is
|
||||
required, it will often return -1.
|
||||
@end quotation
|
||||
@item @code{int approxlib(int pos, int color, int maxlib, int *libs)}
|
||||
@findex approxlib
|
||||
@quotation
|
||||
Find the liberties a stone of the given color would get if played at
|
||||
@code{pos}, ignoring possible captures of opponent stones. The location
|
||||
@code{pos} must be empty. If @code{libs != NULL}, the locations of up to
|
||||
@code{maxlib} liberties are written into @code{libs[]}. The counting of
|
||||
liberties may or may not be halted when @code{maxlib} is reached. The number
|
||||
of liberties found is returned, which may be less than the total number of
|
||||
liberties if @code{maxlib} is small. If you want the number or the locations
|
||||
of all liberties, however many they are, you should pass @code{MAXLIBS} as the
|
||||
value for maxlib and allocate space for @code{libs[]} accordingly.
|
||||
@end quotation
|
||||
@item @code{int accuratelib(int pos, int color, int maxlib, int *libs)}
|
||||
@findex accuratelib
|
||||
@quotation
|
||||
Find the liberties a stone of the given color would get if played at
|
||||
@code{pos}. This function takes into consideration all captures. Its return
|
||||
value is exact in that sense it counts all the liberties, unless @code{maxlib}
|
||||
allows it to stop earlier. The location @code{pos} must be empty. If
|
||||
@code{libs != NULL}, the locations of up to @code{maxlib} liberties are
|
||||
written into @code{libs[]}. The counting of liberties may or may not be halted
|
||||
when @code{maxlib} is reached. The number of found liberties is returned.
|
||||
This function guarantees that liberties which are not results of captures come
|
||||
first in @code{libs[]} array. To find whether all the liberties starting from
|
||||
a given one are results of captures, one may use @code{if (board[libs[k]] !=
|
||||
EMPTY)} construction. If you want the number or the locations of all
|
||||
liberties, however many they are, you should pass @code{MAXLIBS} as the value
|
||||
for @code{maxlib} and allocate space for @code{libs[]} accordingly.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
Next we have some general utility functions.
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{int count_common_libs(int str1, int str2)}
|
||||
@findex count_common_libs
|
||||
@quotation
|
||||
Find the number of common liberties of the two strings.
|
||||
@end quotation
|
||||
@item @code{int find_common_libs(int str1, int str2, int maxlib, int *libs)}
|
||||
@findex find_common_libs
|
||||
@quotation
|
||||
Find the common liberties of the two strings. The locations of up to
|
||||
@code{maxlib} common liberties are written into @code{libs[]}. The full
|
||||
number of common liberties is returned. If you want the locations of all
|
||||
common liberties, whatever their number, you should pass @code{MAXLIBS} as the
|
||||
value for @code{maxlib} and allocate space for @code{libs[]} accordingly.
|
||||
@end quotation
|
||||
@item @code{int have_common_lib(int str1, int str2, int *lib)}
|
||||
@findex have_common_lib
|
||||
@quotation
|
||||
Determine whether two strings have at least one common liberty.
|
||||
If they do and @code{lib != NULL}, one common liberty is returned in
|
||||
@code{*lib}.
|
||||
@end quotation
|
||||
@item @code{int countstones(int str)}
|
||||
@findex countstones
|
||||
@quotation
|
||||
Report the number of stones in a string.
|
||||
@end quotation
|
||||
@item @code{int findstones(int str, int maxstones, int *stones)}
|
||||
@findex findstones
|
||||
@quotation
|
||||
Find the stones of the string at @code{str}. The location must not be
|
||||
empty. The locations of up to maxstones stones are written into
|
||||
@code{stones[]}. The full number of stones is returned.
|
||||
@end quotation
|
||||
@item @code{int chainlinks(int str, int adj[MAXCHAIN])}
|
||||
@findex chainlinks
|
||||
@quotation
|
||||
This very useful function returns (in the @code{adj} array) the chains
|
||||
surrounding the string at @code{str}. The number of chains is returned.
|
||||
@end quotation
|
||||
@item @code{int chainlinks2(int str, int adj[MAXCHAIN], int lib)}
|
||||
@findex chainlinks2
|
||||
@quotation
|
||||
Returns (in @code{adj} array) those chains surrounding the string at
|
||||
@code{str}, which has exactly @code{lib} liberties. The number of such chains
|
||||
is returned.
|
||||
@end quotation
|
||||
@item @code{int chainlinks3(int str, int adj[MAXCHAIN], int lib)}
|
||||
@findex chainlinks3
|
||||
@quotation
|
||||
Returns (in @code{adj} array) the chains surrounding
|
||||
the string at @code{str}, which have less or equal @code{lib} liberties.
|
||||
The number of such chains is returned.
|
||||
@end quotation
|
||||
@item @code{int extended_chainlinks(int str, int adj[MAXCHAIN], int both_colors)}
|
||||
@findex extended_chainlinks
|
||||
@quotation
|
||||
Returns (in the @code{adj} array) the opponent strings being directly adjacent
|
||||
to @code{str} or having a common liberty with @code{str}. The number of such
|
||||
strings is returned. If the both_colors parameter is true, also own strings
|
||||
sharing a liberty are returned.
|
||||
@end quotation
|
||||
@item @code{int find_origin(int str)}
|
||||
@findex find_origin
|
||||
@quotation
|
||||
Find the origin of a string, i.e. the point with the smallest 1D board
|
||||
coordinate. The idea is to have a canonical reference point for a
|
||||
string.
|
||||
@end quotation
|
||||
@item @code{int is_self_atari(int pos, int color)}
|
||||
@findex is_self_atari
|
||||
@quotation
|
||||
Determine whether a move by color at @code{pos} would be a self atari,
|
||||
i.e. whether it would get more than one liberty. This function
|
||||
returns true also for the case of a suicide move.
|
||||
@end quotation
|
||||
@item @code{int liberty_of_string(int pos, int str)}
|
||||
@findex liberty_of_string
|
||||
@quotation
|
||||
Returns true if @code{pos} is a liberty of the string at @code{str}.
|
||||
@end quotation
|
||||
@item @code{int second_order_liberty_of_string(int pos, int str)}
|
||||
@findex second_order_liberty_of_string
|
||||
@quotation
|
||||
Returns true if @code{pos} is a second order liberty of the string at str.
|
||||
@end quotation
|
||||
@item @code{int neighbor_of_string(int pos, int str)}
|
||||
@findex neighbor_of_string
|
||||
@quotation
|
||||
Returns true if @code{pos} is adjacent to the string at @code{str}.
|
||||
@end quotation
|
||||
@item @code{int has_neighbor(int pos, int color)}
|
||||
@findex has_neighbor
|
||||
@quotation
|
||||
Returns true if @code{pos} has a neighbor of @code{color}.
|
||||
@end quotation
|
||||
@item @code{int same_string(int str1, int str2)}
|
||||
@findex same_string
|
||||
@quotation
|
||||
Returns true if @code{str1} and @code{str2} belong to the same string.
|
||||
@end quotation
|
||||
@item @code{int adjacent_strings(int str1, int str2)}
|
||||
@findex adjacent_strings
|
||||
@quotation
|
||||
Returns true if the strings at @code{str1} and @code{str2} are adjacent.
|
||||
@end quotation
|
||||
@item @code{int is_ko(int pos, int color, int *ko_pos)}
|
||||
@findex is_ko
|
||||
@quotation
|
||||
Return true if the move @code{pos} by @code{color} is a ko capture
|
||||
(whether capture is legal on this move or not). If so,
|
||||
and if @code{ko_pos} is not a @code{NULL} pointer, then
|
||||
@code{*ko_pos} returns the location of the captured ko stone.
|
||||
If the move is not a ko capture, @code{*ko_pos} is set to 0.
|
||||
A move is a ko capture if and only if
|
||||
@enumerate
|
||||
@item All neighbors are opponent stones.
|
||||
@item The number of captured stones is exactly one.
|
||||
@end enumerate
|
||||
@end quotation
|
||||
@item @code{int is_ko_point(int pos)}
|
||||
@findex is_ko_point
|
||||
@quotation
|
||||
Return true if @code{pos} is either a stone, which if captured would give
|
||||
ko, or if @code{pos} is an empty intersection adjacent to a ko stone.
|
||||
@end quotation
|
||||
@item @code{int does_capture_something(int pos, int color)}
|
||||
@findex does_capture_something
|
||||
@quotation
|
||||
Returns 1 if at least one string is captured when color plays at @code{pos}.
|
||||
@end quotation
|
||||
@item @code{void mark_string(int str, char mx[BOARDMAX], char mark)}
|
||||
@findex mark_string
|
||||
@quotation
|
||||
For each stone in the string at pos, set @code{mx} to value mark. If
|
||||
some of the stones in the string are marked prior to calling this
|
||||
function, only the connected unmarked stones starting from pos
|
||||
are guaranteed to become marked. The rest of the string may or may
|
||||
not become marked. (In the current implementation, it will.)
|
||||
@end quotation
|
||||
@item @code{int move_in_stack(int pos, int cutoff)}
|
||||
@findex move_in_stack
|
||||
@quotation
|
||||
Returns true if at least one move has been played at pos
|
||||
at deeper than level @code{cutoff} in the reading tree.
|
||||
@end quotation
|
||||
@item @code{int stones_on_board(int color)}
|
||||
@findex stones_on_board
|
||||
@quotation
|
||||
Return the number of stones of the indicated color(s) on the board.
|
||||
This only counts stones in the permanent position, not stones placed
|
||||
by @code{trymove()} or @code{tryko()}. Use
|
||||
@code{stones_on_board(BLACK | WHITE)} to get
|
||||
the total number of stones on the board.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
@node Influence Utilities
|
||||
@section Utilities from @file{engine/influence.c}
|
||||
|
||||
We will only list here a portion of the public functions in @code{influence.c}.
|
||||
The influence code is invoked through the function @code{compute_influence}
|
||||
(@pxref{Influence Usage}). It is invoked as follows.
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{void compute_influence(int color, const char safe_stones[BOARDMAX], const float strength[BOARDMAX], struct influence_data *q, int move, const char *trace_message)}
|
||||
@findex compute_influence
|
||||
@quotation
|
||||
Compute the influence values for both colors.
|
||||
The caller must
|
||||
@itemize @minus
|
||||
@item set up the @code{board[]} state
|
||||
@item mark safe stones with @code{INFLUENCE_SAFE_STONE}, dead stones with 0
|
||||
@item mark stones newly saved by a move with @code{INFLUENCE_SAVED_STONE}
|
||||
(this is relevant if the influence_data *q is reused to compute
|
||||
a followup value for this move).
|
||||
@end itemize
|
||||
Results will be stored in q.
|
||||
@code{move} has no effects except toggling debugging. Set it to -1
|
||||
for no debug output at all (otherwise it will be controlled by
|
||||
the @option{-m} command line option). It is assumed that @code{color} is in turn to move. (This affects the
|
||||
barrier patterns (class A, D) and intrusions (class B)). Color
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
Other functions in @file{influence.c} are of the nature of utilities
|
||||
which may be useful throughout the engine. We list the most useful
|
||||
ones here.
|
||||
|
||||
@itemize @bullet
|
||||
@item @code{void influence_mark_non_territory(int pos, int color)}
|
||||
@findex influence_mark_non_territory
|
||||
@quotation
|
||||
Called from actions for @samp{t} patterns in @file{barriers.db}.
|
||||
Marks @code{pos} as not being territory for @code{color}.
|
||||
@end quotation
|
||||
@item @code{int whose_territory(const struct influence_data *q, int pos)}
|
||||
@findex whose_territory
|
||||
@quotation
|
||||
Return the color of the territory at @code{pos}. If it's territory for
|
||||
neither color, @code{EMPTY} is returned.
|
||||
@end quotation
|
||||
@item @code{int whose_moyo(const struct influence_data *q, int pos)}
|
||||
@findex whose_moyo
|
||||
@quotation
|
||||
Return the color who has a moyo at @code{pos}. If neither color has a
|
||||
moyo there, @code{EMPTY} is returned. The definition of moyo in terms of the
|
||||
influences is totally ad hoc.
|
||||
@end quotation
|
||||
@item @code{int whose_area(const struct influence_data *q, int pos)}
|
||||
@findex whose_area
|
||||
@quotation
|
||||
Return the color who has dominating influence (``area'') at @code{pos}.
|
||||
If neither color dominates the influence there, EMPTY is returned.
|
||||
The definition of area in terms of the influences is totally ad hoc.
|
||||
@end quotation
|
||||
@end itemize
|
||||
|
||||
|
||||
|
62
gnugo/engine/CMakeLists.txt
Normal file
|
@ -0,0 +1,62 @@
|
|||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
INCLUDE_DIRECTORIES(${GNUGo_SOURCE_DIR}/patterns)
|
||||
INCLUDE_DIRECTORIES(${GNUGo_SOURCE_DIR}/sgf)
|
||||
INCLUDE_DIRECTORIES(${GNUGo_SOURCE_DIR}/utils)
|
||||
|
||||
|
||||
########### engine library ###############
|
||||
|
||||
SET(engine_STAT_SRCS
|
||||
aftermath.c
|
||||
board.c
|
||||
boardlib.c
|
||||
breakin.c
|
||||
cache.c
|
||||
clock.c
|
||||
combination.c
|
||||
dragon.c
|
||||
endgame.c
|
||||
filllib.c
|
||||
fuseki.c
|
||||
genmove.c
|
||||
globals.c
|
||||
handicap.c
|
||||
hash.c
|
||||
influence.c
|
||||
interface.c
|
||||
matchpat.c
|
||||
montecarlo.c
|
||||
move_reasons.c
|
||||
movelist.c
|
||||
optics.c
|
||||
oracle.c
|
||||
owl.c
|
||||
persistent.c
|
||||
printutils.c
|
||||
readconnect.c
|
||||
reading.c
|
||||
semeai.c
|
||||
sgfdecide.c
|
||||
sgffile.c
|
||||
shapes.c
|
||||
showbord.c
|
||||
surround.c
|
||||
unconditional.c
|
||||
utils.c
|
||||
value_moves.c
|
||||
worm.c
|
||||
)
|
||||
|
||||
ADD_LIBRARY(engine STATIC ${engine_STAT_SRCS})
|
||||
|
||||
|
||||
########### board library ###############
|
||||
|
||||
SET(board_STAT_SRCS
|
||||
board.c
|
||||
boardlib.c
|
||||
hash.c
|
||||
printutils.c
|
||||
)
|
||||
|
||||
ADD_LIBRARY(board STATIC ${board_STAT_SRCS})
|
63
gnugo/engine/Makefile.am
Normal file
|
@ -0,0 +1,63 @@
|
|||
EXTRA_DIST = engine.dsp board.dsp CMakeLists.txt
|
||||
|
||||
# Remove these files here... they are created locally
|
||||
DISTCLEANFILES = *~
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GNU_GO_WARNINGS) \
|
||||
-I../patterns \
|
||||
-I$(top_srcdir)/patterns \
|
||||
-I$(top_srcdir)/sgf \
|
||||
-I$(top_srcdir)/utils
|
||||
|
||||
noinst_HEADERS = cache.h gnugo.h hash.h clock.h readconnect.h \
|
||||
influence.h liberty.h move_reasons.h board.h
|
||||
|
||||
# preconfigured settings for various configurations
|
||||
noinst_LIBRARIES = libengine.a libboard.a
|
||||
|
||||
libengine_a_SOURCES = \
|
||||
aftermath.c \
|
||||
board.c \
|
||||
boardlib.c \
|
||||
breakin.c \
|
||||
cache.c \
|
||||
clock.c \
|
||||
combination.c \
|
||||
dragon.c \
|
||||
endgame.c \
|
||||
filllib.c \
|
||||
fuseki.c \
|
||||
genmove.c \
|
||||
globals.c \
|
||||
handicap.c \
|
||||
hash.c \
|
||||
influence.c \
|
||||
interface.c \
|
||||
matchpat.c \
|
||||
montecarlo.c \
|
||||
move_reasons.c \
|
||||
movelist.c \
|
||||
optics.c \
|
||||
oracle.c \
|
||||
owl.c \
|
||||
persistent.c \
|
||||
printutils.c \
|
||||
readconnect.c \
|
||||
reading.c \
|
||||
semeai.c \
|
||||
sgfdecide.c \
|
||||
sgffile.c \
|
||||
shapes.c \
|
||||
showbord.c \
|
||||
surround.c \
|
||||
unconditional.c \
|
||||
utils.c \
|
||||
value_moves.c \
|
||||
worm.c
|
||||
|
||||
libboard_a_SOURCES = \
|
||||
board.c \
|
||||
boardlib.c \
|
||||
hash.c \
|
||||
printutils.c
|