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.
This commit is contained in:
237
gnugo/patterns/CMakeLists.txt
Normal file
237
gnugo/patterns/CMakeLists.txt
Normal file
@ -0,0 +1,237 @@
|
||||
INCLUDE_DIRECTORIES(${GNUGo_SOURCE_DIR}/patterns)
|
||||
INCLUDE_DIRECTORIES(${GNUGo_SOURCE_DIR}/engine)
|
||||
INCLUDE_DIRECTORIES(${GNUGo_SOURCE_DIR}/sgf)
|
||||
INCLUDE_DIRECTORIES(${GNUGo_SOURCE_DIR}/utils)
|
||||
|
||||
########### mkpat program ###############
|
||||
|
||||
SET(mkpat_SRCS
|
||||
mkpat.c
|
||||
transform.c
|
||||
dfa.c
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(mkpat ${mkpat_SRCS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(mkpat utils)
|
||||
|
||||
|
||||
########### joseki program ###############
|
||||
|
||||
SET(joseki_SRCS
|
||||
joseki.c
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(joseki ${joseki_SRCS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(joseki board sgf utils)
|
||||
|
||||
|
||||
########### mkeyes program ###############
|
||||
|
||||
SET(mkeyes_SRCS
|
||||
mkeyes.c
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(mkeyes ${mkeyes_SRCS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(mkeyes utils)
|
||||
|
||||
|
||||
########### mkmcpat program ###############
|
||||
|
||||
SET(mkmcpat_SRCS
|
||||
mkmcpat.c
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(mkmcpat ${mkmcpat_SRCS})
|
||||
|
||||
IF(UNIX)
|
||||
SET(PLATFORM_LIBRARIES m)
|
||||
ENDIF(UNIX)
|
||||
|
||||
TARGET_LINK_LIBRARIES(mkmcpat engine sgf utils ${PLATFORM_LIBRARIES})
|
||||
|
||||
|
||||
########### uncompress_fuseki program ###############
|
||||
|
||||
SET(uncompress_fuseki_SRCS
|
||||
uncompress_fuseki.c
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(uncompress_fuseki ${uncompress_fuseki_SRCS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(uncompress_fuseki utils board sgf)
|
||||
|
||||
|
||||
########### extract_fuseki program ###############
|
||||
|
||||
SET(extract_fuseki_SRCS
|
||||
extract_fuseki.c
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(extract_fuseki ${extract_fuseki_SRCS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(extract_fuseki engine patterns
|
||||
engine patterns sgf utils)
|
||||
|
||||
|
||||
########### next target ###############
|
||||
|
||||
SET(compress_fuseki_SRCS
|
||||
compress_fuseki.c
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(compress_fuseki ${compress_fuseki_SRCS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(compress_fuseki)
|
||||
|
||||
|
||||
########### Generate files. ##############
|
||||
|
||||
GET_TARGET_PROPERTY(JOSEKI_EXE joseki LOCATION)
|
||||
GET_TARGET_PROPERTY(MKPAT_EXE mkpat LOCATION)
|
||||
GET_TARGET_PROPERTY(MKEYES_EXE mkeyes LOCATION)
|
||||
GET_TARGET_PROPERTY(MKMCPAT_EXE mkmcpat LOCATION)
|
||||
GET_TARGET_PROPERTY(UNCOMPRESS_FUSEKI_EXE uncompress_fuseki LOCATION)
|
||||
|
||||
SET(JOSEKI_INPUTS "")
|
||||
SET(JOSEKI_NAMES "")
|
||||
SET(GG_BUILT_SOURCES "")
|
||||
MACRO(BUILD_JOSEKI NAME PREFIX)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.db
|
||||
COMMAND ${JOSEKI_EXE} ${PREFIX}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${NAME}.sgf
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.db
|
||||
DEPENDS joseki ${CMAKE_CURRENT_SOURCE_DIR}/${NAME}.sgf
|
||||
)
|
||||
SET(JOSEKI_INPUTS ${JOSEKI_INPUTS}
|
||||
"-i" ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.db)
|
||||
SET(JOSEKI_NAMES ${JOSEKI_NAMES}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${NAME}.db)
|
||||
ENDMACRO(BUILD_JOSEKI)
|
||||
|
||||
BUILD_JOSEKI(gogo JG)
|
||||
BUILD_JOSEKI(hoshi_keima JHK)
|
||||
BUILD_JOSEKI(hoshi_other JHO)
|
||||
BUILD_JOSEKI(komoku JK)
|
||||
BUILD_JOSEKI(sansan JS)
|
||||
BUILD_JOSEKI(mokuhazushi JM)
|
||||
BUILD_JOSEKI(takamoku JT)
|
||||
|
||||
MACRO(RUN_MKPAT OPTIONS1 OPTIONS2 PATNAME DBNAME CNAME)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CNAME}
|
||||
COMMAND ${MKPAT_EXE} ${OPTIONS1} ${OPTIONS2} ${PATNAME}
|
||||
-i ${CMAKE_CURRENT_SOURCE_DIR}/${DBNAME}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/${CNAME}
|
||||
DEPENDS mkpat ${CMAKE_CURRENT_SOURCE_DIR}/${DBNAME}
|
||||
)
|
||||
SET(GG_BUILT_SOURCES ${GG_BUILT_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${CNAME})
|
||||
ENDMACRO(RUN_MKPAT)
|
||||
|
||||
SET(DFAFLAGS -D -m)
|
||||
|
||||
MACRO(RUN_MKPAT_DFA OPTIONS PATNAME DTRNAME DBNAME CNAME)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CNAME}
|
||||
COMMAND ${MKPAT_EXE} ${DFAFLAGS} ${OPTIONS}
|
||||
-t ${CMAKE_CURRENT_SOURCE_DIR}/${DTRNAME} ${PATNAME}
|
||||
-i ${CMAKE_CURRENT_SOURCE_DIR}/${DBNAME}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/${CNAME}
|
||||
DEPENDS mkpat ${CMAKE_CURRENT_SOURCE_DIR}/${DBNAME}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${DTRNAME}
|
||||
)
|
||||
SET(GG_BUILT_SOURCES ${GG_BUILT_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${CNAME})
|
||||
ENDMACRO(RUN_MKPAT_DFA)
|
||||
|
||||
MACRO(RUN_UNCOMPRESS_FUSEKI BOARDSIZE)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/fuseki${BOARDSIZE}.c
|
||||
COMMAND ${UNCOMPRESS_FUSEKI_EXE} ${BOARDSIZE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/fuseki${BOARDSIZE}.dbz
|
||||
c > ${CMAKE_CURRENT_BINARY_DIR}/fuseki${BOARDSIZE}.c
|
||||
DEPENDS uncompress_fuseki
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/fuseki${BOARDSIZE}.dbz
|
||||
)
|
||||
SET(GG_BUILT_SOURCES ${GG_BUILT_SOURCES}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/fuseki${BOARDSIZE}.c)
|
||||
ENDMACRO(RUN_UNCOMPRESS_FUSEKI)
|
||||
|
||||
# FIXME: It's very ugly that the RUN_MKPAT macro takes two separate
|
||||
# option arguments, where one is in most cases eliminated by using "".
|
||||
# The problem with just having one option argument is that specifying
|
||||
# it as "-c -b" causes the space to be escaped into "-c\ -b". There is
|
||||
# probably some trivial workaround for someone who actually knows cmake.
|
||||
RUN_MKPAT(-X "" attpat attack.db apatterns.c)
|
||||
RUN_MKPAT("" "" defpat defense.db dpatterns.c)
|
||||
RUN_MKPAT(-b "" handipat handicap.db handipat.c)
|
||||
RUN_MKPAT(-c "" influencepat influence.db influence.c)
|
||||
RUN_MKPAT(-c -b barrierspat barriers.db barriers.c)
|
||||
RUN_MKPAT(-b "" endpat endgame.db endgame.c)
|
||||
RUN_MKPAT(-c "" conn conn.db conn.c)
|
||||
RUN_MKPAT(-b "" fusekipat fuseki.db fusekipat.c)
|
||||
RUN_MKPAT_DFA(-b aa_attackpat aa_attackpats.dtr aa_attackpats.db aa_attackpat.c)
|
||||
RUN_MKPAT_DFA(-b owl_vital_apat owl_vital_apats.dtr owl_vital_apats.db owl_vital_apat.c)
|
||||
RUN_MKPAT_DFA(-b owl_attackpat owl_attackpats.dtr owl_attackpats.db owl_attackpat.c)
|
||||
RUN_MKPAT_DFA(-b owl_defendpat owl_defendpats.dtr owl_defendpats.db owl_defendpat.c)
|
||||
RUN_UNCOMPRESS_FUSEKI(9)
|
||||
RUN_UNCOMPRESS_FUSEKI(13)
|
||||
RUN_UNCOMPRESS_FUSEKI(19)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/josekidb.c
|
||||
COMMAND ${MKPAT_EXE} -C joseki ${JOSEKI_INPUTS}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/josekidb.c
|
||||
DEPENDS mkpat ${JOSEKI_NAMES}
|
||||
)
|
||||
SET(GG_BUILT_SOURCES ${GG_BUILT_SOURCES}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/josekidb.c)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/patterns.c
|
||||
COMMAND ${MKPAT_EXE} -b pat -i ${CMAKE_CURRENT_SOURCE_DIR}/patterns.db
|
||||
-i ${CMAKE_CURRENT_SOURCE_DIR}/patterns2.db
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/patterns.c
|
||||
DEPENDS mkpat ${CMAKE_CURRENT_SOURCE_DIR}/patterns.db
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/patterns2.db
|
||||
)
|
||||
SET(GG_BUILT_SOURCES ${GG_BUILT_SOURCES}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/patterns.c)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/eyes.c
|
||||
COMMAND ${MKEYES_EXE} < ${CMAKE_CURRENT_SOURCE_DIR}/eyes.db
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/eyes.c
|
||||
DEPENDS mkeyes ${CMAKE_CURRENT_SOURCE_DIR}/eyes.db
|
||||
)
|
||||
SET(GG_BUILT_SOURCES ${GG_BUILT_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/eyes.c)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mcpat.c
|
||||
COMMAND ${MKMCPAT_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/mc_montegnu_classic.db
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mc_mogo_classic.db
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mc_uniform.db
|
||||
> ${CMAKE_CURRENT_BINARY_DIR}/mcpat.c
|
||||
DEPENDS mkmcpat ${CMAKE_CURRENT_SOURCE_DIR}/mkmcpat.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mc_montegnu_classic.db
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mc_mogo_classic.db
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mc_uniform.db
|
||||
)
|
||||
|
||||
SET(GG_BUILT_SOURCES ${GG_BUILT_SOURCES}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/mcpat.c)
|
||||
|
||||
|
||||
|
||||
########### patterns library ###############
|
||||
|
||||
SET(patterns_STAT_SRCS
|
||||
connections.c
|
||||
helpers.c
|
||||
transform.c
|
||||
${GG_BUILT_SOURCES}
|
||||
)
|
||||
|
||||
ADD_LIBRARY(patterns STATIC ${patterns_STAT_SRCS})
|
209
gnugo/patterns/Makefile.am
Normal file
209
gnugo/patterns/Makefile.am
Normal file
@ -0,0 +1,209 @@
|
||||
noinst_PROGRAMS = mkpat joseki mkeyes uncompress_fuseki mkmcpat
|
||||
EXTRA_PROGRAMS = extract_fuseki compress_fuseki
|
||||
|
||||
DSP = dfa.dsp patterns.dsp joseki.dsp mkeyes.dsp mkpat.dsp fuseki.dsp uncompress_fuseki.dsp mkmcpat.dsp
|
||||
DTR = aa_attackpats.dtr owl_attackpats.dtr owl_defendpats.dtr \
|
||||
owl_vital_apats.dtr
|
||||
|
||||
EXTRA_DIST = $(DSP)\
|
||||
$(DTR)\
|
||||
dfa.c\
|
||||
gnugo-db.el\
|
||||
hoshi_keima.sgf\
|
||||
komoku.sgf\
|
||||
gogo.sgf\
|
||||
hoshi_other.sgf\
|
||||
mokuhazushi.sgf\
|
||||
takamoku.sgf\
|
||||
sansan.sgf\
|
||||
aa_attackpats.db\
|
||||
attack.db\
|
||||
barriers.db\
|
||||
conn.db\
|
||||
defense.db\
|
||||
endgame.db\
|
||||
eyes.db\
|
||||
fuseki.db\
|
||||
gogo.db\
|
||||
handicap.db\
|
||||
hoshi_keima.db\
|
||||
hoshi_other.db\
|
||||
influence.db\
|
||||
komoku.db\
|
||||
mc_mogo_classic.db\
|
||||
mc_montegnu_classic.db\
|
||||
mc_uniform.db\
|
||||
mokuhazushi.db\
|
||||
oracle.db\
|
||||
owl_attackpats.db\
|
||||
owl_defendpats.db\
|
||||
owl_vital_apats.db\
|
||||
patterns2.db\
|
||||
patterns.db\
|
||||
sansan.db\
|
||||
takamoku.db\
|
||||
fuseki13.dbz\
|
||||
fuseki19.dbz\
|
||||
fuseki9.dbz\
|
||||
CMakeLists.txt
|
||||
|
||||
mkpat_SOURCES = mkpat.c transform.c dfa.c
|
||||
|
||||
mkpat_LDADD = ../utils/libutils.a
|
||||
|
||||
if DFA_ENABLED
|
||||
DFAFLAGS = -D -m
|
||||
else
|
||||
DFAFLAGS =
|
||||
endif
|
||||
|
||||
joseki_SOURCES = joseki.c
|
||||
joseki_LDADD = ../engine/libboard.a ../sgf/libsgf.a ../utils/libutils.a
|
||||
joseki_AM_CPPFLAGS = $(GNU_GO_WARNINGS) -I$(top_srcdir)/sgf
|
||||
mkeyes_SOURCES = mkeyes.c
|
||||
mkeyes_LDADD = ../utils/libutils.a
|
||||
mkmcpat_SOURCES = mkmcpat.c ../engine/globals.c
|
||||
mkmcpat_LDADD = ../engine/libengine.a ../sgf/libsgf.a ../utils/libutils.a
|
||||
mkmcpat_AM_CPPFLAGS = $(GNU_GO_WARNINGS)
|
||||
extract_fuseki_SOURCES = extract_fuseki.c
|
||||
# Yes, we currently need duplicate libengine.a and libpatterns.a.
|
||||
extract_fuseki_LDADD = ../engine/libengine.a libpatterns.a\
|
||||
../engine/libengine.a libpatterns.a\
|
||||
../sgf/libsgf.a ../utils/libutils.a
|
||||
extract_fuseki_AM_CPPFLAGS = $(GNU_GO_WARNINGS) -I$(top_srcdir)/sgf
|
||||
|
||||
uncompress_fuseki_SOURCES = uncompress_fuseki.c
|
||||
uncompress_fuseki_LDADD = ../utils/libutils.a ../engine/libboard.a ../sgf/libsgf.a
|
||||
compress_fuseki_SOURCES = compress_fuseki.c
|
||||
|
||||
noinst_HEADERS = patterns.h eyes.h dfa.h dfa-mkpat.h
|
||||
|
||||
GGBUILTSOURCES = conn.c patterns.c apatterns.c dpatterns.c eyes.c\
|
||||
influence.c barriers.c endgame.c aa_attackpat.c\
|
||||
owl_attackpat.c\
|
||||
owl_vital_apat.c owl_defendpat.c fusekipat.c\
|
||||
fuseki9.c fuseki13.c fuseki19.c josekidb.c\
|
||||
handipat.c oraclepat.c mcpat.c
|
||||
|
||||
DBBUILT = gogo.db hoshi_keima.db hoshi_other.db komoku.db sansan.db \
|
||||
mokuhazushi.db takamoku.db
|
||||
|
||||
DBBUILT_INPUT = -i gogo.db -i hoshi_keima.db -i hoshi_other.db -i komoku.db \
|
||||
-i sansan.db -i mokuhazushi.db -i takamoku.db
|
||||
|
||||
MC_DB = $(srcdir)/mc_montegnu_classic.db $(srcdir)/mc_mogo_classic.db \
|
||||
$(srcdir)/mc_uniform.db
|
||||
|
||||
DB_TO_TAG = aa_attackpats.db attack.db barriers.db conn.db defense.db\
|
||||
endgame.db eyes.db fuseki.db fuseki9.dbz fuseki13.dbz fuseki19.dbz\
|
||||
handicap.db influence.db oracle.db owl_attackpats.db\
|
||||
owl_defendpats.db owl_vital_apats.db patterns.db patterns2.db\
|
||||
$(DBBUILT)
|
||||
|
||||
# Remove these files here... they are created locally
|
||||
DISTCLEANFILES = $(GGBUILTSOURCES) $(DBBUILT) *~
|
||||
|
||||
dist-hook:
|
||||
cd $(distdir) && rm $(GGBUILTSOURCES)
|
||||
|
||||
# source files in this directory get access to private prototypes
|
||||
AM_CPPFLAGS = \
|
||||
$(GNU_GO_WARNINGS) \
|
||||
-I$(top_srcdir)/engine \
|
||||
-I$(top_srcdir)/utils \
|
||||
-I$(top_srcdir)/sgf
|
||||
|
||||
noinst_LIBRARIES = libpatterns.a
|
||||
|
||||
libpatterns_a_SOURCES = connections.c helpers.c transform.c $(GGBUILTSOURCES)
|
||||
|
||||
gogo.db : $(srcdir)/gogo.sgf joseki$(EXEEXT)
|
||||
./joseki JG $(srcdir)/gogo.sgf >gogo.db
|
||||
|
||||
hoshi_keima.db : $(srcdir)/hoshi_keima.sgf joseki$(EXEEXT)
|
||||
./joseki JHK $(srcdir)/hoshi_keima.sgf >hoshi_keima.db
|
||||
|
||||
hoshi_other.db : $(srcdir)/hoshi_other.sgf joseki$(EXEEXT)
|
||||
./joseki JHO $(srcdir)/hoshi_other.sgf >hoshi_other.db
|
||||
|
||||
komoku.db : $(srcdir)/komoku.sgf joseki$(EXEEXT)
|
||||
./joseki JK $(srcdir)/komoku.sgf >komoku.db
|
||||
|
||||
sansan.db : $(srcdir)/sansan.sgf joseki$(EXEEXT)
|
||||
./joseki JS $(srcdir)/sansan.sgf >sansan.db
|
||||
|
||||
mokuhazushi.db : $(srcdir)/mokuhazushi.sgf joseki$(EXEEXT)
|
||||
./joseki JM $(srcdir)/mokuhazushi.sgf >mokuhazushi.db
|
||||
|
||||
takamoku.db : $(srcdir)/takamoku.sgf joseki$(EXEEXT)
|
||||
./joseki JT $(srcdir)/takamoku.sgf >takamoku.db
|
||||
|
||||
patterns.c : $(srcdir)/patterns.db $(srcdir)/patterns2.db mkpat$(EXEEXT)
|
||||
./mkpat -b pat -i $(srcdir)/patterns.db -i$(srcdir)/patterns2.db \
|
||||
-o patterns.c
|
||||
|
||||
josekidb.c : $(DBBUILT) mkpat$(EXEEXT)
|
||||
./mkpat -C joseki $(DBBUILT_INPUT) -o josekidb.c
|
||||
|
||||
apatterns.c : $(srcdir)/attack.db mkpat$(EXEEXT)
|
||||
./mkpat -X attpat -i $(srcdir)/attack.db -o apatterns.c
|
||||
|
||||
dpatterns.c : $(srcdir)/defense.db mkpat$(EXEEXT)
|
||||
./mkpat defpat -i $(srcdir)/defense.db -o dpatterns.c
|
||||
|
||||
conn.c : $(srcdir)/conn.db mkpat$(EXEEXT)
|
||||
./mkpat -c conn -i $(srcdir)/conn.db -o conn.c
|
||||
|
||||
endgame.c : $(srcdir)/endgame.db mkpat$(EXEEXT)
|
||||
./mkpat -b endpat -i $(srcdir)/endgame.db -o endgame.c
|
||||
|
||||
eyes.c: $(srcdir)/eyes.db mkeyes$(EXEEXT)
|
||||
./mkeyes < $(srcdir)/eyes.db >eyes.c
|
||||
|
||||
influence.c : $(srcdir)/influence.db mkpat$(EXEEXT)
|
||||
./mkpat -c influencepat -i $(srcdir)/influence.db -o influence.c
|
||||
|
||||
barriers.c : $(srcdir)/barriers.db mkpat$(EXEEXT)
|
||||
./mkpat -c -b barrierspat -i $(srcdir)/barriers.db -o barriers.c
|
||||
|
||||
aa_attackpat.c : $(srcdir)/aa_attackpats.db $(srcdir)/aa_attackpats.dtr mkpat$(EXEEXT)
|
||||
./mkpat $(DFAFLAGS) -b -t $(srcdir)/aa_attackpats.dtr aa_attackpat \
|
||||
-i $(srcdir)/aa_attackpats.db -o aa_attackpat.c
|
||||
|
||||
owl_attackpat.c : $(srcdir)/owl_attackpats.db $(srcdir)/owl_attackpats.dtr mkpat$(EXEEXT)
|
||||
./mkpat $(DFAFLAGS) -b -t $(srcdir)/owl_attackpats.dtr owl_attackpat \
|
||||
-i $(srcdir)/owl_attackpats.db -o owl_attackpat.c
|
||||
|
||||
oraclepat.c : $(srcdir)/oracle.db mkpat$(EXEEXT)
|
||||
./mkpat -b oracle -i $(srcdir)/oracle.db -o oraclepat.c
|
||||
|
||||
owl_vital_apat.c : $(srcdir)/owl_vital_apats.db $(srcdir)/owl_vital_apats.dtr mkpat$(EXEEXT)
|
||||
./mkpat $(DFAFLAGS) -b -t $(srcdir)/owl_vital_apats.dtr owl_vital_apat \
|
||||
-i $(srcdir)/owl_vital_apats.db -o owl_vital_apat.c
|
||||
|
||||
owl_defendpat.c : $(srcdir)/owl_defendpats.db $(srcdir)/owl_defendpats.dtr mkpat$(EXEEXT)
|
||||
./mkpat $(DFAFLAGS) -b -t $(srcdir)/owl_defendpats.dtr owl_defendpat \
|
||||
-i $(srcdir)/owl_defendpats.db -o owl_defendpat.c
|
||||
|
||||
fusekipat.c : $(srcdir)/fuseki.db mkpat$(EXEEXT)
|
||||
./mkpat -b fusekipat -i $(srcdir)/fuseki.db -o fusekipat.c
|
||||
|
||||
fuseki9.c : $(srcdir)/fuseki9.dbz uncompress_fuseki$(EXEEXT)
|
||||
./uncompress_fuseki 9 $(srcdir)/fuseki9.dbz c >fuseki9.c
|
||||
|
||||
fuseki13.c : $(srcdir)/fuseki13.dbz uncompress_fuseki$(EXEEXT)
|
||||
./uncompress_fuseki 13 $(srcdir)/fuseki13.dbz c >fuseki13.c
|
||||
|
||||
fuseki19.c : $(srcdir)/fuseki19.dbz uncompress_fuseki$(EXEEXT)
|
||||
./uncompress_fuseki 19 $(srcdir)/fuseki19.dbz c >fuseki19.c
|
||||
|
||||
handipat.c : $(srcdir)/handicap.db mkpat$(EXEEXT)
|
||||
./mkpat -b handipat -i $(srcdir)/handicap.db -o handipat.c
|
||||
|
||||
mcpat.c : $(MC_DB) mkmcpat$(EXEEXT)
|
||||
./mkmcpat $(MC_DB) > mcpat.c
|
||||
|
||||
|
||||
ETAGS_ARGS = --language none --regex '/^Pattern[ \t]+[a-zA-Z0-9]+/' $(DB_TO_TAG)\
|
||||
--language auto --no-regex
|
||||
TAGS_DEPENDENCIES = $(DB_TO_TAG)
|
703
gnugo/patterns/Makefile.in
Normal file
703
gnugo/patterns/Makefile.in
Normal file
@ -0,0 +1,703 @@
|
||||
# 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 = :
|
||||
noinst_PROGRAMS = mkpat$(EXEEXT) joseki$(EXEEXT) mkeyes$(EXEEXT) \
|
||||
uncompress_fuseki$(EXEEXT) mkmcpat$(EXEEXT)
|
||||
EXTRA_PROGRAMS = extract_fuseki$(EXEEXT) compress_fuseki$(EXEEXT)
|
||||
subdir = patterns
|
||||
DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
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 =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
AR = ar
|
||||
ARFLAGS = cru
|
||||
libpatterns_a_AR = $(AR) $(ARFLAGS)
|
||||
libpatterns_a_LIBADD =
|
||||
am__objects_1 = conn.$(OBJEXT) patterns.$(OBJEXT) apatterns.$(OBJEXT) \
|
||||
dpatterns.$(OBJEXT) eyes.$(OBJEXT) influence.$(OBJEXT) \
|
||||
barriers.$(OBJEXT) endgame.$(OBJEXT) aa_attackpat.$(OBJEXT) \
|
||||
owl_attackpat.$(OBJEXT) owl_vital_apat.$(OBJEXT) \
|
||||
owl_defendpat.$(OBJEXT) fusekipat.$(OBJEXT) fuseki9.$(OBJEXT) \
|
||||
fuseki13.$(OBJEXT) fuseki19.$(OBJEXT) josekidb.$(OBJEXT) \
|
||||
handipat.$(OBJEXT) oraclepat.$(OBJEXT) mcpat.$(OBJEXT)
|
||||
am_libpatterns_a_OBJECTS = connections.$(OBJEXT) helpers.$(OBJEXT) \
|
||||
transform.$(OBJEXT) $(am__objects_1)
|
||||
libpatterns_a_OBJECTS = $(am_libpatterns_a_OBJECTS)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_compress_fuseki_OBJECTS = compress_fuseki.$(OBJEXT)
|
||||
compress_fuseki_OBJECTS = $(am_compress_fuseki_OBJECTS)
|
||||
compress_fuseki_LDADD = $(LDADD)
|
||||
am_extract_fuseki_OBJECTS = extract_fuseki.$(OBJEXT)
|
||||
extract_fuseki_OBJECTS = $(am_extract_fuseki_OBJECTS)
|
||||
extract_fuseki_DEPENDENCIES = ../engine/libengine.a libpatterns.a \
|
||||
../engine/libengine.a libpatterns.a ../sgf/libsgf.a \
|
||||
../utils/libutils.a
|
||||
am_joseki_OBJECTS = joseki.$(OBJEXT)
|
||||
joseki_OBJECTS = $(am_joseki_OBJECTS)
|
||||
joseki_DEPENDENCIES = ../engine/libboard.a ../sgf/libsgf.a \
|
||||
../utils/libutils.a
|
||||
am_mkeyes_OBJECTS = mkeyes.$(OBJEXT)
|
||||
mkeyes_OBJECTS = $(am_mkeyes_OBJECTS)
|
||||
mkeyes_DEPENDENCIES = ../utils/libutils.a
|
||||
am_mkmcpat_OBJECTS = mkmcpat.$(OBJEXT) globals.$(OBJEXT)
|
||||
mkmcpat_OBJECTS = $(am_mkmcpat_OBJECTS)
|
||||
mkmcpat_DEPENDENCIES = ../engine/libengine.a ../sgf/libsgf.a \
|
||||
../utils/libutils.a
|
||||
am_mkpat_OBJECTS = mkpat.$(OBJEXT) transform.$(OBJEXT) dfa.$(OBJEXT)
|
||||
mkpat_OBJECTS = $(am_mkpat_OBJECTS)
|
||||
mkpat_DEPENDENCIES = ../utils/libutils.a
|
||||
am_uncompress_fuseki_OBJECTS = uncompress_fuseki.$(OBJEXT)
|
||||
uncompress_fuseki_OBJECTS = $(am_uncompress_fuseki_OBJECTS)
|
||||
uncompress_fuseki_DEPENDENCIES = ../utils/libutils.a \
|
||||
../engine/libboard.a ../sgf/libsgf.a
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libpatterns_a_SOURCES) $(compress_fuseki_SOURCES) \
|
||||
$(extract_fuseki_SOURCES) $(joseki_SOURCES) $(mkeyes_SOURCES) \
|
||||
$(mkmcpat_SOURCES) $(mkpat_SOURCES) \
|
||||
$(uncompress_fuseki_SOURCES)
|
||||
DIST_SOURCES = $(libpatterns_a_SOURCES) $(compress_fuseki_SOURCES) \
|
||||
$(extract_fuseki_SOURCES) $(joseki_SOURCES) $(mkeyes_SOURCES) \
|
||||
$(mkmcpat_SOURCES) $(mkpat_SOURCES) \
|
||||
$(uncompress_fuseki_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
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@
|
||||
DSP = dfa.dsp patterns.dsp joseki.dsp mkeyes.dsp mkpat.dsp fuseki.dsp uncompress_fuseki.dsp mkmcpat.dsp
|
||||
DTR = aa_attackpats.dtr owl_attackpats.dtr owl_defendpats.dtr \
|
||||
owl_vital_apats.dtr
|
||||
|
||||
EXTRA_DIST = $(DSP)\
|
||||
$(DTR)\
|
||||
dfa.c\
|
||||
gnugo-db.el\
|
||||
hoshi_keima.sgf\
|
||||
komoku.sgf\
|
||||
gogo.sgf\
|
||||
hoshi_other.sgf\
|
||||
mokuhazushi.sgf\
|
||||
takamoku.sgf\
|
||||
sansan.sgf\
|
||||
aa_attackpats.db\
|
||||
attack.db\
|
||||
barriers.db\
|
||||
conn.db\
|
||||
defense.db\
|
||||
endgame.db\
|
||||
eyes.db\
|
||||
fuseki.db\
|
||||
gogo.db\
|
||||
handicap.db\
|
||||
hoshi_keima.db\
|
||||
hoshi_other.db\
|
||||
influence.db\
|
||||
komoku.db\
|
||||
mc_mogo_classic.db\
|
||||
mc_montegnu_classic.db\
|
||||
mc_uniform.db\
|
||||
mokuhazushi.db\
|
||||
oracle.db\
|
||||
owl_attackpats.db\
|
||||
owl_defendpats.db\
|
||||
owl_vital_apats.db\
|
||||
patterns2.db\
|
||||
patterns.db\
|
||||
sansan.db\
|
||||
takamoku.db\
|
||||
fuseki13.dbz\
|
||||
fuseki19.dbz\
|
||||
fuseki9.dbz\
|
||||
CMakeLists.txt
|
||||
|
||||
mkpat_SOURCES = mkpat.c transform.c dfa.c
|
||||
mkpat_LDADD = ../utils/libutils.a
|
||||
@DFA_ENABLED_FALSE@DFAFLAGS =
|
||||
@DFA_ENABLED_TRUE@DFAFLAGS = -D -m
|
||||
joseki_SOURCES = joseki.c
|
||||
joseki_LDADD = ../engine/libboard.a ../sgf/libsgf.a ../utils/libutils.a
|
||||
joseki_AM_CPPFLAGS = $(GNU_GO_WARNINGS) -I$(top_srcdir)/sgf
|
||||
mkeyes_SOURCES = mkeyes.c
|
||||
mkeyes_LDADD = ../utils/libutils.a
|
||||
mkmcpat_SOURCES = mkmcpat.c ../engine/globals.c
|
||||
mkmcpat_LDADD = ../engine/libengine.a ../sgf/libsgf.a ../utils/libutils.a
|
||||
mkmcpat_AM_CPPFLAGS = $(GNU_GO_WARNINGS)
|
||||
extract_fuseki_SOURCES = extract_fuseki.c
|
||||
# Yes, we currently need duplicate libengine.a and libpatterns.a.
|
||||
extract_fuseki_LDADD = ../engine/libengine.a libpatterns.a\
|
||||
../engine/libengine.a libpatterns.a\
|
||||
../sgf/libsgf.a ../utils/libutils.a
|
||||
|
||||
extract_fuseki_AM_CPPFLAGS = $(GNU_GO_WARNINGS) -I$(top_srcdir)/sgf
|
||||
uncompress_fuseki_SOURCES = uncompress_fuseki.c
|
||||
uncompress_fuseki_LDADD = ../utils/libutils.a ../engine/libboard.a ../sgf/libsgf.a
|
||||
compress_fuseki_SOURCES = compress_fuseki.c
|
||||
noinst_HEADERS = patterns.h eyes.h dfa.h dfa-mkpat.h
|
||||
GGBUILTSOURCES = conn.c patterns.c apatterns.c dpatterns.c eyes.c\
|
||||
influence.c barriers.c endgame.c aa_attackpat.c\
|
||||
owl_attackpat.c\
|
||||
owl_vital_apat.c owl_defendpat.c fusekipat.c\
|
||||
fuseki9.c fuseki13.c fuseki19.c josekidb.c\
|
||||
handipat.c oraclepat.c mcpat.c
|
||||
|
||||
DBBUILT = gogo.db hoshi_keima.db hoshi_other.db komoku.db sansan.db \
|
||||
mokuhazushi.db takamoku.db
|
||||
|
||||
DBBUILT_INPUT = -i gogo.db -i hoshi_keima.db -i hoshi_other.db -i komoku.db \
|
||||
-i sansan.db -i mokuhazushi.db -i takamoku.db
|
||||
|
||||
MC_DB = $(srcdir)/mc_montegnu_classic.db $(srcdir)/mc_mogo_classic.db \
|
||||
$(srcdir)/mc_uniform.db
|
||||
|
||||
DB_TO_TAG = aa_attackpats.db attack.db barriers.db conn.db defense.db\
|
||||
endgame.db eyes.db fuseki.db fuseki9.dbz fuseki13.dbz fuseki19.dbz\
|
||||
handicap.db influence.db oracle.db owl_attackpats.db\
|
||||
owl_defendpats.db owl_vital_apats.db patterns.db patterns2.db\
|
||||
$(DBBUILT)
|
||||
|
||||
|
||||
# Remove these files here... they are created locally
|
||||
DISTCLEANFILES = $(GGBUILTSOURCES) $(DBBUILT) *~
|
||||
|
||||
# source files in this directory get access to private prototypes
|
||||
AM_CPPFLAGS = \
|
||||
$(GNU_GO_WARNINGS) \
|
||||
-I$(top_srcdir)/engine \
|
||||
-I$(top_srcdir)/utils \
|
||||
-I$(top_srcdir)/sgf
|
||||
|
||||
noinst_LIBRARIES = libpatterns.a
|
||||
libpatterns_a_SOURCES = connections.c helpers.c transform.c $(GGBUILTSOURCES)
|
||||
ETAGS_ARGS = --language none --regex '/^Pattern[ \t]+[a-zA-Z0-9]+/' $(DB_TO_TAG)\
|
||||
--language auto --no-regex
|
||||
|
||||
TAGS_DEPENDENCIES = $(DB_TO_TAG)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(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 patterns/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu patterns/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
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libpatterns.a: $(libpatterns_a_OBJECTS) $(libpatterns_a_DEPENDENCIES)
|
||||
-rm -f libpatterns.a
|
||||
$(libpatterns_a_AR) libpatterns.a $(libpatterns_a_OBJECTS) $(libpatterns_a_LIBADD)
|
||||
$(RANLIB) libpatterns.a
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
|
||||
compress_fuseki$(EXEEXT): $(compress_fuseki_OBJECTS) $(compress_fuseki_DEPENDENCIES)
|
||||
@rm -f compress_fuseki$(EXEEXT)
|
||||
$(LINK) $(compress_fuseki_LDFLAGS) $(compress_fuseki_OBJECTS) $(compress_fuseki_LDADD) $(LIBS)
|
||||
extract_fuseki$(EXEEXT): $(extract_fuseki_OBJECTS) $(extract_fuseki_DEPENDENCIES)
|
||||
@rm -f extract_fuseki$(EXEEXT)
|
||||
$(LINK) $(extract_fuseki_LDFLAGS) $(extract_fuseki_OBJECTS) $(extract_fuseki_LDADD) $(LIBS)
|
||||
joseki$(EXEEXT): $(joseki_OBJECTS) $(joseki_DEPENDENCIES)
|
||||
@rm -f joseki$(EXEEXT)
|
||||
$(LINK) $(joseki_LDFLAGS) $(joseki_OBJECTS) $(joseki_LDADD) $(LIBS)
|
||||
mkeyes$(EXEEXT): $(mkeyes_OBJECTS) $(mkeyes_DEPENDENCIES)
|
||||
@rm -f mkeyes$(EXEEXT)
|
||||
$(LINK) $(mkeyes_LDFLAGS) $(mkeyes_OBJECTS) $(mkeyes_LDADD) $(LIBS)
|
||||
mkmcpat$(EXEEXT): $(mkmcpat_OBJECTS) $(mkmcpat_DEPENDENCIES)
|
||||
@rm -f mkmcpat$(EXEEXT)
|
||||
$(LINK) $(mkmcpat_LDFLAGS) $(mkmcpat_OBJECTS) $(mkmcpat_LDADD) $(LIBS)
|
||||
mkpat$(EXEEXT): $(mkpat_OBJECTS) $(mkpat_DEPENDENCIES)
|
||||
@rm -f mkpat$(EXEEXT)
|
||||
$(LINK) $(mkpat_LDFLAGS) $(mkpat_OBJECTS) $(mkpat_LDADD) $(LIBS)
|
||||
uncompress_fuseki$(EXEEXT): $(uncompress_fuseki_OBJECTS) $(uncompress_fuseki_DEPENDENCIES)
|
||||
@rm -f uncompress_fuseki$(EXEEXT)
|
||||
$(LINK) $(uncompress_fuseki_LDFLAGS) $(uncompress_fuseki_OBJECTS) $(uncompress_fuseki_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aa_attackpat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apatterns.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/barriers.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compress_fuseki.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conn.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connections.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpatterns.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/endgame.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract_fuseki.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eyes.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fuseki13.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fuseki19.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fuseki9.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fusekipat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/handipat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helpers.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/influence.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/joseki.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/josekidb.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mcpat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkeyes.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkmcpat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkpat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oraclepat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/owl_attackpat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/owl_defendpat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/owl_vital_apat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/patterns.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transform.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uncompress_fuseki.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
globals.o: ../engine/globals.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT globals.o -MD -MP -MF "$(DEPDIR)/globals.Tpo" -c -o globals.o `test -f '../engine/globals.c' || echo '$(srcdir)/'`../engine/globals.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/globals.Tpo" "$(DEPDIR)/globals.Po"; else rm -f "$(DEPDIR)/globals.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../engine/globals.c' object='globals.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o globals.o `test -f '../engine/globals.c' || echo '$(srcdir)/'`../engine/globals.c
|
||||
|
||||
globals.obj: ../engine/globals.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT globals.obj -MD -MP -MF "$(DEPDIR)/globals.Tpo" -c -o globals.obj `if test -f '../engine/globals.c'; then $(CYGPATH_W) '../engine/globals.c'; else $(CYGPATH_W) '$(srcdir)/../engine/globals.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/globals.Tpo" "$(DEPDIR)/globals.Po"; else rm -f "$(DEPDIR)/globals.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../engine/globals.c' object='globals.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o globals.obj `if test -f '../engine/globals.c'; then $(CYGPATH_W) '../engine/globals.c'; else $(CYGPATH_W) '$(srcdir)/../engine/globals.c'; fi`
|
||||
uninstall-info-am:
|
||||
|
||||
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: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
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; }'`; \
|
||||
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: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
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; }'`; \
|
||||
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)
|
||||
@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-hook
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
|
||||
installdirs:
|
||||
install: 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:
|
||||
|
||||
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-am
|
||||
|
||||
clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-noinstLIBRARIES clean-noinstPROGRAMS ctags dist-hook \
|
||||
distclean distclean-compile distclean-generic distclean-tags \
|
||||
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-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am
|
||||
|
||||
|
||||
dist-hook:
|
||||
cd $(distdir) && rm $(GGBUILTSOURCES)
|
||||
|
||||
gogo.db : $(srcdir)/gogo.sgf joseki$(EXEEXT)
|
||||
./joseki JG $(srcdir)/gogo.sgf >gogo.db
|
||||
|
||||
hoshi_keima.db : $(srcdir)/hoshi_keima.sgf joseki$(EXEEXT)
|
||||
./joseki JHK $(srcdir)/hoshi_keima.sgf >hoshi_keima.db
|
||||
|
||||
hoshi_other.db : $(srcdir)/hoshi_other.sgf joseki$(EXEEXT)
|
||||
./joseki JHO $(srcdir)/hoshi_other.sgf >hoshi_other.db
|
||||
|
||||
komoku.db : $(srcdir)/komoku.sgf joseki$(EXEEXT)
|
||||
./joseki JK $(srcdir)/komoku.sgf >komoku.db
|
||||
|
||||
sansan.db : $(srcdir)/sansan.sgf joseki$(EXEEXT)
|
||||
./joseki JS $(srcdir)/sansan.sgf >sansan.db
|
||||
|
||||
mokuhazushi.db : $(srcdir)/mokuhazushi.sgf joseki$(EXEEXT)
|
||||
./joseki JM $(srcdir)/mokuhazushi.sgf >mokuhazushi.db
|
||||
|
||||
takamoku.db : $(srcdir)/takamoku.sgf joseki$(EXEEXT)
|
||||
./joseki JT $(srcdir)/takamoku.sgf >takamoku.db
|
||||
|
||||
patterns.c : $(srcdir)/patterns.db $(srcdir)/patterns2.db mkpat$(EXEEXT)
|
||||
./mkpat -b pat -i $(srcdir)/patterns.db -i$(srcdir)/patterns2.db \
|
||||
-o patterns.c
|
||||
|
||||
josekidb.c : $(DBBUILT) mkpat$(EXEEXT)
|
||||
./mkpat -C joseki $(DBBUILT_INPUT) -o josekidb.c
|
||||
|
||||
apatterns.c : $(srcdir)/attack.db mkpat$(EXEEXT)
|
||||
./mkpat -X attpat -i $(srcdir)/attack.db -o apatterns.c
|
||||
|
||||
dpatterns.c : $(srcdir)/defense.db mkpat$(EXEEXT)
|
||||
./mkpat defpat -i $(srcdir)/defense.db -o dpatterns.c
|
||||
|
||||
conn.c : $(srcdir)/conn.db mkpat$(EXEEXT)
|
||||
./mkpat -c conn -i $(srcdir)/conn.db -o conn.c
|
||||
|
||||
endgame.c : $(srcdir)/endgame.db mkpat$(EXEEXT)
|
||||
./mkpat -b endpat -i $(srcdir)/endgame.db -o endgame.c
|
||||
|
||||
eyes.c: $(srcdir)/eyes.db mkeyes$(EXEEXT)
|
||||
./mkeyes < $(srcdir)/eyes.db >eyes.c
|
||||
|
||||
influence.c : $(srcdir)/influence.db mkpat$(EXEEXT)
|
||||
./mkpat -c influencepat -i $(srcdir)/influence.db -o influence.c
|
||||
|
||||
barriers.c : $(srcdir)/barriers.db mkpat$(EXEEXT)
|
||||
./mkpat -c -b barrierspat -i $(srcdir)/barriers.db -o barriers.c
|
||||
|
||||
aa_attackpat.c : $(srcdir)/aa_attackpats.db $(srcdir)/aa_attackpats.dtr mkpat$(EXEEXT)
|
||||
./mkpat $(DFAFLAGS) -b -t $(srcdir)/aa_attackpats.dtr aa_attackpat \
|
||||
-i $(srcdir)/aa_attackpats.db -o aa_attackpat.c
|
||||
|
||||
owl_attackpat.c : $(srcdir)/owl_attackpats.db $(srcdir)/owl_attackpats.dtr mkpat$(EXEEXT)
|
||||
./mkpat $(DFAFLAGS) -b -t $(srcdir)/owl_attackpats.dtr owl_attackpat \
|
||||
-i $(srcdir)/owl_attackpats.db -o owl_attackpat.c
|
||||
|
||||
oraclepat.c : $(srcdir)/oracle.db mkpat$(EXEEXT)
|
||||
./mkpat -b oracle -i $(srcdir)/oracle.db -o oraclepat.c
|
||||
|
||||
owl_vital_apat.c : $(srcdir)/owl_vital_apats.db $(srcdir)/owl_vital_apats.dtr mkpat$(EXEEXT)
|
||||
./mkpat $(DFAFLAGS) -b -t $(srcdir)/owl_vital_apats.dtr owl_vital_apat \
|
||||
-i $(srcdir)/owl_vital_apats.db -o owl_vital_apat.c
|
||||
|
||||
owl_defendpat.c : $(srcdir)/owl_defendpats.db $(srcdir)/owl_defendpats.dtr mkpat$(EXEEXT)
|
||||
./mkpat $(DFAFLAGS) -b -t $(srcdir)/owl_defendpats.dtr owl_defendpat \
|
||||
-i $(srcdir)/owl_defendpats.db -o owl_defendpat.c
|
||||
|
||||
fusekipat.c : $(srcdir)/fuseki.db mkpat$(EXEEXT)
|
||||
./mkpat -b fusekipat -i $(srcdir)/fuseki.db -o fusekipat.c
|
||||
|
||||
fuseki9.c : $(srcdir)/fuseki9.dbz uncompress_fuseki$(EXEEXT)
|
||||
./uncompress_fuseki 9 $(srcdir)/fuseki9.dbz c >fuseki9.c
|
||||
|
||||
fuseki13.c : $(srcdir)/fuseki13.dbz uncompress_fuseki$(EXEEXT)
|
||||
./uncompress_fuseki 13 $(srcdir)/fuseki13.dbz c >fuseki13.c
|
||||
|
||||
fuseki19.c : $(srcdir)/fuseki19.dbz uncompress_fuseki$(EXEEXT)
|
||||
./uncompress_fuseki 19 $(srcdir)/fuseki19.dbz c >fuseki19.c
|
||||
|
||||
handipat.c : $(srcdir)/handicap.db mkpat$(EXEEXT)
|
||||
./mkpat -b handipat -i $(srcdir)/handicap.db -o handipat.c
|
||||
|
||||
mcpat.c : $(MC_DB) mkmcpat$(EXEEXT)
|
||||
./mkmcpat $(MC_DB) > mcpat.c
|
||||
# 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:
|
20
gnugo/patterns/README
Normal file
20
gnugo/patterns/README
Normal file
@ -0,0 +1,20 @@
|
||||
The pattern file patterns.db determines GNU Go's personality.
|
||||
Due to autohelpers, even a nonprogrammer could write powerful
|
||||
patterns which might make GNU Go stronger. Consult the Texinfo
|
||||
documentation for more information, or write to gnugo@gnu.org.
|
||||
|
||||
The SGF format files in this directory, fuseki2.sgf, hoshi.sgf,
|
||||
komoku.sgf, sansan.sgf, mokuhazushi.sgf and takamoku.sgf comprise
|
||||
GNU Go's Joseki database. These files are Copyright 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 and 2009 by
|
||||
the Free Software Foundation.
|
||||
|
||||
You may redistribute or modify them under the terms of the GNU
|
||||
General Public License as published by the Free Software
|
||||
Foundation - version 3, or (at your option) any later version.
|
||||
If you redistribute them, this notice should be distributed with them.
|
||||
|
||||
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 02111, USA
|
474
gnugo/patterns/aa_attackpats.db
Normal file
474
gnugo/patterns/aa_attackpats.db
Normal file
@ -0,0 +1,474 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING #
|
||||
# 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 02111, USA #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# The atari_atari attack pattern database.
|
||||
#
|
||||
# Further documentation may be found in the Texinfo documentation.
|
||||
#
|
||||
# First there is a pattern title of the form: Pattern [string]. The
|
||||
# string is used for identifying the pattern while tuning or debugging.
|
||||
#
|
||||
# Then a block of the following characters representing the pattern
|
||||
# itself.
|
||||
#
|
||||
# ? : don't care
|
||||
# . : empty
|
||||
# X : your piece,
|
||||
# O : my piece,
|
||||
# x : your piece or empty
|
||||
# o : my piece or empty
|
||||
# * : my next move
|
||||
# -, | : edge of board
|
||||
# + : corner of board
|
||||
#
|
||||
# If a pattern must not match at the edge of the board,
|
||||
# an extra row of ?'s in the pattern may be added. (This
|
||||
# will not add to the time taken to check the pattern.)
|
||||
#
|
||||
#################
|
||||
#
|
||||
# In the second field (classification) the following pattern attributes
|
||||
# are possible. Friendly stones are 'O', opponent stones are 'X'.
|
||||
#
|
||||
# s : "Sacrifice" pattern. Allow sacrifice through self atari.
|
||||
# Notice that this is different from the usual meaning of the
|
||||
# s classification since all but a few moves in an atari_atari
|
||||
# sequence are expected to be sacrifices.
|
||||
#
|
||||
# c : "Conditional" pattern. Don't accept the move unless it is also
|
||||
# found by a non-conditional pattern or by one more conditional
|
||||
# pattern that threatens some other string.
|
||||
#
|
||||
#########################################################
|
||||
|
||||
|
||||
attribute_map none
|
||||
|
||||
goal_elements Xx
|
||||
callback_data X
|
||||
|
||||
|
||||
Pattern A1
|
||||
|
||||
X*
|
||||
|
||||
:-,-
|
||||
|
||||
A*
|
||||
|
||||
;lib(A) == 2
|
||||
|
||||
|
||||
Pattern A2
|
||||
|
||||
xXOXx
|
||||
..X*.
|
||||
.....
|
||||
-----
|
||||
|
||||
:8,-
|
||||
|
||||
|
||||
Pattern A3
|
||||
|
||||
OX
|
||||
X*
|
||||
X.
|
||||
xx
|
||||
--
|
||||
|
||||
:8,-
|
||||
|
||||
|
||||
Pattern A4
|
||||
|
||||
?X
|
||||
O*
|
||||
X.
|
||||
xx
|
||||
--
|
||||
|
||||
:8,-
|
||||
|
||||
|
||||
Pattern A5
|
||||
|
||||
?O?
|
||||
X*X
|
||||
...
|
||||
---
|
||||
|
||||
:|,-
|
||||
|
||||
|
||||
Pattern A6
|
||||
|
||||
*.X
|
||||
oXO
|
||||
|
||||
:8,c
|
||||
|
||||
*.X
|
||||
oXO
|
||||
|
||||
;olib(*)>3
|
||||
|
||||
|
||||
Pattern A7
|
||||
|
||||
X.X reduce eyespace
|
||||
X*X
|
||||
OXO
|
||||
|
||||
:|,s
|
||||
|
||||
|
||||
Pattern A7b
|
||||
# gf New pattern. (3.5.10)
|
||||
|
||||
|.X reduce eyespace
|
||||
|*X
|
||||
|XO
|
||||
|.X
|
||||
|
||||
:8,s
|
||||
|
||||
|
||||
Pattern A7c
|
||||
|
||||
X.X reduce eyespace
|
||||
X*X
|
||||
OX.
|
||||
|
||||
:8,s
|
||||
|
||||
A.X
|
||||
A*X
|
||||
OXb
|
||||
|
||||
;lib(A)==2 && olib(b)>1
|
||||
|
||||
|
||||
Pattern A8
|
||||
|
||||
O..
|
||||
?X*
|
||||
??O
|
||||
|
||||
:8,c
|
||||
|
||||
|
||||
Pattern A9
|
||||
|
||||
X*
|
||||
OX
|
||||
|
||||
:/,-
|
||||
|
||||
X*
|
||||
OX
|
||||
|
||||
;safe_omove(*)
|
||||
|
||||
|
||||
Pattern A10
|
||||
|
||||
?X?
|
||||
XOX
|
||||
.*.
|
||||
|
||||
:|,-
|
||||
|
||||
|
||||
Pattern A11
|
||||
|
||||
*.X
|
||||
?.X
|
||||
?XO
|
||||
|
||||
:8,c
|
||||
|
||||
*.X
|
||||
?.X
|
||||
?XO
|
||||
|
||||
;olib(*)>3
|
||||
|
||||
|
||||
Pattern A12
|
||||
|
||||
.X?
|
||||
*.X
|
||||
.X?
|
||||
---
|
||||
|
||||
:8,-
|
||||
|
||||
.X?
|
||||
*.X
|
||||
.A?
|
||||
---
|
||||
|
||||
;lib(A)==2 && olib(*)>3
|
||||
|
||||
|
||||
Pattern A13
|
||||
|
||||
*O
|
||||
.X
|
||||
.X
|
||||
.x
|
||||
--
|
||||
|
||||
:8,-
|
||||
|
||||
*O
|
||||
.A
|
||||
.A
|
||||
.x
|
||||
--
|
||||
|
||||
;lib(A)==3 && olib(*)>=3
|
||||
|
||||
|
||||
Pattern A14
|
||||
|
||||
.X.
|
||||
X*X
|
||||
?O?
|
||||
|
||||
:|,-
|
||||
|
||||
.X.
|
||||
A*B
|
||||
?O?
|
||||
|
||||
;safe_omove(*) && oplay_attack_either(*,A,B)
|
||||
;&& !oplay_connect(*,A,B)
|
||||
|
||||
|
||||
Pattern A15
|
||||
#evand new pattern (3.3.13)
|
||||
|
||||
?X?
|
||||
X*.
|
||||
?XX
|
||||
|
||||
:8,s
|
||||
|
||||
?X?
|
||||
X*b
|
||||
?AA
|
||||
|
||||
;lib(A) == 2 && xlib(b) <= 2
|
||||
|
||||
|
||||
Pattern A16
|
||||
#evand new pattern (3.3.13)
|
||||
|
||||
*x
|
||||
X.
|
||||
x.
|
||||
--
|
||||
|
||||
:8,-
|
||||
|
||||
*x
|
||||
A.
|
||||
x.
|
||||
--
|
||||
|
||||
;lib(A) == 3
|
||||
|
||||
|
||||
Pattern A17
|
||||
# gf New pattern. (3.3.16)
|
||||
|
||||
?O??
|
||||
o*XX
|
||||
..xX
|
||||
...X
|
||||
----
|
||||
|
||||
:8,-
|
||||
|
||||
?O??
|
||||
o*AA
|
||||
..xA
|
||||
...A
|
||||
----
|
||||
|
||||
;lib(A)==3 && olib(*)>=2
|
||||
|
||||
|
||||
Pattern A18
|
||||
# gf New pattern. (3.3.17)
|
||||
|
||||
??.?
|
||||
?X*.
|
||||
OOX.
|
||||
?X..
|
||||
??.?
|
||||
|
||||
:8,-
|
||||
|
||||
??.?
|
||||
?C*.
|
||||
eeXa
|
||||
?Db.
|
||||
??.?
|
||||
|
||||
;!oplay_attack(*,e) && oplay_attack(*,a,C) && oplay_attack(b,a,D)
|
||||
|
||||
|
||||
Pattern A19
|
||||
# gf New pattern. (3.3.17)
|
||||
|
||||
?*X threaten snapback
|
||||
O..
|
||||
?XX
|
||||
|
||||
:8,c
|
||||
|
||||
?*X
|
||||
O..
|
||||
?AA
|
||||
|
||||
;lib(A)==2 && olib(*)>1
|
||||
|
||||
|
||||
Pattern A20
|
||||
# gf New pattern. (3.3.17)
|
||||
|
||||
|*X threaten snapback
|
||||
|..
|
||||
|XX
|
||||
|
||||
:8,c
|
||||
|
||||
|*X
|
||||
|..
|
||||
|AA
|
||||
|
||||
;lib(A)==2 && olib(*)>1
|
||||
|
||||
|
||||
Pattern A21
|
||||
# gf New pattern. (3.3.17)
|
||||
|
||||
.XO
|
||||
*.X
|
||||
---
|
||||
|
||||
:8,-
|
||||
|
||||
.XO
|
||||
*.A
|
||||
---
|
||||
|
||||
;lib(A)==2 && olib(*)>2
|
||||
|
||||
|
||||
Pattern A22
|
||||
#evand New pattern. (3.3.18)
|
||||
|
||||
?.X
|
||||
O.X
|
||||
X*X
|
||||
?X?
|
||||
|
||||
:8,s
|
||||
|
||||
?.A
|
||||
ObA
|
||||
X*A
|
||||
?X?
|
||||
|
||||
;lib(A) <= 4 && oplay_attack(*,b,A) && oplay_defend(*,?,*)
|
||||
|
||||
|
||||
Pattern A23
|
||||
# evand New pattern. (3.3.19)
|
||||
|
||||
XXO
|
||||
.X.
|
||||
.*.
|
||||
|
||||
:8,-
|
||||
|
||||
AAB
|
||||
.A.
|
||||
.*.
|
||||
|
||||
;lib(A) == 3 && lib(B) > 1 && oplay_attack(*,A)
|
||||
|
||||
|
||||
Pattern A24
|
||||
# pp New pattern - see atari_atari:25 and blunder:31 (3.5.1)
|
||||
|
||||
?*?
|
||||
XOX
|
||||
|
||||
:|,-
|
||||
|
||||
?*?
|
||||
BAC
|
||||
|
||||
; lib(A) == 1 && lib(B) + lib(C) <= 6 && !oplay_defend_both(*,B,C)
|
||||
|
||||
|
||||
Pattern A25
|
||||
# gf New pattern. (3.5.4)
|
||||
|
||||
..X
|
||||
*OX
|
||||
.XO
|
||||
|
||||
:8,-
|
||||
|
||||
..A
|
||||
*OA
|
||||
.BO
|
||||
|
||||
;lib(A)<=3 && lib(B)<=3 && (oplay_attack(*,A) || oplay_attack(*,B))
|
||||
|
||||
|
||||
Pattern A26
|
||||
# pp New pattern, see kgs:490. (3.7.4)
|
||||
|
||||
?XX
|
||||
O*.
|
||||
?X.
|
||||
|
||||
:8,-
|
||||
|
||||
?CC
|
||||
A*a
|
||||
?B.
|
||||
|
||||
# FIXME: The constraint is not very good.
|
||||
; lib(B) <= 5 && lib(A) > lib(B) && !oplay_defend(*,?,a,C)
|
||||
|
||||
|
||||
# END OF FILE
|
23
gnugo/patterns/aa_attackpats.dtr
Normal file
23
gnugo/patterns/aa_attackpats.dtr
Normal file
@ -0,0 +1,23 @@
|
||||
A1 1
|
||||
A2 3
|
||||
A3 0
|
||||
A4 0
|
||||
A5 1
|
||||
A6 1
|
||||
A7 1
|
||||
A8 1
|
||||
A9 0
|
||||
A10 2
|
||||
A11 4
|
||||
A12 0
|
||||
A13 7
|
||||
A14 1
|
||||
A15 6
|
||||
A16 6
|
||||
A17 0
|
||||
A18 6
|
||||
A19 1
|
||||
A20 6
|
||||
A21 0
|
||||
A22 1
|
||||
A23 5
|
215
gnugo/patterns/attack.db
Normal file
215
gnugo/patterns/attack.db
Normal file
@ -0,0 +1,215 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING #
|
||||
# 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 02111, USA. #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# attack.db - pattern database for finding tactical attack moves
|
||||
#
|
||||
# The tactical reading functions try to capture by attacking
|
||||
# on the immediate liberties plus certain caps and backfilling
|
||||
# moves. This database is intended to find additional attacking
|
||||
# moves. Notice though that these patterns doesn't help the
|
||||
# tactical reading to find attacking moves later in a move
|
||||
# sequence but only at stackp=0.
|
||||
#
|
||||
# See patterns.db for a specification of the current database format.
|
||||
#
|
||||
# Since these patterns are matched during make_worms() it doesn't
|
||||
# make any sense to use classifications such as X and O. No other
|
||||
# classification is useful either except A since we only have
|
||||
# tactical attack moves here.
|
||||
#
|
||||
# The semantics of these patterns are that the move at * is tried as
|
||||
# an attack of each X string in the pattern. The patterns are matched
|
||||
# with either player as O.
|
||||
#
|
||||
##################################################################
|
||||
|
||||
|
||||
attribute_map none
|
||||
|
||||
goal_elements none
|
||||
callback_data X
|
||||
|
||||
|
||||
Pattern Attack1
|
||||
# Even if a ladder works (and is found by the tactical reading) we
|
||||
# also want to consider the geta capture.
|
||||
|
||||
XOO? capture one stone
|
||||
OX..
|
||||
O.*?
|
||||
?.??
|
||||
|
||||
:8,A
|
||||
|
||||
|
||||
Pattern Attack2
|
||||
|
||||
OOXX push to capture X
|
||||
.XO*
|
||||
....
|
||||
----
|
||||
|
||||
:8,A
|
||||
|
||||
|
||||
Pattern Attack4
|
||||
|
||||
*OX extend to kill
|
||||
.XO
|
||||
|
||||
:8,A
|
||||
|
||||
|
||||
Pattern Attack5
|
||||
|
||||
|.X
|
||||
|XO
|
||||
|*.
|
||||
|.X
|
||||
|
||||
:8,A
|
||||
|
||||
|
||||
Pattern Attack6
|
||||
|
||||
?X block to attack and defend
|
||||
?O
|
||||
X*
|
||||
O.
|
||||
|
||||
:8,A
|
||||
|
||||
|
||||
Pattern Attack10
|
||||
|
||||
?O. common geta
|
||||
OX.
|
||||
O.*
|
||||
?.?
|
||||
|
||||
:8,A
|
||||
|
||||
|
||||
Pattern Attack11
|
||||
|
||||
o..?? catch two stones in a net
|
||||
O.*.?
|
||||
?X..o
|
||||
?X.oo
|
||||
??O??
|
||||
|
||||
:8,A
|
||||
|
||||
|
||||
Pattern Attack13
|
||||
|
||||
----
|
||||
....
|
||||
X...
|
||||
O*.O
|
||||
|
||||
:8,A
|
||||
|
||||
|
||||
Pattern Attack14
|
||||
|
||||
?.? Sometimes better to capture indirectly
|
||||
*.O
|
||||
OXO
|
||||
?O?
|
||||
|
||||
:8,A
|
||||
|
||||
|
||||
Pattern Attack15
|
||||
|
||||
XOX Capture one step away
|
||||
X.*
|
||||
---
|
||||
|
||||
:8,A,NULL
|
||||
|
||||
AOX
|
||||
A.*
|
||||
---
|
||||
|
||||
; lib(A)==1
|
||||
|
||||
|
||||
Pattern Attack16
|
||||
|
||||
?*X? Capture with snapback
|
||||
O.OX
|
||||
?XX?
|
||||
|
||||
:8,A
|
||||
|
||||
?*X?
|
||||
b.OX
|
||||
?AA?
|
||||
|
||||
;lib(A)==1 && olib(*)>1 && lib(b)>1
|
||||
|
||||
|
||||
Pattern Attack17
|
||||
# This is only intended for finding an alternative attack. It should
|
||||
# have a constraint to first check whether the move above * was
|
||||
# successful.
|
||||
# FIXME: Add necessary machinery for this.
|
||||
|
||||
?X?
|
||||
O.O
|
||||
?*o
|
||||
|
||||
:8,A
|
||||
|
||||
|
||||
Pattern Attack18
|
||||
# gf New pattern. (3.3.4)
|
||||
|
||||
OX
|
||||
O.
|
||||
X*
|
||||
--
|
||||
|
||||
:8,A
|
||||
|
||||
|
||||
Pattern Attack19
|
||||
# pp New pattern (3.3.18)
|
||||
|
||||
*.O May be better to capture indirectly
|
||||
O.X
|
||||
..O
|
||||
|
||||
:8,A
|
||||
|
||||
*.O
|
||||
O.A
|
||||
..O
|
||||
|
||||
; lib(A) == 1
|
||||
|
||||
|
||||
# END OF FILE
|
3527
gnugo/patterns/barriers.db
Normal file
3527
gnugo/patterns/barriers.db
Normal file
File diff suppressed because it is too large
Load Diff
148
gnugo/patterns/compress_fuseki.c
Normal file
148
gnugo/patterns/compress_fuseki.c
Normal file
@ -0,0 +1,148 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define BUFSIZE 160
|
||||
#define MAX_STONES 40
|
||||
#define MAX_BOARDSIZE 19
|
||||
|
||||
#define USAGE "\
|
||||
Usage : uncompress_fuseki boardsize filename\n\
|
||||
"
|
||||
|
||||
/* Write a board point in sgf format. Also do a sanity check. */
|
||||
static void
|
||||
write_stone(int i, int j)
|
||||
{
|
||||
assert(i > 0 && i <= MAX_BOARDSIZE);
|
||||
assert(j > 0 && j <= MAX_BOARDSIZE);
|
||||
printf("%c%c", j + 'a' - 1, i + 'a' - 1);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
const char *filename;
|
||||
FILE *input_FILE;
|
||||
char line[BUFSIZE];
|
||||
char name[BUFSIZE];
|
||||
int value;
|
||||
int k;
|
||||
int row = 0;
|
||||
int movei = -1;
|
||||
int movej = -1;
|
||||
int xi[MAX_STONES];
|
||||
int xj[MAX_STONES];
|
||||
int oi[MAX_STONES];
|
||||
int oj[MAX_STONES];
|
||||
int num_x = 0;
|
||||
int num_o = 0;
|
||||
|
||||
/* Check number of arguments. */
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, USAGE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
filename = argv[1];
|
||||
|
||||
input_FILE = fopen(filename, "r");
|
||||
if (!input_FILE) {
|
||||
fprintf(stderr, "compress_fuseki: Cannot open file %s\n", filename);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
while (fgets(line, BUFSIZE, input_FILE)) {
|
||||
if (sscanf(line, "Pattern %s", name) == 1) {
|
||||
/* A new name has been picked up.
|
||||
* Reset the row counter and the lists of stones.
|
||||
*/
|
||||
row = 0;
|
||||
num_x = 0;
|
||||
num_o = 0;
|
||||
}
|
||||
else if (line[0] == ':') {
|
||||
/* The colon line ends the pattern. First get the move value. */
|
||||
if (sscanf(line, ":8,-,value(%d)", &value) != 1) {
|
||||
fprintf(stderr, "compress_fuseki: Misformed colon line \"%s\"\n",
|
||||
line);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* Write the compressed description of this pattern.
|
||||
* Pad the stone list with passes (tt) if unbalanced colors.
|
||||
*/
|
||||
printf("%s %d ", name, value);
|
||||
write_stone(movei, movej);
|
||||
while (num_x > 0 || num_o > 0) {
|
||||
if (num_x > 0) {
|
||||
num_x--;
|
||||
write_stone(xi[num_x], xj[num_x]);
|
||||
}
|
||||
else if (num_o > 0)
|
||||
printf("tt");
|
||||
if (num_o > 0) {
|
||||
num_o--;
|
||||
write_stone(oi[num_o], oj[num_o]);
|
||||
}
|
||||
else if (num_x > 0)
|
||||
printf("tt");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
else if (line[0] == '|') {
|
||||
/* Found a diagram line. */
|
||||
row++;
|
||||
for (k = 1; line[k] && line[k] != '|'; k++) {
|
||||
if (line[k] == '*') {
|
||||
movei = row;
|
||||
movej = k;
|
||||
}
|
||||
else if (line[k] == 'X') {
|
||||
xi[num_x] = row;
|
||||
xj[num_x] = k;
|
||||
num_x++;
|
||||
assert(num_x < MAX_STONES);
|
||||
}
|
||||
else if (line[k] == 'O') {
|
||||
oi[num_o] = row;
|
||||
oj[num_o] = k;
|
||||
num_o++;
|
||||
assert(num_o < MAX_STONES);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
732
gnugo/patterns/conn.db
Normal file
732
gnugo/patterns/conn.db
Normal file
@ -0,0 +1,732 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING #
|
||||
# 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 02111, USA. #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# Database of connection patterns.
|
||||
#
|
||||
# ? - don't care
|
||||
# . - empty
|
||||
# X - opposite color of O
|
||||
# O - color of dragon looking for connection
|
||||
# x - X or empty
|
||||
# o - O or empty
|
||||
# * - cutting point in the O formation, an X move here must be
|
||||
# tactically safe
|
||||
# ! - inhibit connection, eye space points for O are turned marginal
|
||||
#
|
||||
###################################
|
||||
#
|
||||
# Classification
|
||||
#
|
||||
# The connection database contains patterns of three different classes,
|
||||
# which also are matched separately.
|
||||
#
|
||||
# B - Indicate cutting points and inhibit connections.
|
||||
# C - Amalgamate worms into dragons.
|
||||
#
|
||||
# Additionally there are a few acceptance modifiers.
|
||||
#
|
||||
# s - Accept even if the pattern includes tactically unsafe strings
|
||||
#
|
||||
###################################
|
||||
#
|
||||
# Organisation
|
||||
#
|
||||
# The connection database is organized into a number of different
|
||||
# categories and ordered so that more specific patterns are matched
|
||||
# before more general ones, since evaluating the constraints of the
|
||||
# latter usually is expensive.
|
||||
#
|
||||
# EB - Edge B patterns
|
||||
# CB - Center B patterns
|
||||
# EC - Edge C patterns
|
||||
# CC - Center C patterns
|
||||
# Lunch - patterns that invalidate lunches, matched with I patterns
|
||||
#
|
||||
###################################
|
||||
|
||||
|
||||
attribute_map none
|
||||
|
||||
goal_elements none
|
||||
# callback_data is dependent on pattern class in this database
|
||||
|
||||
|
||||
########################
|
||||
#
|
||||
# B patterns on the edge
|
||||
#
|
||||
########################
|
||||
|
||||
callback_data X!
|
||||
|
||||
|
||||
##########################
|
||||
#
|
||||
# B patterns in the center
|
||||
#
|
||||
##########################
|
||||
|
||||
callback_data X!
|
||||
|
||||
|
||||
Pattern CB1b
|
||||
|
||||
?O. fragile double connection
|
||||
X*O
|
||||
?O.
|
||||
|
||||
:8,B
|
||||
|
||||
?b.
|
||||
X*O
|
||||
?a.
|
||||
|
||||
;!xplay_connect(*,a,b)
|
||||
|
||||
|
||||
Pattern CB2b
|
||||
|
||||
?O.
|
||||
?.. fragile double connection
|
||||
X*O
|
||||
?O.
|
||||
|
||||
:8,B
|
||||
|
||||
?b.
|
||||
?..
|
||||
X*O
|
||||
?a.
|
||||
|
||||
;!xplay_connect(*,a,b)
|
||||
|
||||
|
||||
Pattern CB3b
|
||||
|
||||
O!O
|
||||
.*X
|
||||
.O?
|
||||
|
||||
:8,B
|
||||
|
||||
O!a
|
||||
.*X
|
||||
.b?
|
||||
|
||||
;!xplay_connect(*,a,b)
|
||||
|
||||
|
||||
Pattern CB3c
|
||||
|
||||
O!O
|
||||
.*.
|
||||
.OX
|
||||
|
||||
:8,B
|
||||
|
||||
c!a
|
||||
.*.
|
||||
.bX
|
||||
|
||||
;!oplay_disconnect(a,c)
|
||||
;&& !oplay_disconnect(c,b)
|
||||
;&& !xplay_connect(*,a,b)
|
||||
|
||||
|
||||
Pattern CB7
|
||||
# This pattern is used to find potential cutting stones as defined by
|
||||
# the field cutstone2 in the worm data. The helper returns 0 so the
|
||||
# pattern doesn't fire as a B pattern.
|
||||
|
||||
XO
|
||||
O*
|
||||
|
||||
:\,B,cutstone2_helper
|
||||
|
||||
AO
|
||||
O*
|
||||
|
||||
;attack(A)
|
||||
|
||||
|
||||
Pattern CB11b
|
||||
|
||||
?OX?
|
||||
O!OX
|
||||
?*!O
|
||||
??O?
|
||||
|
||||
:8,B
|
||||
|
||||
?bX?
|
||||
O!OX
|
||||
?*!a
|
||||
??O?
|
||||
|
||||
;!xplay_connect(*,a,b)
|
||||
|
||||
|
||||
Pattern CB15b
|
||||
# tm New Pattern (3.1.23) (see global:17, )
|
||||
# careful not to break trevord:730
|
||||
# FIXME: Need to use amalgamate_most_valuable helper.
|
||||
# xplay_disconnect helper also might be useful here.
|
||||
|
||||
?*? save cutting stone.
|
||||
OXO
|
||||
!O!
|
||||
|
||||
:8,B
|
||||
|
||||
?*?
|
||||
aXb
|
||||
!O!
|
||||
|
||||
;!xplay_connect(*,a,b)
|
||||
|
||||
|
||||
Pattern CB16
|
||||
# gf Revised constraint. (3.3.13)
|
||||
|
||||
?O
|
||||
x* fragile double connection
|
||||
XO
|
||||
O!
|
||||
|
||||
:8,B
|
||||
|
||||
?a
|
||||
x*
|
||||
XO
|
||||
b!
|
||||
|
||||
;xplay_connect(a,b) && !xplay_connect(*,a,b)
|
||||
|
||||
|
||||
Pattern CB17
|
||||
|
||||
O!O
|
||||
!*? fragile double connection
|
||||
O??
|
||||
|
||||
:\,B
|
||||
|
||||
O!a
|
||||
!*?
|
||||
b??
|
||||
|
||||
;!xplay_connect(*,a,b)
|
||||
|
||||
|
||||
Pattern CB18
|
||||
|
||||
?X?
|
||||
X.X workaround for ko contingent connection
|
||||
OXO
|
||||
?O*
|
||||
|
||||
:8,B
|
||||
|
||||
?X?
|
||||
XbX
|
||||
OAd
|
||||
?c*
|
||||
|
||||
;xplay_attack(*,A)<WIN && !xplay_connect(*,?,b,c,d)
|
||||
|
||||
|
||||
########################
|
||||
#
|
||||
# C patterns on the edge
|
||||
#
|
||||
########################
|
||||
|
||||
# Static connections need almost everything
|
||||
callback_data .Oxo,!
|
||||
|
||||
|
||||
Pattern EC1
|
||||
|
||||
??oo??
|
||||
?....?
|
||||
oO..Oo
|
||||
o....o
|
||||
o....o
|
||||
------
|
||||
|
||||
:|,C
|
||||
|
||||
|
||||
Pattern EC1b
|
||||
|
||||
??....??
|
||||
o.O..O.o
|
||||
o......o
|
||||
o......o
|
||||
--------
|
||||
|
||||
:|,C
|
||||
|
||||
|
||||
Pattern EC3a
|
||||
|
||||
o...o
|
||||
oO.Oo
|
||||
o...o
|
||||
o...o
|
||||
o...o
|
||||
-----
|
||||
|
||||
:8,C
|
||||
|
||||
o...o
|
||||
oO.Oo
|
||||
o...o
|
||||
oa..o
|
||||
o...o
|
||||
-----
|
||||
|
||||
;omoyo(a)
|
||||
|
||||
|
||||
##########################
|
||||
#
|
||||
# C patterns in the center
|
||||
#
|
||||
##############################################
|
||||
#
|
||||
# CC1xx - patterns without reading constraints
|
||||
#
|
||||
##############################################
|
||||
|
||||
# Static connections need almost everything
|
||||
callback_data .Oxo,!
|
||||
|
||||
|
||||
Pattern CC101
|
||||
|
||||
.O
|
||||
O.
|
||||
|
||||
:X,C
|
||||
|
||||
aO
|
||||
Ob
|
||||
|
||||
;!xcut(a) && !xcut(b)
|
||||
|
||||
|
||||
Pattern CC103
|
||||
|
||||
?oooo?
|
||||
o....o
|
||||
oO..Oo
|
||||
o....o
|
||||
?oooo?
|
||||
|
||||
:+,C
|
||||
|
||||
|
||||
Pattern CC104
|
||||
|
||||
?ooo??
|
||||
o...oo
|
||||
oO...o
|
||||
o...Oo
|
||||
oo...o
|
||||
??ooo?
|
||||
|
||||
:8,C
|
||||
|
||||
|
||||
Pattern CC105
|
||||
|
||||
?ooo?
|
||||
.....
|
||||
.O.O.
|
||||
.....
|
||||
?ooo?
|
||||
|
||||
:+,C
|
||||
|
||||
|
||||
Pattern CC106
|
||||
|
||||
.O.O.
|
||||
o...o
|
||||
o...o
|
||||
o.O.o
|
||||
|
||||
:8,C
|
||||
|
||||
|
||||
Pattern CC107
|
||||
|
||||
.O.O.
|
||||
o...o
|
||||
o...o
|
||||
.O.O.
|
||||
|
||||
:8,C
|
||||
|
||||
|
||||
Pattern CC108
|
||||
|
||||
O.O
|
||||
...
|
||||
...
|
||||
.O.
|
||||
|
||||
:|,C
|
||||
|
||||
OaO
|
||||
bcd
|
||||
efg
|
||||
.O.
|
||||
|
||||
;omoyo(a) && oarea(c) && oarea(f)
|
||||
;&& ((omoyo(b) + omoyo(c) + omoyo(d) + omoyo(e) + omoyo(f) +omoyo(g)) >= 3)
|
||||
|
||||
|
||||
Pattern CC109
|
||||
# gf Revised constraint. (3.3.3)
|
||||
|
||||
O.oo
|
||||
..oo
|
||||
..oo
|
||||
.Ooo
|
||||
|
||||
:8,C
|
||||
|
||||
c.oo
|
||||
.aoo
|
||||
.boo
|
||||
.doo
|
||||
|
||||
;omoyo(a) && omoyo(b) && lib(c)>=4 && lib(d)>=4
|
||||
|
||||
|
||||
##########################################################
|
||||
#
|
||||
# CC2xx - patterns with reasonably inexpensive constraints
|
||||
#
|
||||
##########################################################
|
||||
|
||||
#############################################
|
||||
#
|
||||
# CC3xx - patterns with expensive constraints
|
||||
#
|
||||
#############################################
|
||||
#
|
||||
# CC30x - one space jump connections
|
||||
#
|
||||
####################################
|
||||
|
||||
###########################
|
||||
#
|
||||
# CC31x - keima connections
|
||||
#
|
||||
###########################
|
||||
|
||||
####################################
|
||||
#
|
||||
# CC32x - two space jump connections
|
||||
#
|
||||
####################################
|
||||
|
||||
############################
|
||||
#
|
||||
# CC33x - ogeima connections
|
||||
#
|
||||
############################
|
||||
|
||||
####################################################################
|
||||
#
|
||||
# CC4xx - fragile double connections
|
||||
#
|
||||
# FIXME: These shouldn't be matched until all other amalgamation has
|
||||
# been completed.
|
||||
#
|
||||
####################################################################
|
||||
|
||||
Pattern CC401
|
||||
# Do amalgamate one of the two possible connections. We guess that
|
||||
# the larger of the two dragons is the one we most want to keep in
|
||||
# case of a cut.
|
||||
|
||||
?O. fragile double connection
|
||||
X.O
|
||||
?O.
|
||||
|
||||
:8,-
|
||||
|
||||
?d.
|
||||
Xac
|
||||
?b.
|
||||
|
||||
;xcut(a)
|
||||
|
||||
>amalgamate_most_valuable_helper(b,c,d);
|
||||
|
||||
|
||||
Pattern CC402
|
||||
# Do amalgamate one of the two possible connections. We guess that
|
||||
# the larger of the two dragons is the one we most want to keep in
|
||||
# case of a cut.
|
||||
|
||||
?O.
|
||||
?.. fragile double connection
|
||||
X.O
|
||||
?O.
|
||||
|
||||
:8,-
|
||||
|
||||
?gd
|
||||
?bc
|
||||
Xaf
|
||||
?e.
|
||||
|
||||
;xcut(a)
|
||||
|
||||
>if (!xplay_attack_either(b,c,d,b,d) || !xplay_attack_either(c,b,a,c,a))
|
||||
> amalgamate(e,f);
|
||||
>else
|
||||
> amalgamate_most_valuable_helper(e,f,g);
|
||||
|
||||
|
||||
####################################################################
|
||||
#
|
||||
# CC5xx - experimental connection patterns
|
||||
#
|
||||
####################################################################
|
||||
#
|
||||
# Note about patterns CC501, CC502, CC502b, CC511
|
||||
#
|
||||
# In theory, these patterns go against the connection policy that the
|
||||
# involved strings must be tactically stable (not capturable) and
|
||||
# consequently, they should not be needed at all. In practice though,
|
||||
# problems arise with the optics/owl analysis when such strings aren't
|
||||
# amalgamated. An example (see owl:50)
|
||||
#
|
||||
# +------
|
||||
# |...X.O
|
||||
# |XXX.XO
|
||||
# |.OOXXO
|
||||
# |O.OOOO
|
||||
#
|
||||
# In the absence of the mentioned patterns, the topmost X stone would
|
||||
# NOT be amalgamated with the others, because all attempts at
|
||||
# defending these kosumi connections result in a tactical capture of
|
||||
# the whole string, thus a successful cut.
|
||||
#
|
||||
# As a consequence, the owl code would be run against separate targets,
|
||||
# and in the above case, it would even fail to find a way to kill the
|
||||
# topmost X stone (the lack of context is then responsible for the
|
||||
# optics/owl code not being able to return vital points)
|
||||
#
|
||||
####################################################################
|
||||
|
||||
|
||||
Pattern CC501
|
||||
# Connect even if stones not tactically safe.
|
||||
|
||||
xO
|
||||
O.
|
||||
|
||||
:\,sC
|
||||
|
||||
xO
|
||||
Oc
|
||||
|
||||
;x_suicide(c)
|
||||
|
||||
|
||||
Pattern CC502
|
||||
# Connect even if stones not tactically safe.
|
||||
|
||||
XO
|
||||
O.
|
||||
|
||||
:\,sC
|
||||
|
||||
Xb
|
||||
ac
|
||||
|
||||
;lib(a)>1 && lib(b)>1 && !xcut(c) && xlib(c)==1 && xplay_attack(c,c)==WIN
|
||||
|
||||
|
||||
Pattern CC502b
|
||||
# Connect even if stones not tactically safe.
|
||||
|
||||
.O
|
||||
O.
|
||||
|
||||
:\,sC
|
||||
|
||||
db
|
||||
ac
|
||||
|
||||
;lib(a)>1 && lib(b)>1 && !xcut(c) && !xcut(d)
|
||||
;&& xlib(c)==1 && xplay_attack(c,c)
|
||||
|
||||
|
||||
Pattern CC503
|
||||
|
||||
O
|
||||
.
|
||||
O
|
||||
|
||||
:+,C
|
||||
|
||||
c
|
||||
a
|
||||
b
|
||||
|
||||
;!xcut(a) && !disconnect_helper(b,c)
|
||||
|
||||
|
||||
Pattern CC504
|
||||
|
||||
XO
|
||||
O.
|
||||
|
||||
:\,C
|
||||
|
||||
Xb
|
||||
ca
|
||||
|
||||
;!xcut(a) && !disconnect_helper(b,c)
|
||||
|
||||
|
||||
Pattern CC505
|
||||
|
||||
XO
|
||||
OX
|
||||
|
||||
:X,C
|
||||
|
||||
Bc
|
||||
dA
|
||||
|
||||
;((attack(A) && !distrust_tactics_helper(A))
|
||||
; || (attack(B) && !distrust_tactics_helper(B)))
|
||||
;&& !disconnect_helper(c,d)
|
||||
|
||||
|
||||
Pattern CC506
|
||||
|
||||
O
|
||||
.
|
||||
.
|
||||
O
|
||||
|
||||
:+,C
|
||||
|
||||
c
|
||||
a
|
||||
b
|
||||
d
|
||||
|
||||
;!xcut(a) && !xcut(b) && !disconnect_helper(c,d)
|
||||
|
||||
|
||||
Pattern CC506b
|
||||
|
||||
O.
|
||||
Xo
|
||||
..
|
||||
O.
|
||||
|
||||
:8,C
|
||||
|
||||
c.
|
||||
Eo
|
||||
ab
|
||||
d.
|
||||
|
||||
;!xcut(a) && !xcut(b) && lib(E)<=2 && !disconnect_helper(c,d)
|
||||
|
||||
|
||||
Pattern CC507
|
||||
|
||||
Ox
|
||||
..
|
||||
xO
|
||||
|
||||
:O,C
|
||||
|
||||
cx
|
||||
ab
|
||||
xd
|
||||
|
||||
;!xcut(a) && !xcut(b) && !disconnect_helper(c,d)
|
||||
|
||||
|
||||
Pattern CC508
|
||||
|
||||
O?
|
||||
.X
|
||||
xO
|
||||
|
||||
:8,C
|
||||
|
||||
b?
|
||||
aX
|
||||
xc
|
||||
|
||||
;!xcut(a) && !disconnect_helper(b,c)
|
||||
|
||||
|
||||
Pattern CC509
|
||||
|
||||
Ox
|
||||
..
|
||||
..
|
||||
xO
|
||||
|
||||
:O,C
|
||||
|
||||
ex
|
||||
ab
|
||||
cd
|
||||
xf
|
||||
|
||||
;!xcut(a) && !xcut(b) && !xcut(c) && !xcut(d) && !disconnect_helper(e,f)
|
||||
|
||||
|
||||
Pattern CC511
|
||||
# Connect even if stones not tactically safe.
|
||||
|
||||
.O
|
||||
O.
|
||||
|
||||
:\,sC
|
||||
|
||||
db
|
||||
ac
|
||||
|
||||
;attack(a) && attack(b) && !xcut(c) && !xcut(d)
|
||||
|
||||
|
||||
# END OF FILE
|
237
gnugo/patterns/connections.c
Normal file
237
gnugo/patterns/connections.c
Normal file
@ -0,0 +1,237 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "liberty.h"
|
||||
#include "patterns.h"
|
||||
|
||||
|
||||
/* Test whether apos and bpos can be cut. If yes, return 1 and
|
||||
* store it in the cut list of dragons.c.
|
||||
*/
|
||||
int
|
||||
disconnect_helper(int apos, int bpos)
|
||||
{
|
||||
int color = board[apos];
|
||||
int move;
|
||||
ASSERT1(color == board[bpos] && IS_STONE(color), apos);
|
||||
|
||||
if (disconnect(apos, bpos, &move)) {
|
||||
add_cut(apos, bpos, move);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Try to match all (permutations of) connection patterns at (m,n).
|
||||
* For each match, if it is a B pattern, set cutting point in
|
||||
* cutting_points array. If it is a C pattern, amalgamate the dragons
|
||||
* in the pattern.
|
||||
*/
|
||||
|
||||
static void
|
||||
cut_connect_callback(int anchor, int color, struct pattern *pattern,
|
||||
int ll, void *data)
|
||||
{
|
||||
int move;
|
||||
int k;
|
||||
int first_dragon = NO_MOVE;
|
||||
int second_dragon = NO_MOVE;
|
||||
|
||||
int other = OTHER_COLOR(color);
|
||||
UNUSED(data);
|
||||
|
||||
move = AFFINE_TRANSFORM(pattern->move_offset, ll, anchor);
|
||||
|
||||
if ((pattern->class & CLASS_B) && !safe_move(move, other))
|
||||
return;
|
||||
|
||||
if (pattern->class & CLASS_C) {
|
||||
/* If C pattern, test if there are more than one dragon in this
|
||||
* pattern so that there is something to connect, before doing any
|
||||
* expensive reading.
|
||||
*/
|
||||
|
||||
for (k = 0; k < pattern->patlen; ++k) { /* match each point */
|
||||
/* transform pattern real coordinate */
|
||||
int pos = AFFINE_TRANSFORM(pattern->patn[k].offset, ll, anchor);
|
||||
|
||||
/* Look for distinct dragons. */
|
||||
if (pattern->patn[k].att == ATT_O) {
|
||||
if (first_dragon == NO_MOVE)
|
||||
first_dragon = dragon[pos].origin;
|
||||
else if (second_dragon == NO_MOVE
|
||||
&& dragon[pos].origin != first_dragon) {
|
||||
second_dragon = dragon[pos].origin;
|
||||
/* A second dragon found, no need to continue looping. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (second_dragon == NO_MOVE)
|
||||
return; /* Nothing to amalgamate. */
|
||||
}
|
||||
|
||||
/* If the pattern has a constraint, call the autohelper to see
|
||||
* if the pattern must be rejected.
|
||||
*/
|
||||
if (pattern->autohelper_flag & HAVE_CONSTRAINT) {
|
||||
if (!pattern->autohelper(ll, move, color, 0))
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the pattern has a helper, call it to see if the pattern must
|
||||
* be rejected.
|
||||
*/
|
||||
if (pattern->helper) {
|
||||
if (!pattern->helper(pattern, ll, move, color))
|
||||
return;
|
||||
}
|
||||
|
||||
if ((pattern->class & CLASS_B)
|
||||
&& !(pattern->class & CLASS_s)) {
|
||||
/* Require that the X stones in the pattern are tactically safe. */
|
||||
for (k = 0; k < pattern->patlen; ++k) { /* match each point */
|
||||
if (pattern->patn[k].att == ATT_X) {
|
||||
/* transform pattern real coordinate */
|
||||
int pos = AFFINE_TRANSFORM(pattern->patn[k].offset, ll, anchor);
|
||||
|
||||
if (attack(pos, NULL) == WIN
|
||||
&& (move == NO_MOVE
|
||||
|| !does_defend(move, pos)))
|
||||
return; /* Match failed */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Get here => Pattern matches. */
|
||||
if (pattern->class & CLASS_B) {
|
||||
DEBUG(DEBUG_DRAGONS, "Cutting pattern %s+%d found at %1m\n",
|
||||
pattern->name, ll, anchor);
|
||||
DEBUG(DEBUG_DRAGONS, "cutting point %1m\n", move);
|
||||
}
|
||||
else if (pattern->class & CLASS_C)
|
||||
DEBUG(DEBUG_DRAGONS, "Connecting pattern %s+%d found at %1m\n",
|
||||
pattern->name, ll, anchor);
|
||||
|
||||
/* does the pattern have an action? */
|
||||
if (pattern->autohelper_flag & HAVE_ACTION) {
|
||||
pattern->autohelper(ll, move, color, 1);
|
||||
}
|
||||
|
||||
/* If it is a B pattern, set cutting point. */
|
||||
|
||||
if (pattern->class & CLASS_B) {
|
||||
cutting_points[move] |= color;
|
||||
}
|
||||
else if (!(pattern->class & CLASS_C))
|
||||
return; /* Nothing more to do, up to the helper or autohelper
|
||||
to amalgamate dragons or modify eye space. */
|
||||
|
||||
/* If it is a C pattern, find the dragons to connect.
|
||||
* If it is a B pattern, find eye space points to inhibit connection
|
||||
* through.
|
||||
*/
|
||||
first_dragon = NO_MOVE;
|
||||
second_dragon = NO_MOVE;
|
||||
for (k = 0; k < pattern->patlen; ++k) { /* match each point */
|
||||
/* transform pattern real coordinate */
|
||||
int pos = AFFINE_TRANSFORM(pattern->patn[k].offset, ll, anchor);
|
||||
|
||||
/* Look for dragons to amalgamate. Never amalgamate stones which
|
||||
* can be attacked.
|
||||
*/
|
||||
if ((pattern->class & CLASS_C)
|
||||
&& board[pos] == color
|
||||
&& pattern->patn[k].att == ATT_O
|
||||
&& ((pattern->class & CLASS_s) || attack(pos, NULL) == 0)) {
|
||||
if (first_dragon == NO_MOVE)
|
||||
first_dragon = dragon[pos].origin;
|
||||
else if (second_dragon == NO_MOVE
|
||||
&& dragon[pos].origin != first_dragon) {
|
||||
second_dragon = dragon[pos].origin;
|
||||
/* A second dragon found, we amalgamate them at once. */
|
||||
/* Want this output if verbose or DEBUG_DRAGONS is on. */
|
||||
if (verbose || (debug & DEBUG_DRAGONS))
|
||||
gprintf("Pattern %s joins %C dragons %1m, %1m\n",
|
||||
pattern->name, color, first_dragon, second_dragon);
|
||||
join_dragons(second_dragon, first_dragon);
|
||||
/* Now look for another second dragon. */
|
||||
second_dragon = NO_MOVE;
|
||||
first_dragon = dragon[pos].origin;
|
||||
}
|
||||
}
|
||||
|
||||
/* Inhibit connections */
|
||||
if (pattern->class & CLASS_B) {
|
||||
if (pattern->patn[k].att != ATT_not)
|
||||
break; /* The inhibition points are guaranteed to come first. */
|
||||
cutting_points[pos] |= color;
|
||||
DEBUG(DEBUG_DRAGONS, "inhibiting connection at %1m\n", pos);
|
||||
}
|
||||
} /* loop over elements */
|
||||
}
|
||||
|
||||
|
||||
/* Only consider B patterns. */
|
||||
static void
|
||||
cut_callback(int anchor, int color, struct pattern *pattern, int ll,
|
||||
void *data)
|
||||
{
|
||||
if (pattern->class & CLASS_B)
|
||||
cut_connect_callback(anchor, color, pattern, ll, data);
|
||||
}
|
||||
|
||||
|
||||
/* Consider C patterns and those without classification. */
|
||||
static void
|
||||
conn_callback(int anchor, int color, struct pattern *pattern, int ll,
|
||||
void *data)
|
||||
{
|
||||
if (!(pattern->class & CLASS_B))
|
||||
cut_connect_callback(anchor, color, pattern, ll, data);
|
||||
}
|
||||
|
||||
/* Find cutting points which should inhibit amalgamations and sever
|
||||
* the adjacent eye space.
|
||||
*/
|
||||
void
|
||||
find_cuts(void)
|
||||
{
|
||||
matchpat(cut_callback, ANCHOR_COLOR, &conn_db, NULL, NULL);
|
||||
}
|
||||
|
||||
/* Find explicit connection patterns and amalgamate the involved dragons. */
|
||||
void
|
||||
find_connections(void)
|
||||
{
|
||||
matchpat(conn_callback, ANCHOR_COLOR, &conn_db, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
402
gnugo/patterns/defense.db
Normal file
402
gnugo/patterns/defense.db
Normal file
@ -0,0 +1,402 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING #
|
||||
# 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 02111, USA #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# defense.db - pattern database for finding tactical defense moves
|
||||
#
|
||||
# The tactical reading functions try to defend by playing on the
|
||||
# immediate liberties only. This database is intended to find
|
||||
# additional defense moves. Notice though that these patterns doesn't
|
||||
# help the tactical reading to find defense moves later in a move
|
||||
# sequence but only at stackp=0.
|
||||
#
|
||||
# See patterns.db for a specification of the current database format.
|
||||
#
|
||||
# Since these patterns are matched during make_worms() it doesn't
|
||||
# make any sense to use classifications such as X and O. No other
|
||||
# classification than D is useful either since we only have tactical
|
||||
# defense moves here.
|
||||
#
|
||||
# The semantics of these patterns are that the move at * is tried
|
||||
# as a defense for each attackable O string in the pattern.
|
||||
# The patterns are matched with either player as O.
|
||||
#
|
||||
# FIXME: There are still some redundant patterns.
|
||||
#
|
||||
##################################################################
|
||||
|
||||
|
||||
attribute_map none
|
||||
|
||||
goal_elements none
|
||||
callback_data O
|
||||
|
||||
|
||||
Pattern Def1
|
||||
|
||||
X*
|
||||
Ox
|
||||
|
||||
:8,D
|
||||
|
||||
X*
|
||||
Ox
|
||||
|
||||
;olib(*)>1
|
||||
|
||||
|
||||
Pattern Def2
|
||||
# Require that the common tesuji at b doesn't invalidate this defense move.
|
||||
|
||||
O.*
|
||||
O..
|
||||
|
||||
:8,D
|
||||
|
||||
a.*
|
||||
a.b
|
||||
|
||||
;attack(a) && oplay_defend(*,b,a)
|
||||
|
||||
|
||||
Pattern Def4
|
||||
|
||||
XOO? capture one stone
|
||||
OX..
|
||||
O.*?
|
||||
?.??
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def5
|
||||
|
||||
OXoO connect under
|
||||
O*..
|
||||
....
|
||||
----
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def6
|
||||
|
||||
OXXO connect under (the connection may or may not be broken)
|
||||
O.*.
|
||||
....
|
||||
----
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def9
|
||||
|
||||
OX*O cut!
|
||||
.OX?
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def10
|
||||
|
||||
XO? connection pattern
|
||||
*.O
|
||||
?.?
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def12
|
||||
|
||||
?O*X
|
||||
o.XO
|
||||
?O.X
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def16
|
||||
|
||||
-----
|
||||
...O?
|
||||
*.OXO
|
||||
XO.X?
|
||||
?XX??
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def17
|
||||
|
||||
+----
|
||||
|.*oo
|
||||
|O.o? defend with good eye shape
|
||||
|XOOo
|
||||
|XX??
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def21
|
||||
|
||||
|oOO
|
||||
|.X.
|
||||
|.OX
|
||||
|*XO
|
||||
|.O? capture to connect
|
||||
|
||||
:8,D
|
||||
|
||||
|oaa
|
||||
|.X.
|
||||
|.OX
|
||||
|*XO
|
||||
|.O?
|
||||
|
||||
;lib(a)>2
|
||||
|
||||
|
||||
Pattern Def25
|
||||
|
||||
?XO threaten to capture
|
||||
?OX
|
||||
..*
|
||||
?O.
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def26
|
||||
|
||||
O.O? Bamboo joint for defense
|
||||
O.*?
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def28
|
||||
|
||||
?O?
|
||||
Ox* defend with eye shape
|
||||
?O?
|
||||
|
||||
:-,D
|
||||
|
||||
|
||||
Pattern Def29
|
||||
|
||||
?X? make shape
|
||||
.O.
|
||||
...
|
||||
.*.
|
||||
?.?
|
||||
|
||||
:|,D
|
||||
|
||||
|
||||
Pattern Def39
|
||||
|
||||
?X?.?? jump under
|
||||
O..*.?
|
||||
O....?
|
||||
o....?
|
||||
------
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def44
|
||||
|
||||
??Xx?
|
||||
XXO*. override solid connection
|
||||
OO...
|
||||
.....
|
||||
-----
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def45
|
||||
|
||||
OOXX push to capture X
|
||||
.XO*
|
||||
....
|
||||
----
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def49
|
||||
|
||||
??X?
|
||||
O*.X Draw back to defend connection
|
||||
..OX
|
||||
....
|
||||
----
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def50
|
||||
|
||||
??o? hanging connection
|
||||
?O.*
|
||||
XXO.
|
||||
----
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def52
|
||||
|
||||
??????
|
||||
?....x jump into empty space
|
||||
?.*.OO
|
||||
?....x
|
||||
??????
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def55
|
||||
# Not on edge
|
||||
|
||||
ooo
|
||||
O.O form eye to protect
|
||||
.*X
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def56
|
||||
|
||||
xXO extend after hane
|
||||
XO.
|
||||
.*.
|
||||
...
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def57
|
||||
|
||||
..O
|
||||
o*X
|
||||
..O
|
||||
|
||||
:-,D
|
||||
|
||||
|
||||
Pattern Def58
|
||||
|
||||
?????
|
||||
....? jump! (But not down to second line)
|
||||
O.*.?
|
||||
....?
|
||||
X...?
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def59
|
||||
|
||||
.... jump!
|
||||
O.*.
|
||||
....
|
||||
X.X.
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def60
|
||||
|
||||
OXO block opponent
|
||||
.*.
|
||||
?.?
|
||||
|
||||
:|,D
|
||||
|
||||
|
||||
Pattern Def61
|
||||
|
||||
?.? extend to defend
|
||||
.*.
|
||||
XO?
|
||||
X.?
|
||||
XO?
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def62
|
||||
|
||||
oOo? attach
|
||||
...?
|
||||
.*X.
|
||||
...?
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def63
|
||||
|
||||
O.Oo
|
||||
XO.. protect by drawing back
|
||||
XX*O
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def68
|
||||
|
||||
o.X? try to defend by clamping to connect
|
||||
OX*O
|
||||
....
|
||||
----
|
||||
|
||||
:8,D
|
||||
|
||||
|
||||
Pattern Def69
|
||||
|
||||
OX* atari on opponent to defend
|
||||
?O.
|
||||
|
||||
:8,D
|
||||
|
||||
aC*
|
||||
?b.
|
||||
|
||||
;lib(a)>1 && lib(b)>1 && lib(C)<=2 && olib(*)>1
|
||||
|
||||
|
||||
Pattern Def70
|
||||
# pp New Pattern - see endgame:860 (3.5.1)
|
||||
|
||||
OOOO* a very specific position (defend the stone on the first line)
|
||||
O....
|
||||
XO...
|
||||
-----
|
||||
|
||||
:8,D
|
||||
|
231
gnugo/patterns/dfa-mkpat.h
Normal file
231
gnugo/patterns/dfa-mkpat.h
Normal file
@ -0,0 +1,231 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _DFA_MKPAT_H_
|
||||
#define _DFA_MKPAT_H_
|
||||
|
||||
#include "dfa.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
/********************************
|
||||
* Parameters *
|
||||
********************************/
|
||||
|
||||
#define DFA_RESIZE_STEP 20000
|
||||
#define DFA_INIT_SIZE 250
|
||||
|
||||
/********************************
|
||||
* Data types definition *
|
||||
********************************/
|
||||
|
||||
/* Intersections. */
|
||||
typedef unsigned short Intersection_t;
|
||||
|
||||
/* Attribute list. */
|
||||
typedef struct attrib
|
||||
{
|
||||
int val;
|
||||
int next;
|
||||
} attrib_t;
|
||||
|
||||
|
||||
/* DFA state. */
|
||||
typedef struct state
|
||||
{
|
||||
int att;
|
||||
int next[4];
|
||||
} state_t;
|
||||
|
||||
|
||||
/* DFA. */
|
||||
typedef struct dfa
|
||||
{
|
||||
/* File header. */
|
||||
char name[80];
|
||||
|
||||
/* Transition graph. */
|
||||
state_t *states;
|
||||
int max_states;
|
||||
int last_state;
|
||||
|
||||
/* Attributes sets. */
|
||||
attrib_t *indexes;
|
||||
int max_indexes;
|
||||
int last_index;
|
||||
} dfa_t;
|
||||
|
||||
|
||||
/********************************
|
||||
* Functions declaration *
|
||||
********************************/
|
||||
|
||||
void dfa_init(void); /* Every call to a DFA function must be done */
|
||||
void dfa_end(void); /* between calls to these two functions. */
|
||||
|
||||
/* Basic DFA manipulation. */
|
||||
void print_c_dfa(FILE *of, const char *name, dfa_t *pdfa);
|
||||
void new_dfa(dfa_t *pdfa, const char *name);
|
||||
void copy_dfa(dfa_t *p_to, dfa_t *p_from);
|
||||
void kill_dfa(dfa_t *pdfa);
|
||||
int dfa_size(dfa_t *pdfa); /* in kB */
|
||||
void save_dfa(const char *f_name, dfa_t *pdfa);
|
||||
dfa_t *load_dfa(const char *f_path, const char *f_name, dfa_t **ppdfa);
|
||||
void dfa_finalize(dfa_t *pdfa);
|
||||
void dfa_shuffle(dfa_t *pdfa);
|
||||
int dfa_calculate_max_matched_patterns(dfa_t *pdfa);
|
||||
int dfa_minmax_delta(dfa_t *pdfa, int next_index, int isMin);
|
||||
void dump_dfa(FILE *f, dfa_t *pdfa);
|
||||
|
||||
struct pattern;
|
||||
|
||||
/* Conversion between a GNU Go pattern struct into a DFA string. */
|
||||
void pattern_2_string(struct pattern *pat, struct patval_b *elements,
|
||||
char *str, int ci, int cj);
|
||||
void dfa_rotate_string(char *strrot, const char *str, int ll);
|
||||
|
||||
/* Add a string with attribute `att_val' into a DFA. */
|
||||
float dfa_add_string(dfa_t *pdfa, const char *str, int pattern_index, int ll);
|
||||
|
||||
|
||||
/********************************
|
||||
* Global variables *
|
||||
********************************/
|
||||
|
||||
extern int dfa_verbose; /* Verbiage level. */
|
||||
|
||||
|
||||
/**************************************
|
||||
* Experimental DFA builder *
|
||||
**************************************/
|
||||
|
||||
#define DFA_ATTRIB_BLOCK_SIZE 150000
|
||||
#define DFA_NODE_BLOCK_SIZE 50000
|
||||
|
||||
typedef struct _dfa_attrib dfa_attrib;
|
||||
typedef struct _dfa_attrib_block dfa_attrib_block;
|
||||
typedef struct _dfa_attrib_array dfa_attrib_array;
|
||||
typedef struct _dfa_node dfa_node;
|
||||
typedef struct _dfa_node_block dfa_node_block;
|
||||
typedef struct _dfa_graph dfa_graph;
|
||||
|
||||
struct _dfa_attrib {
|
||||
dfa_attrib *next;
|
||||
int string_index;
|
||||
};
|
||||
|
||||
struct _dfa_attrib_block {
|
||||
dfa_attrib_block *previous;
|
||||
dfa_attrib attrib[DFA_ATTRIB_BLOCK_SIZE];
|
||||
};
|
||||
|
||||
struct _dfa_attrib_array {
|
||||
dfa_attrib_block *last_block;
|
||||
int allocated;
|
||||
};
|
||||
|
||||
struct _dfa_node {
|
||||
dfa_node *branch[4];
|
||||
dfa_attrib *attributes;
|
||||
dfa_attrib *passing_strings;
|
||||
};
|
||||
|
||||
struct _dfa_node_block {
|
||||
dfa_node_block *previous;
|
||||
dfa_node node[DFA_NODE_BLOCK_SIZE];
|
||||
};
|
||||
|
||||
struct _dfa_graph {
|
||||
int num_nodes;
|
||||
dfa_node *root;
|
||||
dfa_node_block *last_block;
|
||||
int allocated;
|
||||
dfa_attrib_array attributes;
|
||||
};
|
||||
|
||||
|
||||
#define DFA_HASH_BLOCK_SIZE 10000
|
||||
|
||||
#define DFA_HASH_TABLE_SIZE 4096
|
||||
#define DFA_HASH_VALUE_1 1
|
||||
#define DFA_HASH_VALUE_2 79
|
||||
#define DFA_HASH_VALUE_3 2971
|
||||
|
||||
typedef struct _dfa_hash_entry dfa_hash_entry;
|
||||
typedef struct _dfa_hash_block dfa_hash_block;
|
||||
|
||||
struct _dfa_hash_entry {
|
||||
dfa_hash_entry *next;
|
||||
dfa_attrib *key;
|
||||
dfa_node *value;
|
||||
};
|
||||
|
||||
struct _dfa_hash_block {
|
||||
dfa_hash_block *previous;
|
||||
dfa_hash_entry entry[DFA_HASH_BLOCK_SIZE];
|
||||
};
|
||||
|
||||
|
||||
typedef struct _dfa_pattern dfa_pattern;
|
||||
typedef struct _dfa_patterns dfa_patterns;
|
||||
|
||||
struct _dfa_pattern {
|
||||
dfa_pattern *next;
|
||||
int num_variations;
|
||||
int current_variation;
|
||||
char *variation[8];
|
||||
};
|
||||
|
||||
struct _dfa_patterns {
|
||||
int num_patterns;
|
||||
dfa_pattern *patterns;
|
||||
dfa_pattern *last_pattern;
|
||||
dfa_graph graph;
|
||||
};
|
||||
|
||||
|
||||
void dfa_graph_reset(dfa_graph *graph);
|
||||
|
||||
void dfa_patterns_reset(dfa_patterns *patterns);
|
||||
void dfa_patterns_clear(dfa_patterns *patterns);
|
||||
void dfa_patterns_add_pattern(dfa_patterns *patterns,
|
||||
const char *string, int index);
|
||||
void dfa_patterns_set_last_pattern_variation(dfa_patterns *patterns,
|
||||
int variation);
|
||||
void dfa_patterns_select_shortest_variation(dfa_patterns *patterns);
|
||||
void dfa_patterns_build_graph(dfa_patterns *patterns);
|
||||
int *dfa_patterns_optimize_variations(dfa_patterns *patterns, int iterations);
|
||||
|
||||
|
||||
#endif /* _DFA_MKPAT_H_ */
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
1930
gnugo/patterns/dfa.c
Normal file
1930
gnugo/patterns/dfa.c
Normal file
File diff suppressed because it is too large
Load Diff
104
gnugo/patterns/dfa.dsp
Normal file
104
gnugo/patterns/dfa.dsp
Normal file
@ -0,0 +1,104 @@
|
||||
# Microsoft Developer Studio Project File - Name="dfa" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=dfa - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "dfa.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "dfa.mak" CFG="dfa - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "dfa - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "dfa - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "dfa - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "dfa___Win32_Release"
|
||||
# PROP BASE Intermediate_Dir "dfa___Win32_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /GX /Zi /O2 /I ".." /I "../sgf" /I "../engine" /I "../utils" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "HAVE_CONFIG_H" /Fd"Release/dfa" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "dfa - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "dfa___Win32_Debug"
|
||||
# PROP BASE Intermediate_Dir "dfa___Win32_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /W2 /Gm /GX /Zi /Od /I ".." /I "../sgf" /I "../engine" /I "../utils" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "HAVE_CONFIG_H" /FR /Fd"Debug/dfa" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "dfa - Win32 Release"
|
||||
# Name "dfa - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dfa.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\transform.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dfa.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
95
gnugo/patterns/dfa.h
Normal file
95
gnugo/patterns/dfa.h
Normal file
@ -0,0 +1,95 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef _DFA_H_
|
||||
#define _DFA_H_
|
||||
|
||||
#if MAX_BOARD > 11
|
||||
#define DFA_MAX_BOARD MAX_BOARD
|
||||
#else
|
||||
#define DFA_MAX_BOARD 11
|
||||
#endif
|
||||
#define DFA_MAX_ORDER ((2 * DFA_MAX_BOARD - 1) \
|
||||
* (2 * DFA_MAX_BOARD - 1))
|
||||
#define DFA_BASE (3 * DFA_MAX_BOARD)
|
||||
#define DFA_POS(i, j) (((i) + DFA_MAX_BOARD) * DFA_BASE \
|
||||
+ ((j) + DFA_MAX_BOARD))
|
||||
|
||||
#ifndef EMPTY
|
||||
#define EMPTY 0 /* . */
|
||||
#define WHITE 1 /* O */
|
||||
#define BLACK 2 /* X */
|
||||
#endif
|
||||
#define OUT_BOARD 3 /* # */
|
||||
|
||||
|
||||
/* Maximum pattern matched at one positions. */
|
||||
#define DFA_MAX_MATCHED (8 * 24)
|
||||
|
||||
|
||||
/* DFA spiral order. */
|
||||
extern int spiral[DFA_MAX_ORDER][8];
|
||||
|
||||
void build_spiral_order(void);
|
||||
|
||||
|
||||
/* The run-time data structures declared here are different from those
|
||||
* used internally to build the DFA. */
|
||||
|
||||
/* Attribute list. */
|
||||
typedef struct attrib_rt
|
||||
{
|
||||
short val;
|
||||
short next;
|
||||
} attrib_rt_t;
|
||||
|
||||
/* DFA state. */
|
||||
typedef struct state_rt
|
||||
{
|
||||
short next[4];
|
||||
short att;
|
||||
} state_rt_t;
|
||||
|
||||
typedef struct dfa_rt
|
||||
{
|
||||
/* File header. */
|
||||
const char name[80];
|
||||
|
||||
/* Transition graph. */
|
||||
const state_rt_t *states;
|
||||
|
||||
/* Attributes sets. */
|
||||
const attrib_rt_t *indexes;
|
||||
} dfa_rt_t;
|
||||
|
||||
|
||||
|
||||
#endif /* _DFA_H_ */
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
1770
gnugo/patterns/endgame.db
Normal file
1770
gnugo/patterns/endgame.db
Normal file
File diff suppressed because it is too large
Load Diff
1711
gnugo/patterns/extract_fuseki.c
Normal file
1711
gnugo/patterns/extract_fuseki.c
Normal file
File diff suppressed because it is too large
Load Diff
6482
gnugo/patterns/eyes.db
Normal file
6482
gnugo/patterns/eyes.db
Normal file
File diff suppressed because it is too large
Load Diff
73
gnugo/patterns/eyes.h
Normal file
73
gnugo/patterns/eyes.h
Normal file
@ -0,0 +1,73 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include "liberty.h"
|
||||
|
||||
|
||||
#define CAN_BE_EMPTY 1
|
||||
#define CAN_CONTAIN_STONE 2
|
||||
#define EYE_DEFENSE_POINT 4
|
||||
#define EYE_ATTACK_POINT 8
|
||||
|
||||
/*
|
||||
* The vertices of each eye are defined by an array of struct eye_vertex.
|
||||
*/
|
||||
|
||||
struct eye_vertex {
|
||||
signed char marginal; /* 1 if marginal vertex, 0 otherwise */
|
||||
signed char edge; /* 0 = center, 1 = edge, 2 = corner */
|
||||
/* A corner vertex may only be matched at the corner.
|
||||
* An edge vertex may be matched at the corner or on the edge.
|
||||
* A center vertex may be matched anywhere.
|
||||
*/
|
||||
signed char flags; /* see the #defines above */
|
||||
|
||||
signed char neighbors; /* number of neighbors */
|
||||
signed char n[4]; /* position in array of vertex neighbors */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Each eye is described by one struct eye_graph and the vertices
|
||||
* in the struct eye_vertex array.
|
||||
*/
|
||||
|
||||
struct eye_graph {
|
||||
struct eye_vertex *vertex;
|
||||
int patnum; /* number of pattern */
|
||||
int esize; /* number of vertices */
|
||||
int msize; /* number of marginal vertices */
|
||||
int ends; /* number of vertices with one neighbor */
|
||||
int two_neighbors; /* number of vertices with 2 neighbors */
|
||||
int three_neighbors; /* number of vertices with 3 neighbors */
|
||||
struct eyevalue value; /* eye value */
|
||||
};
|
||||
|
||||
extern struct eye_graph graphs[];
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
2891
gnugo/patterns/fuseki.db
Normal file
2891
gnugo/patterns/fuseki.db
Normal file
File diff suppressed because it is too large
Load Diff
105
gnugo/patterns/fuseki.dsp
Normal file
105
gnugo/patterns/fuseki.dsp
Normal file
@ -0,0 +1,105 @@
|
||||
# Microsoft Developer Studio Project File - Name="fuseki" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=fuseki - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "fuseki.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "fuseki.mak" CFG="fuseki - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "fuseki - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "fuseki - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "fuseki - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "fuseki___Win32_Release"
|
||||
# PROP BASE Intermediate_Dir "fuseki___Win32_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /W3 /GX /O2 /I "." /I ".." /I "../sgf" /I "../engine" /I "../utils" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /FD /c
|
||||
# SUBTRACT CPP /nologo /YX
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 sgf.lib engine.lib utils.lib /nologo /subsystem:console /machine:I386 /out:"Release/extract_fuseki.exe" /libpath:"../sgf/Release/" /libpath:"../engine/Release/" /libpath:"../utils/Release/" /libpath:"./Release/"
|
||||
|
||||
!ELSEIF "$(CFG)" == "fuseki - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "fuseki___Win32_Debug"
|
||||
# PROP BASE Intermediate_Dir "fuseki___Win32_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /W3 /Gm /GX /Zi /Od /I "." /I ".." /I "../sgf" /I "../engine" /I "../utils" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /FR /FD /GZ /c
|
||||
# SUBTRACT CPP /nologo /YX
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /out:"Debug/extract_fuseki.exe" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /incremental:no /nodefaultlib
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "fuseki - Win32 Release"
|
||||
# Name "fuseki - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\extract_fuseki.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
864
gnugo/patterns/fuseki13.dbz
Normal file
864
gnugo/patterns/fuseki13.dbz
Normal file
@ -0,0 +1,864 @@
|
||||
F-H0-1 93 dj
|
||||
F-H0-2 80 jc
|
||||
F-H0-3 29 kc
|
||||
F-H0-4 9 gg
|
||||
F-H0-5 5 ek
|
||||
F-H0-6 2 id
|
||||
F-H0-7 1 df
|
||||
F-H0-8 27 djkd
|
||||
F-H0-9 15 kdjk
|
||||
F-H0-10 12 ckjc
|
||||
F-H0-11 12 djkj
|
||||
F-H0-12 7 jijk
|
||||
F-H0-13 5 djjk
|
||||
F-H0-14 4 cckd
|
||||
F-H0-15 4 kdcj
|
||||
F-H0-16 4 kjkd
|
||||
F-H0-17 4 kkkd
|
||||
F-H0-18 3 kddk
|
||||
F-H0-19 3 ggjc
|
||||
F-H0-20 3 eckd
|
||||
F-H0-21 3 ikkj
|
||||
F-H0-22 2 jijc
|
||||
F-H0-23 1 cejc
|
||||
F-H0-24 1 jkjc
|
||||
F-H0-25 1 jckd
|
||||
F-H0-26 1 kikd
|
||||
F-H0-27 1 ijcd
|
||||
F-H0-28 24 cjjd
|
||||
F-H0-29 22 djjd
|
||||
F-H0-30 14 jddd
|
||||
F-H0-31 13 jkdj
|
||||
F-H0-32 7 ckjd
|
||||
F-H0-33 4 cjjj
|
||||
F-H0-34 3 iddj
|
||||
F-H0-35 3 kfjd
|
||||
F-H0-36 3 ekjd
|
||||
F-H0-37 2 kcjj
|
||||
F-H0-38 1 kdjd
|
||||
F-H0-39 1 dejd
|
||||
F-H0-40 1 dedj
|
||||
F-H0-41 1 ggjd
|
||||
F-H0-42 1 kcjd
|
||||
F-H0-43 15 jkdjkd
|
||||
F-H0-44 7 dkddkj
|
||||
F-H0-45 5 ddjddk
|
||||
F-H0-46 5 cddjkd
|
||||
F-H0-47 2 icdjkd
|
||||
F-H0-48 2 kkdjkd
|
||||
F-H0-49 2 dddjjc
|
||||
F-H0-50 1 ggdjjc
|
||||
F-H0-51 1 kkjdcj
|
||||
F-H0-52 1 fkdjkd
|
||||
F-H0-53 1 ijdjjc
|
||||
F-H0-54 6 kjgg
|
||||
F-H0-55 5 ddgg
|
||||
F-H0-56 3 ckgg
|
||||
F-H0-57 2 kegg
|
||||
F-H0-58 1 jggg
|
||||
F-H0-59 1 kfgg
|
||||
F-H0-60 1 kggg
|
||||
F-H0-61 1 jegg
|
||||
F-H0-62 14 jkdjjd
|
||||
F-H0-63 13 djddjj
|
||||
F-H0-64 5 jkjddj
|
||||
F-H0-65 2 ikdjjd
|
||||
F-H0-66 2 jijddj
|
||||
F-H0-67 1 jgdjjd
|
||||
F-H0-68 1 khjjdd
|
||||
F-H0-69 1 kcjddj
|
||||
F-H0-70 1 kkjddj
|
||||
F-H0-71 1 ggjjdd
|
||||
F-H0-72 4 ekcjgg
|
||||
F-H0-73 3 ijkjgg
|
||||
F-H0-74 1 gkkdgg
|
||||
F-H0-75 1 jkjcgg
|
||||
F-H0-76 1 kckdgg
|
||||
F-H0-77 1 kkkdgg
|
||||
F-H0-78 1 gkkjgg
|
||||
F-H0-79 1 gcjcgg
|
||||
F-H0-80 1 kkjcgg
|
||||
F-H0-81 1 kdkjgg
|
||||
F-H0-82 1 djjcgg
|
||||
F-H0-83 1 jckdgg
|
||||
F-H0-84 1 jjjcgg
|
||||
F-H0-85 6 cdkk
|
||||
F-H0-86 6 djkc
|
||||
F-H0-87 5 kdkk
|
||||
F-H0-88 3 ggkc
|
||||
F-H0-89 2 kccc
|
||||
F-H0-90 2 jdkc
|
||||
F-H0-91 1 ckkc
|
||||
F-H0-92 1 kick
|
||||
F-H0-93 1 jkkc
|
||||
F-H0-94 1 idck
|
||||
F-H0-95 6 ddjkdj
|
||||
F-H0-96 5 cjdcjd
|
||||
F-H0-97 5 ijkjjd
|
||||
F-H0-98 4 dkjcdd
|
||||
F-H0-99 3 jjjcdd
|
||||
F-H0-100 2 kccddj
|
||||
F-H0-101 1 cijcdd
|
||||
F-H0-102 1 dkkdjj
|
||||
F-H0-103 1 kijkdj
|
||||
F-H0-104 1 ikdcjd
|
||||
F-H0-105 5 jjdkjd
|
||||
F-H0-106 5 jjcjjd
|
||||
F-H0-107 5 jkcjjd
|
||||
F-H0-108 3 ekcjjd
|
||||
F-H0-109 3 cjcdjj
|
||||
F-H0-110 2 cccjjd
|
||||
F-H0-111 2 kjdkjd
|
||||
F-H0-112 2 didkjd
|
||||
F-H0-113 2 ckkjdd
|
||||
F-H0-114 2 cedkjd
|
||||
F-H0-115 1 edkddj
|
||||
F-H0-116 3 dcjkdjjd
|
||||
F-H0-117 2 edjkdjjd
|
||||
F-H0-118 2 ccjkdjjd
|
||||
F-H0-119 2 ecjkdjjd
|
||||
F-H0-120 2 ijkjjddj
|
||||
F-H0-121 1 ekjjddcj
|
||||
F-H0-122 1 jjjddjcd
|
||||
F-H0-123 7 jdjjdddj
|
||||
F-H0-124 4 dcjjdjjd
|
||||
F-H0-125 1 kcjjddjd
|
||||
F-H0-126 1 khjjjddj
|
||||
F-H0-127 7 dcjkcj
|
||||
F-H0-128 5 cjdckd
|
||||
F-H0-129 2 dkdckd
|
||||
F-H0-130 2 kkcjdc
|
||||
F-H0-131 2 jjdckd
|
||||
F-H0-132 1 icdckd
|
||||
F-H0-133 1 khkdjk
|
||||
F-H0-134 1 djdckd
|
||||
F-H0-135 3 ejcjjjdc
|
||||
F-H0-136 2 kkkddjdc
|
||||
F-H0-137 2 jjdkjdcd
|
||||
F-H0-138 2 cekddjdc
|
||||
F-H0-139 1 didkjdcd
|
||||
F-H0-140 1 kijkddkd
|
||||
F-H0-141 1 djdkddkj
|
||||
F-H0-142 1 ekjkddkd
|
||||
F-H0-143 1 dkjkddkd
|
||||
F-H0-144 5 cjkdjjdc
|
||||
F-H0-145 2 ddjkdjkd
|
||||
F-H0-146 2 jecddjjc
|
||||
F-H0-147 1 cidkjdkj
|
||||
F-H0-148 1 kjcjjddc
|
||||
F-H0-149 1 ccjkdjkd
|
||||
F-H0-150 1 ejjkddcj
|
||||
F-H0-151 5 dcjjcj
|
||||
F-H0-152 4 ikdjkj
|
||||
F-H0-153 2 cdjjcj
|
||||
F-H0-154 1 ikddkd
|
||||
F-H0-155 1 ckddkd
|
||||
F-H0-156 1 jjdjdc
|
||||
F-H0-157 1 cddjkj
|
||||
F-H0-158 1 jhjjjc
|
||||
F-H0-159 2 didkjddd
|
||||
F-H0-160 2 ikdkjddd
|
||||
F-H0-161 2 ddjjdjjc
|
||||
F-H0-162 1 ijdkjddd
|
||||
F-H0-163 1 dkjkddjd
|
||||
F-H0-164 4 kfjdjjcddj
|
||||
F-H0-165 2 ckdjjjdcjd
|
||||
F-H0-166 2 cedjjjdcjd
|
||||
F-H0-167 1 idkdjjdddj
|
||||
F-H0-168 1 gdjjjdcjdd
|
||||
F-H0-169 1 gkdjjjdcjd
|
||||
F-H0-170 1 fjdjjjdcjd
|
||||
F-H0-171 2 jdddgg
|
||||
F-H0-172 1 gkjdgg
|
||||
F-H0-173 1 gcjdgg
|
||||
F-H0-174 1 jkddgg
|
||||
F-H0-175 1 jcjdgg
|
||||
F-H0-176 1 djjdgg
|
||||
F-H0-177 1 kfjdgg
|
||||
F-H0-178 4 djjjjd
|
||||
F-H0-179 3 jkdddj
|
||||
F-H0-180 2 jjddjd
|
||||
F-H0-181 2 dkjddd
|
||||
F-H0-182 1 ckddjd
|
||||
F-H0-183 1 jcdddj
|
||||
F-H0-184 3 icdjjkdckd
|
||||
F-H0-185 2 cedjjkdckd
|
||||
F-H0-186 1 dedjjkdckd
|
||||
F-H0-187 1 fkkjcddjjc
|
||||
F-H0-188 1 khkdjkddcj
|
||||
F-H0-189 1 hdjkcjjddc
|
||||
F-H0-190 1 ekdjjkdckd
|
||||
F-H0-191 1 jhkdjkddcj
|
||||
F-H0-192 1 idjjkdcjdc
|
||||
F-H0-193 1 jgkjcddjjc
|
||||
F-H0-194 2 cdckkd
|
||||
F-H0-195 2 icckkd
|
||||
F-H0-196 1 jkckkd
|
||||
F-H0-197 1 jdkcdk
|
||||
F-H0-198 1 kkckjc
|
||||
F-H0-199 1 djccjk
|
||||
F-H0-200 1 kekccj
|
||||
F-H0-201 1 dcckkd
|
||||
F-H0-202 1 ekckkd
|
||||
F-H0-203 1 kekkdc
|
||||
F-H0-204 1 ddkcdk
|
||||
F-H0-205 3 dkccjj
|
||||
F-H0-206 3 jjckjd
|
||||
F-H0-207 2 cdckjd
|
||||
F-H0-208 1 djckjd
|
||||
F-H0-209 1 ciccjj
|
||||
F-H0-210 1 kkkcdj
|
||||
F-H0-211 1 jejkdddj
|
||||
F-H0-212 1 djjdjjdc
|
||||
F-H0-213 1 dikjddjd
|
||||
F-H0-214 1 kjdddjjc
|
||||
F-H0-215 3 keggjc
|
||||
F-H0-216 2 jkggkd
|
||||
F-H0-217 2 kjggjc
|
||||
F-H0-218 1 kgggkd
|
||||
F-H0-219 1 kkggjc
|
||||
F-H0-220 3 jcdjjkdd
|
||||
F-H0-221 2 ckjdkjdd
|
||||
F-H0-222 2 cdjjdkjd
|
||||
F-H0-223 1 kgjjdcjd
|
||||
F-H0-224 1 cijdkjdd
|
||||
F-H0-225 1 chjjkddj
|
||||
F-H0-226 2 fkdjjkdcjd
|
||||
F-H0-227 1 fjdjjkdcjd
|
||||
F-H0-228 1 dedjjkdcjd
|
||||
F-H0-229 1 kidjjkdcjd
|
||||
F-H0-230 1 kijjkdcjdd
|
||||
F-H0-231 1 cedjjkdcjd
|
||||
F-H0-232 1 ckdjjkdcjd
|
||||
F-H0-233 1 bddjjkdcjd
|
||||
F-H0-234 1 dfdkjkddkd
|
||||
F-H0-235 1 fcdkjkddkd
|
||||
F-H0-236 1 hcdkjkddkd
|
||||
F-H0-237 1 icdkjkddkd
|
||||
F-H0-238 4 jccdkk
|
||||
F-H0-239 3 ccdkkc
|
||||
F-H0-240 1 ejcjkc
|
||||
F-H0-241 1 ijcjkc
|
||||
F-H0-242 1 ggdkkc
|
||||
F-H0-243 5 jcckkj
|
||||
F-H0-244 2 dckcjk
|
||||
F-H0-245 2 djcckd
|
||||
F-H0-246 1 didkjkddjd
|
||||
F-H0-247 1 chkjkddjdd
|
||||
F-H0-248 1 cidkjkddjd
|
||||
F-H0-249 1 khdkjkddjd
|
||||
F-H0-250 2 ijkjdddjjc
|
||||
F-H0-251 1 kgkdjkdddj
|
||||
F-H0-252 1 jgkdjkdddj
|
||||
F-H0-253 1 kfkjdddjjc
|
||||
F-H0-254 2 jccjjkdc
|
||||
F-H0-255 2 ckjkdckd
|
||||
F-H0-256 1 dicdkjjc
|
||||
F-H0-257 1 jdcjjkdc
|
||||
F-H0-258 1 icjkdckd
|
||||
F-H0-259 1 jhjkdkkdddhc
|
||||
F-H0-260 1 ekjkjdcjcdkh
|
||||
F-H0-261 1 khjkdkkdddhc
|
||||
F-H0-262 1 jijkdkkdddhc
|
||||
F-H0-263 3 cjdcjc
|
||||
F-H0-264 2 dckjkd
|
||||
F-H0-265 1 cejcdc
|
||||
F-H0-266 3 jkdjkc
|
||||
F-H0-267 2 ddjdck
|
||||
F-H0-268 1 kkdjkc
|
||||
F-H0-269 1 dcdjkc
|
||||
F-H0-270 3 hjjijk
|
||||
F-H0-271 2 kejejc
|
||||
F-H0-272 1 jjjejc
|
||||
F-H0-273 1 cgdidk
|
||||
F-H0-274 1 dkcdkkjc
|
||||
F-H0-275 1 kecdkkjc
|
||||
F-H0-276 1 ckjkcckd
|
||||
F-H0-277 1 edkjckjc
|
||||
F-H0-278 1 kjkdckdc
|
||||
F-H0-279 1 bhjkcckd
|
||||
F-H0-280 1 jjkdddic
|
||||
F-H0-281 1 kcikdjkj
|
||||
F-H0-282 1 kjkdddic
|
||||
F-H0-283 1 jikdddic
|
||||
F-H0-284 1 jkcdjdec
|
||||
F-H0-285 1 djkdddic
|
||||
F-H0-286 1 dkekcjgg
|
||||
F-H0-287 1 kgggkdic
|
||||
F-H0-288 1 hdggjcke
|
||||
F-H0-289 1 jeggjcke
|
||||
F-H0-290 4 jcdjkjdd
|
||||
F-H0-291 1 jijddkdd
|
||||
F-H0-292 1 ddjjcjjd
|
||||
F-H0-293 1 ccjjcjjd
|
||||
F-H0-294 2 cjjdkjcd
|
||||
F-H0-295 1 ckjdkjcd
|
||||
F-H0-296 1 kjdkjcdd
|
||||
F-H0-297 1 ekjkdcjd
|
||||
F-H0-298 4 kfjdjjdddj
|
||||
F-H0-299 1 ggjjdjjddd
|
||||
F-H0-300 2 kkcjdcjd
|
||||
F-H0-301 2 jdjkcjdd
|
||||
F-H0-302 1 chdjcdjc
|
||||
F-H0-303 1 kicjdcjd
|
||||
F-H0-304 2 gjjjjddjddkf
|
||||
F-H0-305 1 dcjjdjjdddfc
|
||||
F-H0-306 1 fifkdjjjddjd
|
||||
F-H0-307 1 ebjjdjjdddfc
|
||||
F-H0-308 1 kkjjdjjdddfc
|
||||
F-H0-309 1 hdggkc
|
||||
F-H0-310 1 ccggkc
|
||||
F-H0-311 1 ckggkc
|
||||
F-H0-312 4 ecdkjjcdjd
|
||||
F-H0-313 1 jkcjjjdcjd
|
||||
F-H0-314 1 cecjjjdcjd
|
||||
F-H0-315 1 kcicgg
|
||||
F-H0-316 1 kdicgg
|
||||
F-H0-317 1 jjicgg
|
||||
F-H0-318 1 gckegg
|
||||
F-H0-319 1 dkjjjcgg
|
||||
F-H0-320 1 ekjjjcgg
|
||||
F-H0-321 2 djkkkd
|
||||
F-H0-322 2 kjccjc
|
||||
F-H0-323 1 jcckjk
|
||||
F-H0-324 1 cjkkkd
|
||||
F-H0-325 1 cddkkd
|
||||
F-H0-326 1 ickddk
|
||||
F-H0-327 1 cckddk
|
||||
F-H0-328 1 cdcjjc
|
||||
F-H0-329 1 kicdjk
|
||||
F-H0-330 1 jjdkkd
|
||||
F-H0-331 3 kkkddjic
|
||||
F-H0-332 2 kjkddjic
|
||||
F-H0-333 1 jjkddjic
|
||||
F-H0-334 1 ddkjggjc
|
||||
F-H0-335 1 kekjggjc
|
||||
F-H0-336 1 dcjkggkd
|
||||
F-H0-337 1 djkjggjc
|
||||
F-H0-338 1 ckjkggkd
|
||||
F-H0-339 2 dedkjkdcjd
|
||||
F-H0-340 1 ekkjjdcjcd
|
||||
F-H0-341 1 chkjjdcjcd
|
||||
F-H0-342 1 ejkjjdcjcd
|
||||
F-H0-343 1 cdjkkddj
|
||||
F-H0-344 1 khjjdckd
|
||||
F-H0-345 1 icjjdckd
|
||||
F-H0-346 1 hckjdkjd
|
||||
F-H0-347 1 ckjjdckd
|
||||
F-H0-348 1 dddkjjjcgg
|
||||
F-H0-349 1 dckjdjjd
|
||||
F-H0-350 1 ddkjdjjd
|
||||
F-H0-351 1 ckjjddkd
|
||||
F-H0-352 1 cejkjddj
|
||||
F-H0-353 1 didkddjj
|
||||
F-H0-354 1 kcggkdjc
|
||||
F-H0-355 3 cjjkkddc
|
||||
F-H0-356 1 iccjdckd
|
||||
F-H0-357 1 kkcjdckd
|
||||
F-H0-358 1 cijjdkggjcdd
|
||||
F-H0-359 1 gdcidkjdkjdd
|
||||
F-H0-360 1 gjekcjjjdcjd
|
||||
F-H0-361 1 ijikkjdjjcdd
|
||||
F-H0-362 1 gkikkjdjjcdd
|
||||
F-H0-363 1 dcjjdkjdcdec
|
||||
F-H0-364 2 jjggddjd
|
||||
F-H0-365 1 gcjjjdgg
|
||||
F-H0-366 2 jddjjk
|
||||
F-H0-367 1 dcjjkd
|
||||
F-H0-368 1 jjjddc
|
||||
F-H0-369 1 ikddjc
|
||||
F-H0-370 1 hcdkjjciggjcdd
|
||||
F-H0-371 1 cidkjjkeggjcdd
|
||||
F-H0-372 1 cgdkjjciggjcdd
|
||||
F-H0-373 2 dckdcj
|
||||
F-H0-374 2 jdcdkj
|
||||
F-H0-375 1 jkdkjc
|
||||
F-H0-376 1 kkdckc
|
||||
F-H0-377 1 jjcjcc
|
||||
F-H0-378 1 ckdckc
|
||||
F-H0-379 1 dkkjkc
|
||||
F-H0-380 1 djkdkk
|
||||
F-H0-381 2 kjjddkcd
|
||||
F-H0-382 1 ccjkcjjd
|
||||
F-H0-383 1 iddkkjdd
|
||||
F-H0-384 1 jdjjdccj
|
||||
F-H0-385 2 cjek
|
||||
F-H0-386 2 dcke
|
||||
F-H0-387 1 djic
|
||||
F-H0-388 1 ldkcggjckd
|
||||
F-H0-389 1 jdkdggkcjc
|
||||
F-H0-390 2 kjkddjcd
|
||||
F-H0-391 1 cckjjdcj
|
||||
F-H0-392 1 edjkdjjc
|
||||
F-H0-393 1 jdcjjj
|
||||
F-H0-394 1 djjkjd
|
||||
F-H0-395 1 kdjcjj
|
||||
F-H0-396 1 jijkjd
|
||||
F-H0-397 1 ikkjdj
|
||||
F-H0-398 2 chjjjddjcd
|
||||
F-H0-399 1 fcdjjkddjd
|
||||
F-H0-400 1 khdjjkddjd
|
||||
F-H0-401 1 jedjjjddjc
|
||||
F-H0-402 2 cededcjd
|
||||
F-H0-403 1 jkijkjjd
|
||||
F-H0-404 1 gddedcjd
|
||||
F-H0-405 1 kgdjjkji
|
||||
F-H0-406 1 gcickd
|
||||
F-H0-407 1 iiikkj
|
||||
F-H0-408 1 jfickd
|
||||
F-H0-409 1 jkickd
|
||||
F-H0-410 1 gkjjdjkddchc
|
||||
F-H0-411 1 cfkfkjdddjjc
|
||||
F-H0-412 1 kgkeggjc
|
||||
F-H0-413 1 kjkdggic
|
||||
F-H0-414 1 kgkdggic
|
||||
F-H0-415 2 djjjggddjd
|
||||
F-H0-416 1 kcjjdkjdcd
|
||||
F-H0-417 1 edjjdkjdcd
|
||||
F-H0-418 1 ckdjjkddkd
|
||||
F-H0-419 1 cidjjkddkd
|
||||
F-H0-420 1 ikkkjddjcd
|
||||
F-H0-421 1 fkdjjkccjd
|
||||
F-H0-422 1 dddjjkccjd
|
||||
F-H0-423 1 ckkkjddjcd
|
||||
F-H0-424 1 chkjkddjcd
|
||||
F-H0-425 1 cedjjkdcjc
|
||||
F-H0-426 1 gkdkjkddjc
|
||||
F-H0-427 1 kfdkjkddjc
|
||||
F-H0-428 1 dhfkdjjjdcjd
|
||||
F-H0-429 1 khjjjddjcdkf
|
||||
F-H0-430 1 jhkhjjjdcjdd
|
||||
F-H0-431 1 cffkdjjjdcjd
|
||||
F-H0-432 1 echcjd
|
||||
F-H0-433 1 jhkhjj
|
||||
F-H0-434 1 ddkfjd
|
||||
F-H0-435 1 djkfjd
|
||||
F-H0-436 2 ckkdkjdc
|
||||
F-H0-437 1 dkkdkjdc
|
||||
F-H0-438 2 dcdjjkjd
|
||||
F-H0-439 1 cfjjjcdd
|
||||
F-H0-440 1 cjjjjcdd
|
||||
F-H0-441 1 kijkdjkddcic
|
||||
F-H0-442 1 hkjkdjkddcic
|
||||
F-H0-443 1 jijkdjkddcic
|
||||
F-H0-444 2 jkeckd
|
||||
F-H0-445 1 kckejk
|
||||
F-H0-446 2 kgdjjjggddjd
|
||||
F-H0-447 1 hkjjdjggjddd
|
||||
F-H0-448 1 chjjdjggjddd
|
||||
F-H0-449 1 ichdggkc
|
||||
F-H0-450 1 kehdggkc
|
||||
F-H0-451 1 jdjfggkc
|
||||
F-H0-452 1 gcjfggkc
|
||||
F-H0-453 2 khijkjgg
|
||||
F-H0-454 1 keggjcje
|
||||
F-H0-455 2 dkkkcdjc
|
||||
F-H0-456 1 kijkcjkc
|
||||
F-H0-457 3 dddjjjjd
|
||||
F-H0-458 1 chdjddjd
|
||||
F-H0-459 1 kikgggkdic
|
||||
F-H0-460 1 ddjcgggcke
|
||||
F-H0-461 1 ikkjkcdd
|
||||
F-H0-462 1 jkcjccjd
|
||||
F-H0-463 1 ccdjkkkd
|
||||
F-H0-464 1 djckjdkjdd
|
||||
F-H0-465 1 gfkdjjccdj
|
||||
F-H0-466 1 kecdjjkcdj
|
||||
F-H0-467 2 cddjjkecjd
|
||||
F-H0-468 1 fkdjjkecjd
|
||||
F-H0-469 1 bcdjjjcgcedcjd
|
||||
F-H0-470 1 eedjjjcgcedcjd
|
||||
F-H0-471 2 cidkccjj
|
||||
F-H0-472 1 dckjckjd
|
||||
F-H0-473 1 fidkjkcididdjd
|
||||
F-H0-474 1 chdkjkcididdjd
|
||||
F-H0-475 1 cjdkjkcididdjd
|
||||
F-H0-476 1 cihkjkdkkhddjd
|
||||
F-H0-477 1 chhkjkdkkhddjd
|
||||
F-H0-478 1 fkhkjkdkkhddjd
|
||||
F-H0-479 1 fkjjdjjgdcjd
|
||||
F-H0-480 1 ekjdjjgdcjdd
|
||||
F-H0-481 1 hcidggkckdjcjd
|
||||
F-H0-482 1 hdjeggkdjdkcjc
|
||||
F-H0-483 1 kkjdckdd
|
||||
F-H0-484 1 ddjjckjd
|
||||
F-H0-485 1 cdjjckjd
|
||||
F-H0-486 1 cikjdkjcdd
|
||||
F-H0-487 1 ejcjjkdcjd
|
||||
F-H0-488 1 cidkjdkjcd
|
||||
F-H0-489 2 cgjjdjcedcjd
|
||||
F-H0-490 1 kicjdcjc
|
||||
F-H0-491 1 jkcjdcjc
|
||||
F-H0-492 1 dcjkdkjd
|
||||
F-H0-493 1 jcjjcdcj
|
||||
F-H0-494 1 cijkdkjd
|
||||
F-H0-495 1 ikijkjdddjjc
|
||||
F-H0-496 1 cgjjdjdedckd
|
||||
F-H0-497 1 jfjkkddjddid
|
||||
F-H0-498 1 ccdjjjggjddd
|
||||
F-H0-499 1 cgggjjjddjdd
|
||||
F-H0-500 1 gkjjjddjddgg
|
||||
F-H0-501 2 jkiddj
|
||||
F-H0-502 1 dkdijd
|
||||
F-H0-503 3 dcjkdjkc
|
||||
F-H0-504 1 gkkcgg
|
||||
F-H0-505 1 gckcgg
|
||||
F-H0-506 1 ikckgg
|
||||
F-H0-507 1 lcggjdkekckd
|
||||
F-H0-508 1 kdggjdjckcic
|
||||
F-H0-509 1 kjikdkjddd
|
||||
F-H0-510 1 ckekjkddjd
|
||||
F-H0-511 2 ecdkkkcdjc
|
||||
F-H0-512 1 idjkckkddc
|
||||
F-H0-513 1 kgggjdgc
|
||||
F-H0-514 1 djggjdgc
|
||||
F-H0-515 2 kdkkdj
|
||||
F-H0-516 1 dkkcjj
|
||||
F-H0-517 1 dkkjkdgg
|
||||
F-H0-518 1 djggkjkd
|
||||
F-H0-519 1 ekjjcjejdc
|
||||
F-H0-520 1 ijdidkddkj
|
||||
F-H0-521 1 hdjjcdjejc
|
||||
F-H0-522 1 chcdkkkcdj
|
||||
F-H0-523 1 cidkjjcckc
|
||||
F-H0-524 2 eckkkddj
|
||||
F-H0-525 1 kjjdcjcc
|
||||
F-H0-526 1 ikkjkfdjddcfjc
|
||||
F-H0-527 1 dfchjkkddjddkh
|
||||
F-H0-528 1 ehchjkkddjddkh
|
||||
F-H0-529 1 dddkjjdcjd
|
||||
F-H0-530 1 gdjkdjjcdd
|
||||
F-H0-531 1 dedkjjdcjd
|
||||
F-H0-532 2 cekkcjdcjd
|
||||
F-H0-533 1 ddkjdkccjd
|
||||
F-H0-534 1 cijkdkdiddjd
|
||||
F-H0-535 1 hjdkjkjikdddhc
|
||||
F-H0-536 1 kgdkjkjikdddhc
|
||||
F-H0-537 1 gkdkjkjikdddhc
|
||||
F-H0-538 2 fcjjdjddjd
|
||||
F-H0-539 1 hjjjdjddjd
|
||||
F-H0-540 2 cdkkkcdj
|
||||
F-H0-541 1 fcjcgghcje
|
||||
F-H0-542 1 kgjcgghcje
|
||||
F-H0-543 1 djkjijkhgg
|
||||
F-H0-544 2 ekcjjkkddc
|
||||
F-H0-545 1 cdjkcjdckd
|
||||
F-H0-546 1 kcggjdjc
|
||||
F-H0-547 1 ddkkdjcckd
|
||||
F-H0-548 1 cekkdjcckd
|
||||
F-H0-549 1 ickkdjcckd
|
||||
F-H0-550 1 ckekjd
|
||||
F-H0-551 1 jjcijd
|
||||
F-H0-552 1 ikcijd
|
||||
F-H0-553 1 icjdggkcjc
|
||||
F-H0-554 1 cjjkkcdc
|
||||
F-H0-555 1 ekcjkkkd
|
||||
F-H0-556 1 ckjkkcdc
|
||||
F-H0-557 2 ikkjccjc
|
||||
F-H0-558 1 ckkdkkdc
|
||||
F-H0-559 2 kkjkjihj
|
||||
F-H0-560 1 kkjfidkd
|
||||
F-H0-561 1 eckkcdcjjc
|
||||
F-H0-562 1 djckkdkjdc
|
||||
F-H0-563 1 deckkdkjdc
|
||||
F-H0-564 1 diekcjjd
|
||||
F-H0-565 1 ejekcjjd
|
||||
F-H0-566 1 kjcidkjd
|
||||
F-H0-567 2 dcjkckjc
|
||||
F-H0-568 1 jjkdckcd
|
||||
F-H0-569 1 jkdjkcdc
|
||||
F-H0-570 1 kkjdckcd
|
||||
F-H0-571 1 fkdjjkdckc
|
||||
F-H0-572 1 cedjjkdckc
|
||||
F-H0-573 1 kidjjkdckc
|
||||
F-H0-574 1 hkjkdkkhddjd
|
||||
F-H0-575 1 kijkeckd
|
||||
F-H0-576 1 idjkeckd
|
||||
F-H0-577 1 jijkeckd
|
||||
F-H0-578 1 ddikdjjd
|
||||
F-H0-579 1 dcikdjjd
|
||||
F-H0-580 1 keggjcgc
|
||||
F-H0-581 1 cjggjcgc
|
||||
F-H0-582 1 dekkkddjic
|
||||
F-H0-583 1 jjdjkeccjc
|
||||
F-H0-584 1 dckkcjkc
|
||||
F-H0-585 1 cfkcdkcc
|
||||
F-H0-586 1 gkkggg
|
||||
F-H0-587 1 jjkggg
|
||||
F-H0-588 1 jeggkdjdkcjc
|
||||
F-H0-589 1 hclcggkcldjckd
|
||||
F-H0-590 1 hblcggkcldjckd
|
||||
F-H0-591 1 ekckdkdjjjdhfjdcjd
|
||||
F-H0-592 1 dkkikgggkdic
|
||||
F-H0-593 1 dkggjckegcec
|
||||
F-H0-594 1 cickjjcdjd
|
||||
F-H0-595 1 gjcjjjccjd
|
||||
F-H0-596 1 flikekfkdjfidcjd
|
||||
F-H0-597 1 dgikekfkdjfidcjd
|
||||
F-H0-598 1 hcdjjjjdddfc
|
||||
F-H0-599 1 ekfkdjjjjddd
|
||||
F-H0-600 1 gfkekfkdjejc
|
||||
F-H0-601 1 jfkekfkdjejc
|
||||
F-H0-602 1 jfdjjkjikcdc
|
||||
F-H0-603 1 ikijckjdkjcd
|
||||
F-H0-604 1 edkkdkcdkd
|
||||
F-H0-605 1 cekkdkdckd
|
||||
F-H0-606 2 kikdckic
|
||||
F-H0-607 1 idkkkddjdc
|
||||
F-H0-608 1 cickjkddkd
|
||||
F-H0-609 1 dkjjicgg
|
||||
F-H0-610 1 cjckdjjjdcjd
|
||||
F-H0-611 1 iddkcfkjkdchdc
|
||||
F-H0-612 1 jhkkcddjkcch
|
||||
F-H0-613 1 didkkdjj
|
||||
F-H0-614 1 kkjjdkkd
|
||||
F-H0-615 1 kfchjjjddjdc
|
||||
F-H0-616 1 ijfkdjkjddjd
|
||||
F-H0-617 2 jcckkjdd
|
||||
F-H0-618 1 dhckkdjjcd
|
||||
F-H0-619 1 ekjdkjcccj
|
||||
F-H0-620 2 cejkdkdedcjd
|
||||
F-H0-621 1 cfkkkdckdc
|
||||
F-H0-622 1 icckjkcckd
|
||||
F-H0-623 1 bkdkjkcgciddjd
|
||||
F-H0-624 1 ejcjjjcd
|
||||
F-H0-625 1 djkjddkd
|
||||
F-H0-626 1 kidjcckd
|
||||
F-H0-627 1 kkdjcckd
|
||||
F-H0-628 1 chcfdkkdkjdc
|
||||
F-H0-629 1 dkdjkkjdckcd
|
||||
F-H0-630 2 eedjjkcgcedckd
|
||||
F-H0-631 1 hkdjjkjikddcic
|
||||
F-H0-632 1 kidjjkjikddcic
|
||||
F-H0-633 2 kkdkdckd
|
||||
F-H0-634 1 kgckjkdcjc
|
||||
F-H0-635 1 ceckjkdcjc
|
||||
F-H0-636 1 hekdggjdjckcic
|
||||
F-H0-637 1 kfkdggjdjckcic
|
||||
F-H0-638 1 hdgjjjjddjddkf
|
||||
F-H0-639 1 hkgjjjjddjddkf
|
||||
F-H0-640 1 lhjhkkcddjkcch
|
||||
F-H0-641 1 edjhkkcddjkcch
|
||||
F-H0-642 1 ekikdjfkdcjd
|
||||
F-H0-643 1 cffkdkjjciggkeddjchc
|
||||
F-H0-644 1 cikjdkggkddc
|
||||
F-H0-645 1 ekjkcjggjccd
|
||||
F-H0-646 1 ejkkdjdkjdckcd
|
||||
F-H0-647 2 kfkejejc
|
||||
F-H0-648 1 jijkdjdcjd
|
||||
F-H0-649 1 cejkdjdcjd
|
||||
F-H0-650 2 chdkdicijd
|
||||
F-H0-651 1 jikjkijjkdcjdd
|
||||
F-H0-652 1 hhkikjjijjihcjkdiidd
|
||||
F-H0-653 1 dkdjck
|
||||
F-H0-654 1 kkjdkc
|
||||
F-H0-655 1 hikjkijjjicjihiikdhhdd
|
||||
F-H0-656 1 ijkjkijjjicjihiikdhhdd
|
||||
F-H0-657 1 dhjkdjfkddjd
|
||||
F-H0-658 1 ecchjjjddjcd
|
||||
F-H0-659 1 cjdkjjkdggicdd
|
||||
F-H0-660 1 cidkjjkdggicdd
|
||||
F-H0-661 1 khkdjkcdcj
|
||||
F-H0-662 1 ekjkcjjcdc
|
||||
F-H0-663 1 kfcfdkkdkjidchdc
|
||||
F-H0-664 1 kgcfdkkdkjidchdc
|
||||
F-H0-665 1 cjejkkdjdkjdckcd
|
||||
F-H0-666 1 biejkkdjdkjdckcd
|
||||
F-H0-667 2 dejkdjjdeccd
|
||||
F-H0-668 1 ekcjjkjddd
|
||||
F-H0-669 1 edjjdjcdjc
|
||||
F-H0-670 1 cgckggkcgccc
|
||||
F-H0-671 1 kgckggkccgcc
|
||||
F-H0-672 1 cfdkkdkjdc
|
||||
F-H0-673 1 kcjkjedjddjc
|
||||
F-H0-674 1 hkjkdjddjijc
|
||||
F-H0-675 2 cididkjd
|
||||
F-H0-676 1 cfcededcjd
|
||||
F-H0-677 1 jjikijkjjd
|
||||
F-H0-678 1 jijkcjekkddc
|
||||
F-H0-679 1 gjjkcjekkddc
|
||||
F-H0-680 1 gkjkiddj
|
||||
F-H0-681 1 didkedjj
|
||||
F-H0-682 1 ljdkjkkhkdddhc
|
||||
F-H0-683 1 eifkjkjdcjcdkh
|
||||
F-H0-684 1 kjkijjkdcjdd
|
||||
F-H0-685 1 cjjjjddc
|
||||
F-H0-686 1 jjdjddjc
|
||||
F-H0-687 1 ekdkdjckcjjjdcjd
|
||||
F-H0-688 1 cfjjdjkgggddjd
|
||||
F-H0-689 1 fkdjjjcgggjddd
|
||||
F-H0-690 1 chdjcdkc
|
||||
F-H0-691 1 kjckdcjd
|
||||
F-H0-692 1 dcijdjjc
|
||||
F-H0-693 1 ccijdjjc
|
||||
F-H0-694 1 ejekdkdjckcjjjdcjd
|
||||
F-H0-695 1 bidkckkjcjdjjdcidd
|
||||
F-H0-696 1 jiikkjccjc
|
||||
F-H0-697 1 ecckjkickd
|
||||
F-H0-698 1 ecdkkjcdjd
|
||||
F-H0-699 1 didkddkjjc
|
||||
F-H0-700 1 ekjkdjfkdcjd
|
||||
F-H0-701 1 ickhjjkdcjdd
|
||||
F-H0-702 1 eicidkccjj
|
||||
F-H0-703 1 deckjdcedc
|
||||
F-H0-704 2 jijkdjkcdc
|
||||
F-H0-705 1 jkcjkddc
|
||||
F-H0-706 1 icjkcjkd
|
||||
F-H0-707 1 kikkgkckggkcgc
|
||||
F-H0-708 1 kgckgkkcggccgc
|
||||
F-H0-709 1 kdjkddck
|
||||
F-H0-710 1 ddkkdjkd
|
||||
F-H0-711 2 klkkjkjihj
|
||||
F-H0-712 1 ecdkkkcdkc
|
||||
F-H0-713 1 decjkkdckc
|
||||
F-H0-714 1 kejjdkggciddjchc
|
||||
F-H0-715 1 fcggickc
|
||||
F-H0-716 1 jfjkkdcjddiegcic
|
||||
F-H0-717 1 gcjkdjeecgcedckd
|
||||
F-H0-718 1 kikkikdkjddd
|
||||
F-H0-719 1 chjkekckddjd
|
||||
F-H0-720 1 cddjjkidkd
|
||||
F-H0-721 1 hddjcdjejc
|
||||
F-H0-722 1 kgkjgkcjggjcgc
|
||||
F-H0-723 1 kkcejcdc
|
||||
F-H0-724 1 dkkedcjc
|
||||
F-H0-725 2 dfdkjkcecfcddedcjd
|
||||
F-H0-726 1 gcgkkggg
|
||||
F-H0-727 1 gdgkkggg
|
||||
F-H0-728 1 jkkgkdggic
|
||||
F-H0-729 1 jkggkegcjc
|
||||
F-H0-730 1 djkkjdckcd
|
||||
F-H0-731 1 cbjjdjcecgjcdcbc
|
||||
F-H0-732 1 gkjkdkbkcgciddjd
|
||||
F-H0-733 1 kdkkcjdc
|
||||
F-H0-734 1 icckdckd
|
||||
F-H0-735 2 cdjkdkcfcededcjd
|
||||
F-H0-736 1 fjikkjckjcdd
|
||||
F-H0-737 1 kgdjjkickdcc
|
||||
F-H0-738 2 jdjjggdjdd
|
||||
F-H0-739 1 dedcke
|
||||
F-H0-740 1 jcdcke
|
||||
F-H0-741 1 fkdjikdcjd
|
||||
F-H0-742 1 cfjkcjekdckc
|
||||
F-H0-743 1 gdkkdkjccdec
|
||||
F-H0-744 1 icdkkjkdgg
|
||||
F-H0-745 1 dcdkkjkdgg
|
||||
F-H0-746 1 iikikjjijjkdcjdd
|
||||
F-H0-747 2 dkkjcdjd
|
||||
F-H0-748 2 cicddkkcjj
|
||||
F-H0-749 1 dfjddkeccd
|
||||
F-H0-750 1 eddjkdcedc
|
||||
F-H0-751 1 kdggkgkejdgc
|
||||
F-H0-752 1 jeggkgkejdgc
|
||||
F-H0-753 1 jddi
|
||||
F-H0-754 1 kdid
|
||||
F-H0-755 1 lcggkcldjckd
|
||||
F-H0-756 1 bididkchcijd
|
||||
F-H0-757 1 cjdidkchcijd
|
||||
F-H0-758 1 jkkidjjccc
|
||||
F-H0-759 1 gkkdkkecdj
|
||||
F-H0-760 2 cjicjkdckd
|
||||
F-H0-761 1 ihkjkijjjicjkdiidd
|
||||
F-H0-762 1 jkggidjfkckdjcjd
|
||||
F-H0-763 1 dkggjejdkdhdkcjc
|
||||
F-H0-764 1 jdcjjkkcdc
|
||||
F-H0-765 1 ekkkcjdckd
|
||||
F-H0-766 1 kekgggjdgc
|
||||
F-H0-767 2 djggjjdd
|
||||
F-H0-768 1 dcjjdjkc
|
||||
F-H0-769 1 fjckjddd
|
||||
F-H0-770 1 fiekikdjfkdcjd
|
||||
F-H0-771 1 cijkdkdfcecfcddedcjd
|
||||
F-H0-772 1 fcjkdkdfcecfcddedcjd
|
||||
F-H0-773 1 ddjijc
|
||||
F-H0-774 1 kejijc
|
||||
F-H0-775 1 cgckjkdckd
|
||||
F-H0-776 1 hcckjkdckd
|
||||
F-H0-777 1 cdkjkddjic
|
||||
F-H0-778 1 edkjkddjic
|
||||
F-H0-779 1 gkjjdkcikeggjcdd
|
||||
F-H0-780 2 fkdjkjddjd
|
||||
F-H0-781 1 fkdkjjciggkeddjchc
|
||||
F-H0-782 1 gkjkdjkidcjd
|
||||
F-H0-783 1 hcjkdjkidcjd
|
||||
F-H0-784 1 dkkkcdkejc
|
||||
F-H0-785 1 jekkcdkejc
|
||||
F-H0-786 1 dcijdjjd
|
||||
F-H0-787 1 dddjjdji
|
||||
F-H0-788 1 djjkjcgg
|
||||
F-H0-789 1 cjjkjcgg
|
||||
F-H0-790 1 jbicggfckc
|
||||
F-H0-791 1 dcicggfckc
|
||||
F-H0-792 1 jidjjkkijd
|
||||
F-H0-793 1 kcekjjddcj
|
||||
F-H0-794 2 kdkfkejejc
|
||||
F-H0-795 1 cjjkddgg
|
||||
F-H0-796 1 jjggdjjc
|
||||
F-H0-797 1 dddkjjicgg
|
||||
F-H0-798 1 deckkdkiic
|
||||
F-H0-799 1 kkckkdkiic
|
||||
F-H0-800 1 kcjkccdj
|
||||
F-H0-801 1 cddkkcjj
|
||||
F-H0-802 1 ckdkdjjjdhfjdcjd
|
||||
F-H0-803 1 kkkeggjcgc
|
||||
F-H0-804 1 jjkeggjcgc
|
||||
F-H0-805 1 ecdkkjcdkejc
|
||||
F-H0-806 1 jijkiccjdckd
|
||||
F-H0-807 2 kjklkkjkjihj
|
||||
F-H0-808 1 jhhkjjckkddcic
|
||||
F-H0-809 1 kfkhdkcdjjkcci
|
||||
F-H0-810 1 kjggjd
|
||||
F-H0-811 1 cdggjd
|
||||
F-H0-812 1 cekicjdcjc
|
||||
F-H0-813 1 cdkjdkeckd
|
||||
F-H0-814 2 jkdjddjijc
|
||||
F-H0-815 2 khdkcdjjkcci
|
||||
F-H0-816 1 gcjjdjeecgcedcjd
|
||||
F-H0-817 1 fdjjdjeecgcedcjd
|
||||
F-H0-818 1 cfdjjkdejdeccd
|
||||
F-H0-819 1 cedjjkdejdeccd
|
||||
F-H0-820 2 dkdjckcjjjdcjd
|
||||
F-H0-821 1 iggkkjkgcjggjcgc
|
||||
F-H0-822 1 ecgkdkggkdcgcdgc
|
||||
F-H0-823 2 ikkjckjcdd
|
||||
F-H0-824 1 eededjjddc
|
||||
F-H0-825 1 ddijkjjddj
|
||||
F-H0-826 1 chdkfkcijjcfggkeddjchc
|
||||
F-H0-827 1 kgdkfkcijjcfggkeddjchc
|
||||
F-H0-828 1 dkjjkdddic
|
||||
F-H0-829 1 ckjjkdddic
|
||||
F-H0-830 1 hkcjek
|
||||
F-H0-831 1 idjcke
|
||||
F-H0-832 1 dkdjjjdhfjdcjd
|
||||
F-H0-833 1 jdjehdkdjckckb
|
||||
F-H0-834 1 ilkkklkjjkjihj
|
||||
F-H0-835 1 khekjdjjgdcjdd
|
||||
F-H0-836 1 jhekjdjjgdcjdd
|
||||
F-H0-837 1 jfdjkdiddd
|
||||
F-H0-838 1 jjdidkjddd
|
||||
F-H0-839 1 lcdkjjciggjckegcdd
|
||||
F-H0-840 1 kggkjjdkcikeggjcdd
|
||||
F-H0-841 1 djggjckegcdd
|
||||
F-H0-842 1 cjggjckegcdd
|
||||
F-H0-843 1 dhjjdjfjdcjd
|
||||
F-H0-844 1 cgjkdjcedckd
|
||||
F-H0-845 2 dcckjkkc
|
||||
F-H0-846 1 cgjkdkciddjd
|
||||
F-H0-847 2 cfdkjkcededcjd
|
||||
F-H0-848 1 fkdjjkedjd
|
||||
F-H0-849 1 ccdjjkedjd
|
||||
F-H0-850 1 ekcjkkcedcjd
|
||||
F-H0-851 1 jijkcjekkcdd
|
||||
F-H0-852 1 kjkccc
|
||||
F-H0-853 1 jjcckc
|
||||
F-H0-854 1 kdjjdkggicdd
|
||||
F-H0-855 1 dcdekkkddjic
|
||||
F-H0-856 1 ccdekkkddjic
|
||||
F-H0-857 1 cccedkjd
|
||||
F-H0-858 1 dccedkjd
|
||||
F-H0-859 1 clekckdkdjjjdhfjdcjd
|
||||
F-H0-860 1 cjekckdkdjjjdhfjdcjd
|
||||
F-H0-861 1 cejkckdckc
|
||||
F-H0-862 1 jijkckdckc
|
||||
F-H0-863 1 jcgkkjgg
|
||||
F-H0-864 1 dkggkdgc
|
24955
gnugo/patterns/fuseki19.dbz
Normal file
24955
gnugo/patterns/fuseki19.dbz
Normal file
File diff suppressed because it is too large
Load Diff
1356
gnugo/patterns/fuseki9.dbz
Normal file
1356
gnugo/patterns/fuseki9.dbz
Normal file
File diff suppressed because it is too large
Load Diff
279
gnugo/patterns/gnugo-db.el
Normal file
279
gnugo/patterns/gnugo-db.el
Normal file
@ -0,0 +1,279 @@
|
||||
;; This file is distributed with GNU Go, a Go program.
|
||||
;;
|
||||
;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005. 2006
|
||||
;; 2007, 2008 and 2009 by the Free Software Foundation.
|
||||
;;
|
||||
;; This program is free software; you can redistribute it and/
|
||||
;; modify it under the terms of the GNU General Public License
|
||||
;; as published by the Free Software Foundation - 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 in file COPYIN
|
||||
;; 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 02111, USA.
|
||||
|
||||
|
||||
;; GNU Emacs mode for editing pattern database files.
|
||||
;;
|
||||
;; Put this file to emacs/site-lisp directory and add
|
||||
;;
|
||||
;; (require 'gnugo-db)
|
||||
;;
|
||||
;; to your ~/.emacs file. If you want gnugo-db-mode to be selected
|
||||
;; automatically for every .db file, add these lines also:
|
||||
;;
|
||||
;; (setq auto-mode-alist
|
||||
;; (append
|
||||
;; auto-mode-alist
|
||||
;; '(("\\.db\\'" . gnugo-db-mode))))
|
||||
|
||||
|
||||
(defvar gnugo-db-mode-map nil)
|
||||
(unless gnugo-db-mode-map
|
||||
(setq gnugo-db-mode-map (make-sparse-keymap))
|
||||
(define-key gnugo-db-mode-map "\C-c\C-p" 'gnugo-db-insert-pattern)
|
||||
(define-key gnugo-db-mode-map "\C-c\C-c"
|
||||
'gnugo-db-copy-main-diagram-to-constraint))
|
||||
|
||||
(defvar gnugo-db-mode-abbrev-table nil)
|
||||
(define-abbrev-table 'gnugo-db-mode-abbrev-table ())
|
||||
|
||||
(defvar gnugo-db-mode-syntax-table nil)
|
||||
(unless gnugo-db-mode-syntax-table
|
||||
(setq gnugo-db-mode-syntax-table (make-syntax-table))
|
||||
(modify-syntax-entry ?\# "<" gnugo-db-mode-syntax-table)
|
||||
(modify-syntax-entry ?\n ">#" gnugo-db-mode-syntax-table))
|
||||
|
||||
(defvar gnugo-db-font-lock-keywords (list "Pattern"
|
||||
"goal_elements"
|
||||
"callback_data"
|
||||
"attribute_map"))
|
||||
|
||||
|
||||
(defun gnugo-db-mode()
|
||||
"Major mode for editing pattern database files."
|
||||
(interactive)
|
||||
(kill-all-local-variables)
|
||||
(use-local-map gnugo-db-mode-map)
|
||||
(setq local-abbrev-table gnugo-db-mode-abbrev-table)
|
||||
(set-syntax-table gnugo-db-mode-syntax-table)
|
||||
(set (make-local-variable 'paragraph-start) "Pattern")
|
||||
(set (make-local-variable 'paragraph-separate) paragraph-start)
|
||||
(set (make-local-variable 'comment-start) "# ")
|
||||
(set (make-local-variable 'comment-end) "")
|
||||
(set (make-local-variable 'comment-start-skip) "#+ *")
|
||||
(setq font-lock-defaults '(gnugo-db-font-lock-keywords nil nil ((?_ . "w"))))
|
||||
(set (make-local-variable 'indent-line-function) 'gnugo-db-indent-line)
|
||||
(set (make-local-variable 'indent-region-function) 'gnugo-db-indent-region)
|
||||
(setq mode-name "GNU Go pattern database")
|
||||
(setq major-mode 'gnugo-db-mode))
|
||||
|
||||
|
||||
(defun gnugo-db-indent-line(&optional indenting-region)
|
||||
"Indents a line of a constraint or main diagram line with comment."
|
||||
(let ((return-point (point)))
|
||||
(beginning-of-line)
|
||||
(let ((line-beginning (point))
|
||||
(first-char (char-after)))
|
||||
(unless (= first-char ?\;)
|
||||
(forward-line -1)
|
||||
(when (= (char-after) ?\;)
|
||||
(setq first-char ?\;)))
|
||||
|
||||
(let* ((column)
|
||||
(indentation
|
||||
(if (= first-char ?\;)
|
||||
(progn
|
||||
(while (and (= (char-after) ?\;)
|
||||
(= (forward-line -1) 0)))
|
||||
(let ((paren-stack ()))
|
||||
(while (search-forward-regexp "[][()]" line-beginning t)
|
||||
(let ((char (char-before)))
|
||||
(if (memq char '(?\( ?\[))
|
||||
(push (list char (current-column)) paren-stack)
|
||||
(let ((pop-paren (cond ((= char ?\)) ?\()
|
||||
((= char ?\]) ?\[))))
|
||||
(while (not (= (car (pop paren-stack)) pop-paren))
|
||||
())))))
|
||||
(goto-char line-beginning)
|
||||
(setq column (if paren-stack
|
||||
(cadr (car paren-stack))
|
||||
2)))
|
||||
(concat ";"
|
||||
(make-string (/ column tab-width) ?\t)
|
||||
(make-string (if (< column tab-width)
|
||||
(1- column)
|
||||
(% column tab-width))
|
||||
? )))
|
||||
|
||||
(goto-char line-beginning)
|
||||
(if (memq first-char '(?- ?+ ?| ?. ?X ?O ?x ?o
|
||||
?, ?! ?* ?? ?Y ?Q))
|
||||
(progn
|
||||
(let ((diagram-width 0))
|
||||
(while (not (memq (char-after) '(? ?\t ?\n nil)))
|
||||
(setq diagram-width (1+ diagram-width))
|
||||
(forward-char))
|
||||
(if (< diagram-width 8)
|
||||
(progn (setq column 12)
|
||||
"\t ")
|
||||
(setq column (+ diagram-width 4))
|
||||
" ")))
|
||||
nil))))
|
||||
|
||||
(when indentation
|
||||
(let ((indentation-point (point))
|
||||
(indentation-length (length indentation))
|
||||
(matched 0))
|
||||
(while (and (< matched indentation-length)
|
||||
(eq (char-after) (aref indentation matched)))
|
||||
(setq matched (1+ matched))
|
||||
(forward-char))
|
||||
(while (memq (char-after) '(? ?\t))
|
||||
(forward-char))
|
||||
(unless (or (= (current-column) column)
|
||||
(and indenting-region (memq (char-after) '(?\n nil))))
|
||||
(setq return-point (+ return-point
|
||||
indentation-length
|
||||
(- indentation-point (point))))
|
||||
(delete-region (+ indentation-point matched) (point))
|
||||
(when (< matched indentation-length)
|
||||
(insert (substring indentation matched))))
|
||||
(when (< return-point (point))
|
||||
(setq return-point (point)))))))
|
||||
|
||||
(goto-char return-point)))
|
||||
|
||||
|
||||
(defun gnugo-db-indent-region(start end)
|
||||
"Indents a region. Indents in the same way as `gnugo-db-indent-line'."
|
||||
(interactive "r")
|
||||
(save-excursion
|
||||
(setq end (copy-marker end))
|
||||
(goto-char start)
|
||||
(while (< (point) end)
|
||||
(or (and (bolp) (eolp))
|
||||
(gnugo-db-indent-line t))
|
||||
(forward-line))
|
||||
(move-marker end nil)))
|
||||
|
||||
|
||||
(defun gnugo-db-insert-pattern()
|
||||
"Inserts a new pattern after the current one. Tries to pick up a
|
||||
suitable name by incrementing numeric part of the previous pattern
|
||||
name.
|
||||
|
||||
This function heavily depends on correctness of the current pattern."
|
||||
(interactive)
|
||||
(let ((first-name "")
|
||||
(middle-name "")
|
||||
(last-name ""))
|
||||
(end-of-line)
|
||||
(if (re-search-backward "^Pattern " 0 t)
|
||||
(progn
|
||||
(forward-char 8)
|
||||
(when (looking-at "\\([^0-9]+\\)\\([0-9]*\\)\\(.*\\)")
|
||||
(setq first-name (match-string-no-properties 1)
|
||||
middle-name (match-string-no-properties 2)
|
||||
last-name (match-string-no-properties 3)))
|
||||
(re-search-forward "^:" (1+ (buffer-size)) t)
|
||||
(backward-char)
|
||||
(forward-line 2)
|
||||
(unless (memq (char-after) '(?\n ? ?\t))
|
||||
(re-search-forward "^[;>]" (1+ (buffer-size)) t)
|
||||
(backward-char)
|
||||
(while (looking-at "[;>]")
|
||||
(forward-line))
|
||||
(forward-line)
|
||||
(when (looking-at "[;>]")
|
||||
(while (looking-at "[;>]")
|
||||
(forward-line))
|
||||
(forward-line)))
|
||||
(when (= (forward-line) 1)
|
||||
(end-of-line)
|
||||
(insert "\n")))
|
||||
(re-search-forward "^Pattern " (1+ (buffer-size)) t)
|
||||
(beginning-of-line))
|
||||
|
||||
(insert "Pattern \n")
|
||||
(let ((move-to-point (1- (point))))
|
||||
(unless (string= first-name "")
|
||||
(let ((pattern-name
|
||||
(if (string= last-name "")
|
||||
(concat first-name
|
||||
(number-to-string (1+ (string-to-number middle-name))))
|
||||
(concat first-name middle-name
|
||||
(char-to-string (1+ (string-to-char last-name)))))))
|
||||
(when (string= last-name "")
|
||||
(when (save-excursion
|
||||
(re-search-forward "^Pattern " (1+ (buffer-size)) t)
|
||||
(or (looking-at pattern-name)
|
||||
(looking-at (concat first-name middle-name))))
|
||||
(setq pattern-name (concat first-name middle-name "a"))))
|
||||
(backward-char)
|
||||
(insert pattern-name)
|
||||
(forward-char)))
|
||||
(insert "\n")
|
||||
(unless (string= first-name "")
|
||||
(setq move-to-point (point)))
|
||||
(insert "\n\n:\n\n\n")
|
||||
(goto-char move-to-point))))
|
||||
|
||||
|
||||
(defun gnugo-db-copy-main-diagram-to-constraint()
|
||||
"Copies pattern diagram to constraint and inserts a dummy constraint line"
|
||||
(interactive)
|
||||
(let ((start-point (point)))
|
||||
(end-of-line)
|
||||
(unless (re-search-backward "^Pattern " 0 t)
|
||||
(re-search-forward "^Pattern" (1+ (buffer-size)) t)
|
||||
(beginning-of-line))
|
||||
|
||||
(forward-line)
|
||||
(while (not (looking-at "[-+|.XOxo,!*?YQ]"))
|
||||
(forward-line))
|
||||
|
||||
(let ((diagram-beginning (point)))
|
||||
(while (looking-at "[-+|.XOxo,!*?YQ]")
|
||||
(forward-line))
|
||||
|
||||
(let ((diagram (buffer-substring diagram-beginning (point))))
|
||||
(re-search-forward "^:" (1+ (buffer-size)) t)
|
||||
(backward-char)
|
||||
(forward-line)
|
||||
(while (looking-at "#")
|
||||
(forward-line))
|
||||
(when (memq (char-after) '(?\n ? ?\t))
|
||||
(forward-line))
|
||||
|
||||
(when (looking-at "[-+|.XOxo,!*?YQ;>]")
|
||||
(goto-char start-point)
|
||||
(error "Pattern already seems to have a constraint"))
|
||||
|
||||
(let ((constraint-diagram-beginning (point)))
|
||||
(insert diagram)
|
||||
(let ((constraint-diagram-end (point)))
|
||||
(goto-char constraint-diagram-beginning)
|
||||
(while (not (= (point) constraint-diagram-end))
|
||||
(while (not (memq (char-after) '(?\n ? ?\t)))
|
||||
(forward-char))
|
||||
(unless (= (char-after) ?\n)
|
||||
(let ((diagram-line-end (point)))
|
||||
(end-of-line)
|
||||
(setq constraint-diagram-end
|
||||
(- constraint-diagram-end (- (point) diagram-line-end)))
|
||||
(delete-region diagram-line-end (point))))
|
||||
(forward-char))
|
||||
|
||||
(insert "\n; \n\n")
|
||||
(goto-char constraint-diagram-beginning)))))))
|
||||
|
||||
|
||||
(provide 'gnugo-db)
|
1494
gnugo/patterns/gogo.db
Normal file
1494
gnugo/patterns/gogo.db
Normal file
File diff suppressed because it is too large
Load Diff
106
gnugo/patterns/gogo.sgf
Normal file
106
gnugo/patterns/gogo.sgf
Normal file
@ -0,0 +1,106 @@
|
||||
This is GNU Go, a Go program. Contact gnugo@gnu.org, or see
|
||||
http://www.gnu.org/software/gnugo/ for more information.
|
||||
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008 and 2009 by the Free Software Foundation.
|
||||
|
||||
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 - 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 in file COPYING 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 02111, USA.
|
||||
|
||||
(;GM[1]FF[3]
|
||||
SZ[19];B[oe]
|
||||
(;W[qc]N[San-san invasion]
|
||||
(;B[oc]MA[kg]
|
||||
(;W[qe]MA[mg];B[pg]MA[ki];W[qg];B[ph]MA[li])
|
||||
|
||||
(;W[qf]MA[mi];B[qb]
|
||||
C[S
|
||||
# According to KJD, Q13 is an option too. But I think Q13 is generally
|
||||
too cosmic for GNU Go. /pp]
|
||||
MA[mg];W[rb]C[U]MA[ng];B[qd]MA[ng];W[pc]C[U]MA[ng];B[pd]C[U]MA[nf];
|
||||
W[rd]C[U]MA[nf];B[pb]MA[nf];W[rc]MA[ng];B[pg]MA[lh])
|
||||
)
|
||||
|
||||
(;B[pc]C[# Looks risky for GNU Go. /pp];W[pb]MA[mf];B[qd]
|
||||
C[U
|
||||
# Is it urgent enough? /pp]MA[mf];W[oc]C[U]MA[mf];B[pd]C[U]MA[mf]
|
||||
;W[rb]C[U]MA[nf];B[rc]MA[mg];W[qb]C[U]MA[nf];B[nc]MA[lf])
|
||||
)
|
||||
|
||||
(;W[pd]N[Hoshi invasion];B[pe]MA[nh]
|
||||
(;W[qd]MA[lg];B[qe]MA[mg]
|
||||
(;W[od]MA[mf];B[nd]MA[kf];W[nc]MA[mf];B[mc]MA[kf];W[nb]MA[lf];B[mb]
|
||||
MA[lf];W[pb]MA[lf];B[md]MA[lf])
|
||||
|
||||
(;W[nc]MA[lf];B[oc]MA[lf];W[od]MA[mf];B[nd]MA[lf]
|
||||
(;W[ob]MA[mf];B[mc]MA[lf];W[nb]C[U]MA[lf];B[md]MA[lf])
|
||||
|
||||
(;W[md]C[# This empasizes the top, hence larger area. /pp]MA[jf];
|
||||
B[ne]MA[lg];W[mc]MA[kf];B[rd]MA[lg];W[pb]MA[me];B[qb]C[# Tesuji.]
|
||||
MA[me];W[pc]MA[me];B[qc]MA[me];W[ob]MA[me])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[qe]C[# Looks risky for GNU Go. /pp];B[qf]MA[nh];W[qd]MA[ng];B[od]
|
||||
MA[ng];W[rf]MA[nh];B[qg]MA[ni];W[rg]MA[ni];B[qh]MA[mj];W[ob]
|
||||
C[j
|
||||
# I think so. /pp]MA[mh];B[oc]MA[lh];W[pb]MA[me];B[mc]C[j]MA[kh])
|
||||
|
||||
(;W[oc]MA[kf]
|
||||
(;B[qe]MA[mh];W[mc]MA[kf];B[qc]MA[lf];W[jc]MA[ie])
|
||||
|
||||
(;B[qd]MA[mh];W[qc]MA[mf];B[qe]C[U]MA[nf];W[rc]MA[nf];B[nc]MA[mf];
|
||||
W[nb]MA[me];B[od]MA[me];W[pc]C[U]MA[me];B[mc]MA[lf];W[mb]MA[ke];B[lc]
|
||||
MA[kg])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[qd]N[Komoku invasion]
|
||||
(;B[qe]
|
||||
C[# According to KJD, this emphasizes top despite the way it
|
||||
looks. /pp]
|
||||
MA[lg];W[re]MA[mg]
|
||||
(;B[pe]C[U
|
||||
# I think so. /pp]MA[nf]
|
||||
(;W[rf]C[U]MA[ng];B[oc]MA[lf];W[pc]MA[nf];B[ob]MA[nf])
|
||||
|
||||
(;W[qf]C[0
|
||||
# Bad.]MA[oh]
|
||||
(;B[rf]MA[oh];W[rg];B[rd];W[sf];B[qc])
|
||||
|
||||
(;B[rd]C[0
|
||||
# Bad too.]MA[oh];W[rc]MA[ng];B[rf];W[sd];B[qg];W[oc])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[rf]C[0
|
||||
# Mistake.];W[pe];B[qf];W[pd];B[pf];W[od])
|
||||
)
|
||||
|
||||
(;B[pc]MA[lf];W[qc]MA[nf];B[pf]MA[mg]
|
||||
(;W[pd]MA[mg];B[od]C[U]MA[ng]
|
||||
(;W[oc]MA[mf];B[nc]C[U]MA[mf];W[pb]MA[mf];B[ob]MA[mf];W[rf]MA[mg])
|
||||
|
||||
(;W[ob]
|
||||
C[:-,shape(1)
|
||||
# A trick to avoid ko. I think it's better for GNU Go. /pp]
|
||||
MA[mf];B[oc]MA[mf];W[pb]MA[nf];B[nb]MA[mf];W[rf]MA[mg];B[mc];W[qg])
|
||||
)
|
||||
|
||||
(;W[rf]MA[nh];B[pb]MA[lg];W[qg]MA[ni];B[kc]MA[jh])
|
||||
)
|
||||
)
|
||||
|
||||
)
|
916
gnugo/patterns/handicap.db
Normal file
916
gnugo/patterns/handicap.db
Normal file
@ -0,0 +1,916 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING #
|
||||
# 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 02111, USA #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# The General Fuseki Pattern Database, fuseki.db
|
||||
#
|
||||
# Further documentation may be found in the Texinfo documentation
|
||||
#
|
||||
# First there is a pattern title of the form: Pattern [string]. The
|
||||
# string is used for identifying the pattern while tuning or debugging.
|
||||
#
|
||||
# Then a block of the following characters representing the pattern
|
||||
# itself.
|
||||
#
|
||||
# ? : don't care
|
||||
# . : empty
|
||||
# X : your piece,
|
||||
# O : my piece,
|
||||
# x : your piece or empty
|
||||
# o : my piece or empty
|
||||
# * : my next move
|
||||
# -, | : edge of board
|
||||
# + : corner of board
|
||||
# ! : additional stones to be placed on the board (together with *)
|
||||
#
|
||||
# If a pattern must not match at the edge of the board,
|
||||
# an extra row of ?'s in the pattern may be added. (This
|
||||
# will not add to the time taken to check the pattern.)
|
||||
#
|
||||
#################
|
||||
#
|
||||
# After the pattern, some supplementary information in the format:
|
||||
#
|
||||
# :trfno, classification, [values], helper_function
|
||||
#
|
||||
# These and other aspects of the pattern database are documented
|
||||
# in the Texinfo documentation.
|
||||
#
|
||||
#################
|
||||
#
|
||||
# Any line beginning with #, or any part of a line following
|
||||
# whitespace is a comment.
|
||||
#
|
||||
# This database has the special property that there are stones
|
||||
# temporarily added at the very corners of the board when
|
||||
# called. This allows us to use pattern matching for the first real
|
||||
# stones in an empty corner but also means that the extreme corner
|
||||
# stones must be included in all corner patterns.
|
||||
#
|
||||
# There are no meaningful classifications that can be used in this
|
||||
# database. All patterns need to have a specified value, which is
|
||||
# related to the probability that the pattern will be used. Basically
|
||||
# a pattern which has a value being N higher than another pattern is
|
||||
# 2^N times more probable to be chosen. Additionally there are some
|
||||
# cutoffs involved, see engine/handicap.c for details.
|
||||
|
||||
|
||||
attribute_map value_only
|
||||
|
||||
goal_elements none
|
||||
callback_data !
|
||||
|
||||
|
||||
Pattern H1
|
||||
|
||||
|..... 4-4 in empty corner
|
||||
|...*.
|
||||
|.....
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:/,-,value(25)
|
||||
|
||||
|
||||
Pattern H2
|
||||
|
||||
|.... 3-3 in empty corner
|
||||
|..*.
|
||||
|....
|
||||
|O...
|
||||
+----
|
||||
|
||||
:/,-,value(23)
|
||||
|
||||
|
||||
Pattern H3
|
||||
|
||||
|..... 3-4 in empty corner
|
||||
|...*.
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:8,-,value(24)
|
||||
|
||||
|
||||
Pattern H4
|
||||
|
||||
|.....
|
||||
|...*. 5-4 in empty corner
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:8,-,value(23)
|
||||
|
||||
|
||||
Pattern H5
|
||||
|
||||
|.....
|
||||
|..*.. 5-3 in empty corner
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:8,-,value(23)
|
||||
|
||||
|
||||
Pattern H6
|
||||
|
||||
|......
|
||||
|....*. 5-5 in empty corner
|
||||
|......
|
||||
|......
|
||||
|......
|
||||
|O.....
|
||||
+------
|
||||
|
||||
:8,-,value(18)
|
||||
|
||||
|
||||
Pattern H7
|
||||
|
||||
|......
|
||||
|...*.. ponnuki in corner
|
||||
|..!.!.
|
||||
|...!..
|
||||
|......
|
||||
|O.....
|
||||
+------
|
||||
|
||||
:8,-,value(23)
|
||||
|
||||
|......
|
||||
|...*..
|
||||
|..!.!.
|
||||
|...!..
|
||||
|......
|
||||
|O.....
|
||||
+------
|
||||
|
||||
;remaining_handicap_stones() > 20
|
||||
|
||||
|
||||
Pattern H10
|
||||
|
||||
|.....
|
||||
|..*.. shimari
|
||||
|.....
|
||||
|...O.
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:8,-,value(21)
|
||||
|
||||
|
||||
Pattern H11
|
||||
|
||||
|.....
|
||||
|...*. shimari
|
||||
|.....
|
||||
|...O.
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:8,-,value(21)
|
||||
|
||||
|
||||
Pattern H12
|
||||
|
||||
|.....
|
||||
|..*..
|
||||
|..... shimari
|
||||
|.....
|
||||
|...O.
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:8,-,value(19)
|
||||
|
||||
|
||||
Pattern H13
|
||||
|
||||
|.....
|
||||
|...*.
|
||||
|..... shimari
|
||||
|.....
|
||||
|...O.
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:8,-,value(19)
|
||||
|
||||
|
||||
Pattern H14
|
||||
|
||||
|.....
|
||||
|..O.. shimari
|
||||
|.....
|
||||
|...*.
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:8,-,value(21)
|
||||
|
||||
|
||||
Pattern H15
|
||||
|
||||
|.....
|
||||
|..O.. shimari
|
||||
|.....
|
||||
|..*..
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:8,-,value(18)
|
||||
|
||||
|
||||
Pattern H16
|
||||
|
||||
|.....
|
||||
|...O. shimari
|
||||
|.....
|
||||
|...*.
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:8,-,value(21)
|
||||
|
||||
|
||||
Pattern H17
|
||||
|
||||
|.....
|
||||
|...O. shimari
|
||||
|.....
|
||||
|..*..
|
||||
|.....
|
||||
|O....
|
||||
+-----
|
||||
|
||||
:8,-,value(18)
|
||||
|
||||
|
||||
Pattern H18
|
||||
|
||||
|......
|
||||
|...*.. shimari
|
||||
|......
|
||||
|..O...
|
||||
|......
|
||||
|O.....
|
||||
+------
|
||||
|
||||
:8,-,value(18)
|
||||
|
||||
|
||||
Pattern H19
|
||||
|
||||
|......
|
||||
|...*..
|
||||
|...... shimari
|
||||
|......
|
||||
|..O...
|
||||
|......
|
||||
|O.....
|
||||
+------
|
||||
|
||||
:8,-,value(19)
|
||||
|
||||
|
||||
Pattern H20
|
||||
|
||||
|......
|
||||
|...*..
|
||||
|...... shimari
|
||||
|...O..
|
||||
|......
|
||||
|......
|
||||
|O.....
|
||||
+------
|
||||
|
||||
:8,-,value(19)
|
||||
|
||||
|
||||
Pattern H21
|
||||
|
||||
|......
|
||||
|..*...
|
||||
|...... shimari
|
||||
|...O..
|
||||
|......
|
||||
|......
|
||||
|O.....
|
||||
+------
|
||||
|
||||
:8,-,value(19)
|
||||
|
||||
|
||||
Pattern H22
|
||||
|
||||
|......
|
||||
|..O.*. make shimari extra strong
|
||||
|......
|
||||
|...O..
|
||||
|......
|
||||
|O.....
|
||||
+------
|
||||
|
||||
:8,-,value(12)
|
||||
|
||||
|
||||
Pattern H23
|
||||
|
||||
|......
|
||||
|..O...
|
||||
|...... close corner
|
||||
|...O..
|
||||
|...*..
|
||||
|......
|
||||
|O.....
|
||||
+------
|
||||
|
||||
:8,-,value(11)
|
||||
|
||||
|
||||
Pattern H24
|
||||
|
||||
|......
|
||||
|...O..
|
||||
|...... close corner
|
||||
|...O..
|
||||
|..*...
|
||||
|......
|
||||
|O.....
|
||||
+------
|
||||
|
||||
:8,-,value(11)
|
||||
|
||||
|
||||
Pattern H30
|
||||
|
||||
|...................| san-ren-sei
|
||||
|...O.....*.....O...|
|
||||
|...................|
|
||||
|...................|
|
||||
|O.................O|
|
||||
+-------------------+
|
||||
|
||||
:8,-,value(22)
|
||||
|
||||
|
||||
Pattern H31
|
||||
|
||||
|...................| low chinese
|
||||
|..O............O...|
|
||||
|........*..........|
|
||||
|...................|
|
||||
|O.................O|
|
||||
+-------------------+
|
||||
|
||||
:8,-,value(24)
|
||||
|
||||
|
||||
Pattern H32
|
||||
|
||||
|...................| high chinese
|
||||
|..O.....*......O...|
|
||||
|...................|
|
||||
|...................|
|
||||
|O.................O|
|
||||
+-------------------+
|
||||
|
||||
:8,-,value(24)
|
||||
|
||||
|
||||
Pattern H40
|
||||
|
||||
|............ extend from shimari
|
||||
|..oo........
|
||||
|.........*..
|
||||
|..oo........
|
||||
|............
|
||||
|O...........
|
||||
+------------
|
||||
|
||||
:8,-,value(20)
|
||||
|
||||
|............
|
||||
|..ab........
|
||||
|.........*..
|
||||
|..cd........
|
||||
|............
|
||||
|O...........
|
||||
+------------
|
||||
|
||||
;o_somewhere(a,b) && o_somewhere(c,d)
|
||||
|
||||
|
||||
Pattern H41
|
||||
|
||||
|............ extend from shimari
|
||||
|..oo........
|
||||
|............
|
||||
|..oo.....*..
|
||||
|............
|
||||
|O...........
|
||||
+------------
|
||||
|
||||
:8,-,value(20)
|
||||
|
||||
|............
|
||||
|..ab........
|
||||
|............
|
||||
|..cd.....*..
|
||||
|............
|
||||
|O...........
|
||||
+------------
|
||||
|
||||
;o_somewhere(a,b) && o_somewhere(c,d)
|
||||
|
||||
|
||||
Pattern H42
|
||||
|
||||
|............ extend from shimari
|
||||
|............
|
||||
|..o......*..
|
||||
|..o.O.......
|
||||
|............
|
||||
|O...........
|
||||
+------------
|
||||
|
||||
:8,-,value(17)
|
||||
|
||||
|............
|
||||
|............
|
||||
|..a......*..
|
||||
|..b.O.......
|
||||
|............
|
||||
|O...........
|
||||
+------------
|
||||
|
||||
;o_somewhere(a,b)
|
||||
|
||||
|
||||
Pattern H43
|
||||
|
||||
|............ extend from shimari
|
||||
|............
|
||||
|..o.O.......
|
||||
|..o......*..
|
||||
|............
|
||||
|O...........
|
||||
+------------
|
||||
|
||||
:8,-,value(17)
|
||||
|
||||
|............
|
||||
|............
|
||||
|..a.O.......
|
||||
|..b......*..
|
||||
|............
|
||||
|O...........
|
||||
+------------
|
||||
|
||||
;o_somewhere(a,b)
|
||||
|
||||
|
||||
Pattern H44
|
||||
|
||||
|..oo........ extend from hoshi
|
||||
|............
|
||||
|...O........
|
||||
|.........*..
|
||||
|............
|
||||
|O...........
|
||||
+------------
|
||||
|
||||
:8,-,value(17)
|
||||
|
||||
|
||||
Pattern H45
|
||||
|
||||
|..oo........ extend from hoshi
|
||||
|............
|
||||
|...O.....*..
|
||||
|............
|
||||
|............
|
||||
|O...........
|
||||
+------------
|
||||
|
||||
:8,-,value(17)
|
||||
|
||||
|
||||
Pattern H50
|
||||
|
||||
|..oooo........ early edge move
|
||||
|..ooo....*....
|
||||
|..............
|
||||
|O.............
|
||||
+--------------
|
||||
|
||||
:8,-,value(16)
|
||||
|
||||
|
||||
Pattern H51
|
||||
|
||||
|..oooo........
|
||||
|..ooo....*.... early edge move
|
||||
|..oooo........
|
||||
|..............
|
||||
|O.............
|
||||
+--------------
|
||||
|
||||
:8,-,value(16)
|
||||
|
||||
|
||||
Pattern H52
|
||||
|
||||
|..ooo........
|
||||
|..ooo....O... iron pillar
|
||||
|..ooo....*...
|
||||
|.............
|
||||
|O............
|
||||
+-------------
|
||||
|
||||
:8,-,value(12)
|
||||
|
||||
|
||||
Pattern H53
|
||||
|
||||
|..ooo....*...
|
||||
|..ooo........ jump
|
||||
|..ooo....O...
|
||||
|.............
|
||||
|O............
|
||||
+-------------
|
||||
|
||||
:8,-,value(12)
|
||||
|
||||
|
||||
Pattern H60
|
||||
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo.........
|
||||
|..ooo....*.... early center move
|
||||
|..ooo.........
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..............
|
||||
|O.............
|
||||
+--------------
|
||||
|
||||
:/,-,value(14)
|
||||
|
||||
|
||||
Pattern H61
|
||||
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo.........
|
||||
|..ooo....*.... early center move
|
||||
|..ooo.........
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..............
|
||||
|O.............
|
||||
+--------------
|
||||
|
||||
:/,-,value(19)
|
||||
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo.........
|
||||
|..ooo....*....
|
||||
|..ooo.........
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..............
|
||||
|O.............
|
||||
+--------------
|
||||
|
||||
;remaining_handicap_stones() > 4
|
||||
|
||||
|
||||
Pattern H62
|
||||
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo.........
|
||||
|..ooo...*.!... early center formation
|
||||
|..ooo.........
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..............
|
||||
|O.............
|
||||
+--------------
|
||||
|
||||
:8,-,value(19)
|
||||
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo.........
|
||||
|..ooo...*.!...
|
||||
|..ooo.........
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..............
|
||||
|O.............
|
||||
+--------------
|
||||
|
||||
;remaining_handicap_stones() > 9
|
||||
|
||||
|
||||
Pattern H63
|
||||
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo....!....
|
||||
|..ooo...*.!... early center ponnuki
|
||||
|..ooo....!....
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..............
|
||||
|O.............
|
||||
+--------------
|
||||
|
||||
:8,-,value(19)
|
||||
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo....!....
|
||||
|..ooo...*.!...
|
||||
|..ooo....!....
|
||||
|..............
|
||||
|..............
|
||||
|..............
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..ooo...ooo...
|
||||
|..............
|
||||
|O.............
|
||||
+--------------
|
||||
|
||||
;total_handicap_stones() > 18
|
||||
|
||||
|
||||
Pattern H70
|
||||
|
||||
+-------------------+
|
||||
|O.................O| special influence oriented pattern
|
||||
|...................|
|
||||
|...................|
|
||||
|.........!.........|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|...!.....*.....!...|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|.........!.........|
|
||||
|...................|
|
||||
|...................|
|
||||
|O.................O|
|
||||
+-------------------+
|
||||
|
||||
:8,-,value(19)
|
||||
|
||||
+-------------------+
|
||||
|O.................O|
|
||||
|...................|
|
||||
|...................|
|
||||
|.........!.........|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|...!.....*.....!...|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|...................|
|
||||
|.........!.........|
|
||||
|...................|
|
||||
|...................|
|
||||
|O.................O|
|
||||
+-------------------+
|
||||
|
||||
;total_handicap_stones() >= 5
|
||||
|
||||
|
||||
Pattern H71
|
||||
|
||||
+-------------------+
|
||||
|O.................O| great wall!
|
||||
|...................|
|
||||
|...................|
|
||||
|.........!.........|
|
||||
|...................|
|
||||
|...................|
|
||||
|..........!........|
|
||||
|...................|
|
||||
|...................|
|
||||
|.........*.........|
|
||||
|...................|
|
||||
|...................|
|
||||
|........!..........|
|
||||
|...................|
|
||||
|...................|
|
||||
|.........!.........|
|
||||
|...................|
|
||||
|...................|
|
||||
|O.................O|
|
||||
+-------------------+
|
||||
|
||||
:8,-,value(19)
|
||||
|
||||
+-------------------+
|
||||
|O.................O|
|
||||
|...................|
|
||||
|...................|
|
||||
|.........!.........|
|
||||
|...................|
|
||||
|...................|
|
||||
|..........!........|
|
||||
|...................|
|
||||
|...................|
|
||||
|.........*.........|
|
||||
|...................|
|
||||
|...................|
|
||||
|........!..........|
|
||||
|...................|
|
||||
|...................|
|
||||
|.........!.........|
|
||||
|...................|
|
||||
|...................|
|
||||
|O.................O|
|
||||
+-------------------+
|
||||
|
||||
;total_handicap_stones() >= 5
|
||||
|
||||
|
||||
Pattern H80
|
||||
|
||||
......
|
||||
...O.. strengthen connection
|
||||
O.....
|
||||
...*..
|
||||
.....o
|
||||
....oo
|
||||
|
||||
:8,-,value(8)
|
||||
|
||||
|
||||
Pattern H81
|
||||
|
||||
....oo
|
||||
......
|
||||
O..... jump out
|
||||
...*..
|
||||
O.....
|
||||
......
|
||||
....oo
|
||||
|
||||
:8,-,value(8)
|
||||
|
||||
|
||||
Pattern H82
|
||||
|
||||
....oo
|
||||
O...oo jump out
|
||||
......
|
||||
O..*..
|
||||
......
|
||||
....oo
|
||||
|
||||
:8,-,value(8)
|
||||
|
||||
|
||||
Pattern H83
|
||||
|
||||
....oo
|
||||
.....o
|
||||
O..... jump out
|
||||
O..*..
|
||||
......
|
||||
....oo
|
||||
|
||||
:8,-,value(8)
|
||||
|
||||
|
||||
Pattern H84
|
||||
|
||||
o...oo one space jump
|
||||
......
|
||||
O.*...
|
||||
......
|
||||
o...oo
|
||||
|
||||
:8,-,value(5)
|
||||
|
||||
|
||||
Pattern H85
|
||||
|
||||
...... strengthen
|
||||
......
|
||||
..O*..
|
||||
......
|
||||
......
|
||||
|
||||
:8,-,value(5)
|
||||
|
||||
|
||||
Pattern H86
|
||||
|
||||
o..o one space jump
|
||||
....
|
||||
O.*.
|
||||
....
|
||||
o..o
|
||||
|
||||
:8,-,value(1)
|
||||
|
||||
|
||||
Pattern H87
|
||||
|
||||
...o strengthen
|
||||
....
|
||||
.O*.
|
||||
....
|
||||
...o
|
||||
|
||||
:8,-,value(1)
|
||||
|
||||
|
||||
# END OF FILE
|
889
gnugo/patterns/helpers.c
Normal file
889
gnugo/patterns/helpers.c
Normal file
@ -0,0 +1,889 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "liberty.h"
|
||||
#include "patterns.h"
|
||||
|
||||
|
||||
#define TRYMOVE(pos, color) trymove(pos, color, "helper", NO_MOVE)
|
||||
#define OFFSET_BY(x, y) AFFINE_TRANSFORM(OFFSET(x, y), trans, move)
|
||||
#define ARGS struct pattern *pattern, int trans, int move, int color
|
||||
|
||||
|
||||
/* This file contains helper functions which assist the pattern matcher.
|
||||
* They are invoked with (move) = the position on the board marked with '*'.
|
||||
* They are invoked with color = WHITE or BLACK: any pieces on the
|
||||
* board marked with 'O' in the pattern will always contain color,
|
||||
* and 'X's contain OTHER_COLOR(color)
|
||||
*
|
||||
* The helper must return 0 if the pattern is rejected and 1 otherwise.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/* Jump out into nothingness. To avoid jumping into our own territory,
|
||||
* we use the "area" measure. Also we never ever jump into our own
|
||||
* established eyespace.
|
||||
*/
|
||||
|
||||
int
|
||||
jump_out_helper(ARGS)
|
||||
{
|
||||
int own_eyespace;
|
||||
|
||||
UNUSED(trans); UNUSED(pattern);
|
||||
|
||||
own_eyespace = (white_eye[move].color == color);
|
||||
|
||||
if (whose_area(OPPOSITE_INFLUENCE(color), move) != color && !own_eyespace)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Make a long jump into nothingness. Since these jumps are not
|
||||
* securely connected we don't use them to jump into the opponent's
|
||||
* zone of control.
|
||||
*/
|
||||
|
||||
int
|
||||
jump_out_far_helper(ARGS)
|
||||
{
|
||||
if (whose_area(OPPOSITE_INFLUENCE(color), move) != OTHER_COLOR(color))
|
||||
return jump_out_helper(pattern, trans, move, color);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Active until the opponent has played his first stone.
|
||||
*/
|
||||
|
||||
int
|
||||
high_handicap_helper(ARGS)
|
||||
{
|
||||
UNUSED(trans); UNUSED(pattern); UNUSED(move);
|
||||
|
||||
return !doing_scoring && stones_on_board(OTHER_COLOR(color)) == 0;
|
||||
}
|
||||
|
||||
|
||||
/* Active when the opponent is thought to be everywhere dead. This
|
||||
* typically happens early in high handicap games on small boards.
|
||||
* This helper is used by patterns intended to reinforce possible
|
||||
* weaknesses in the position.
|
||||
*/
|
||||
|
||||
int
|
||||
reinforce_helper(ARGS)
|
||||
{
|
||||
UNUSED(trans); UNUSED(pattern);
|
||||
|
||||
return (!doing_scoring
|
||||
&& !lively_dragon_exists(OTHER_COLOR(color))
|
||||
&& safe_move(move, color));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* XXO XXc decrease eye space in sente (unless it kills)
|
||||
* .*X e*a
|
||||
* --- ---
|
||||
*
|
||||
* or
|
||||
*
|
||||
* XXO XXc decrease eye space in sente (unless it kills)
|
||||
* .*X e*a
|
||||
* XXO XXd
|
||||
*
|
||||
* or
|
||||
*
|
||||
* |XXO |XXc decrease eye space in sente (unless it kills)
|
||||
* |.*X |e*a
|
||||
* |XXO |XXd
|
||||
*
|
||||
* or
|
||||
*
|
||||
* |XXO |XXc decrease eye space in sente (unless it kills)
|
||||
* |.*X |e*a
|
||||
* +--- +---
|
||||
*
|
||||
*/
|
||||
|
||||
int
|
||||
throw_in_atari_helper(ARGS)
|
||||
{
|
||||
int apos, bpos, cpos, dpos;
|
||||
int success = 0;
|
||||
int other = OTHER_COLOR(color);
|
||||
int libs[2];
|
||||
UNUSED(pattern);
|
||||
|
||||
apos = OFFSET_BY(0, 1);
|
||||
cpos = OFFSET_BY(-1, 1);
|
||||
dpos = OFFSET_BY(1, 1);
|
||||
|
||||
/* Find second liberty of the stone a. */
|
||||
findlib(apos, 2, libs);
|
||||
if (libs[0] != move)
|
||||
bpos = libs[0];
|
||||
else
|
||||
bpos = libs[1];
|
||||
|
||||
if (TRYMOVE(move, color)) {
|
||||
if (!attack(cpos, NULL) && !(ON_BOARD(dpos) && attack(dpos, NULL))) {
|
||||
if (TRYMOVE(bpos, other)) {
|
||||
if (attack(apos, NULL))
|
||||
success = 1;
|
||||
popgo();
|
||||
}
|
||||
else {
|
||||
success = 1; /* X move at (bpos) would have been suicide */
|
||||
}
|
||||
}
|
||||
popgo();
|
||||
}
|
||||
|
||||
/* The followup is to capture the "a" string. Estimate the value to
|
||||
* twice the size.
|
||||
*/
|
||||
add_followup_value(move, 2 * worm[apos].effective_size);
|
||||
TRACE("...followup value %f\n", 2 * worm[apos].effective_size);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
/* This is intended for use in autohelpers. */
|
||||
|
||||
/* Check whether the string at (str) can attack any surrounding
|
||||
* string. If so, return false as the move to create a seki (probably)
|
||||
* wouldn't work.
|
||||
*/
|
||||
|
||||
int
|
||||
seki_helper(int str)
|
||||
{
|
||||
int r;
|
||||
int adj;
|
||||
int adjs[MAXCHAIN];
|
||||
|
||||
adj = chainlinks(str, adjs);
|
||||
for (r = 0; r < adj; r++)
|
||||
if (worm[adjs[r]].attack_codes[0] != 0)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* XO aO
|
||||
* O* O*
|
||||
*
|
||||
* Increase the cutstone2 field if * is a potential cutting point,
|
||||
* i.e. if it does work as a cutting point once 'a' has been
|
||||
* defended. This helper is expected to always return 0.
|
||||
*/
|
||||
|
||||
int
|
||||
cutstone2_helper(ARGS)
|
||||
{
|
||||
int apos;
|
||||
int bpos;
|
||||
int cpos;
|
||||
int dpos;
|
||||
UNUSED(pattern);
|
||||
UNUSED(color);
|
||||
|
||||
if (stackp > 0)
|
||||
return 0;
|
||||
|
||||
apos = OFFSET_BY(-1, -1);
|
||||
bpos = OFFSET_BY(-1, 0);
|
||||
cpos = OFFSET_BY( 0, -1);
|
||||
|
||||
if (worm[apos].defense_codes[0] == 0)
|
||||
return 0;
|
||||
|
||||
dpos = worm[apos].defense_points[0];
|
||||
|
||||
if (TRYMOVE(dpos, board[apos])) {
|
||||
if (!board[bpos] || attack(bpos, NULL)
|
||||
|| !board[cpos] || attack(cpos, NULL)
|
||||
|| safe_move(move, board[apos]) != 0) {
|
||||
popgo();
|
||||
worm[worm[apos].origin].cutstone2++;
|
||||
propagate_worm(worm[apos].origin);
|
||||
return 0;
|
||||
}
|
||||
popgo();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* ?x?? ?x??
|
||||
* ?X.. ?Xb.
|
||||
* O*.. c*a.
|
||||
*
|
||||
* Is the push at * sente? c must have exactly two liberties. This is
|
||||
* called edge_double_sente_helper because it mainly called for edge
|
||||
* hanes, but it can be used anywhere on the board.
|
||||
*/
|
||||
|
||||
int
|
||||
edge_double_sente_helper(int move, int apos, int bpos, int cpos)
|
||||
{
|
||||
int color = board[cpos];
|
||||
int success = 0;
|
||||
ASSERT1((color == BLACK || color == WHITE), move);
|
||||
|
||||
if (TRYMOVE(move, color)) {
|
||||
ASSERT1(countlib(move) == 2, move);
|
||||
success = connect_and_cut_helper(move, apos, bpos);
|
||||
popgo();
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is intended for use in autohelpers.
|
||||
*
|
||||
* Give a conservative estimate of the value of saving the string (str)
|
||||
* by capturing one opponent stone.
|
||||
*/
|
||||
|
||||
void
|
||||
threaten_to_save_helper(int move, int str)
|
||||
{
|
||||
add_followup_value(move, 2.0 + 2.0 * worm[str].effective_size);
|
||||
TRACE("...followup value %f\n", 2.0 + 2.0 * worm[str].effective_size);
|
||||
}
|
||||
|
||||
|
||||
/* For use in autohelpers.
|
||||
*
|
||||
* Adds a reverse followup value if the opponent's move here would threaten
|
||||
* to capture (str).
|
||||
*/
|
||||
void
|
||||
prevent_attack_threat_helper(int move, int str)
|
||||
{
|
||||
add_reverse_followup_value(move, 2.0 * worm[str].effective_size);
|
||||
TRACE("...reverse followup value %f\n", 2.0 * worm[str].effective_size);
|
||||
}
|
||||
|
||||
|
||||
/* This function is obsolete. Code in `value_moves.c' is more general. */
|
||||
#if 0
|
||||
|
||||
/*
|
||||
* This is intended for use in autohelpers.
|
||||
*
|
||||
* Estimate the value of capturing the string (str) and add this as
|
||||
* a followup value. We don't do this for too stupid looking threats,
|
||||
* however, e.g. in a position like
|
||||
*
|
||||
* OOOO..
|
||||
* XXX.*.
|
||||
* XOOOX.
|
||||
* XXXXO.
|
||||
*
|
||||
* where X can get out of atari with profit by capturing three O stones.
|
||||
*
|
||||
* Another case where we don't award the followup value is when the
|
||||
* opponent can defend with a threat against our move, e.g. in this
|
||||
* position:
|
||||
*
|
||||
* .OOOXX.
|
||||
* .OXXO.X
|
||||
* ..*.X..
|
||||
* ..XX...
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
threaten_to_capture_helper(int move, int str)
|
||||
{
|
||||
int adj, adjs[MAXCHAIN];
|
||||
int defense_move;
|
||||
int k;
|
||||
|
||||
adj = chainlinks2(str, adjs, 1);
|
||||
for (k = 0; k < adj; k++)
|
||||
if (worm[adjs[k]].defense_codes[0] != 0
|
||||
&& !does_defend(move, adjs[k]))
|
||||
return;
|
||||
|
||||
if (!TRYMOVE(move, OTHER_COLOR(board[str])))
|
||||
return;
|
||||
if (find_defense(str, &defense_move) != 0
|
||||
&& defense_move != NO_MOVE
|
||||
&& TRYMOVE(defense_move, board[str])) {
|
||||
if (board[move] == EMPTY || attack(move, NULL) != 0) {
|
||||
popgo();
|
||||
popgo();
|
||||
return;
|
||||
}
|
||||
popgo();
|
||||
}
|
||||
|
||||
/* In addition to the move found by find_defense(), also try all
|
||||
* chain breaking moves in the same way.
|
||||
*/
|
||||
adj = chainlinks2(str, adjs, 1);
|
||||
for (k = 0; k < adj; k++) {
|
||||
int lib;
|
||||
findlib(adjs[k], 1, &lib);
|
||||
if (TRYMOVE(lib, board[str])) {
|
||||
if (!attack(str, NULL)
|
||||
&& (board[move] == EMPTY || attack(move, NULL) != 0)) {
|
||||
popgo();
|
||||
popgo();
|
||||
return;
|
||||
}
|
||||
popgo();
|
||||
}
|
||||
}
|
||||
|
||||
popgo();
|
||||
|
||||
add_followup_value(move, 2.0 * worm[str].effective_size);
|
||||
TRACE("...followup value %f\n", 2.0 * worm[str].effective_size);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* This is intended for use in autohelpers.
|
||||
*
|
||||
* Estimate the value of defending a string which can be put into
|
||||
* atari and add this as a reverse followup value.
|
||||
*/
|
||||
|
||||
void
|
||||
defend_against_atari_helper(int move, int str)
|
||||
{
|
||||
int adj, adjs[MAXCHAIN];
|
||||
int libs[2];
|
||||
int k;
|
||||
|
||||
ASSERT1(countlib(str) == 2, str);
|
||||
|
||||
/* No value if the string can capture out of atari. */
|
||||
adj = chainlinks2(str, adjs, 1);
|
||||
for (k = 0; k < adj; k++)
|
||||
if (worm[adjs[k]].defense_codes[0] != 0
|
||||
&& !does_defend(move, adjs[k]))
|
||||
return;
|
||||
|
||||
/* No value if opponent has no safe atari. */
|
||||
findlib(str, 2, libs);
|
||||
if (!safe_move(libs[0], OTHER_COLOR(board[str]))
|
||||
&& !safe_move(libs[1], OTHER_COLOR(board[str])))
|
||||
return;
|
||||
|
||||
TRACE("...reverse followup value %f\n", 2.0 * worm[str].effective_size);
|
||||
add_reverse_followup_value(move, 2.0 * worm[str].effective_size);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This is intended for use in conn.db autohelpers.
|
||||
*
|
||||
* Amalgamate either a with b or c with b, depending on which of the
|
||||
* two dragons a and c is largest.
|
||||
*
|
||||
* If either of these pairs already have been amalgamated somehow,
|
||||
* do nothing.
|
||||
*/
|
||||
|
||||
void
|
||||
amalgamate_most_valuable_helper(int apos, int bpos, int cpos)
|
||||
{
|
||||
if (!is_same_dragon(apos, bpos) && !is_same_dragon(bpos, cpos)) {
|
||||
if (dragon[apos].effective_size >= dragon[cpos].effective_size)
|
||||
join_dragons(apos, bpos);
|
||||
else
|
||||
join_dragons(bpos, cpos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This is intended for use in autohelpers.
|
||||
*
|
||||
* Returns 1 if (pos) is adjacent to a stone which can be captured by ko.
|
||||
*/
|
||||
|
||||
int
|
||||
finish_ko_helper(int pos)
|
||||
{
|
||||
int adj, adjs[MAXCHAIN];
|
||||
int lib;
|
||||
int k;
|
||||
|
||||
adj = chainlinks2(pos, adjs, 1);
|
||||
for (k = 0; k < adj; k++) {
|
||||
if (countstones(adjs[k]) == 1) {
|
||||
findlib(adjs[k], 1, &lib);
|
||||
if (is_ko(lib, board[pos], NULL))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This is intended for use in autohelpers.
|
||||
*
|
||||
* Returns 1 if (ai, aj) is next to a ko point.
|
||||
*/
|
||||
|
||||
int
|
||||
squeeze_ko_helper(int pos)
|
||||
{
|
||||
int libs[2];
|
||||
int liberties;
|
||||
int k;
|
||||
|
||||
liberties = findlib(pos, 2, libs);
|
||||
ASSERT1(liberties == 2, pos);
|
||||
|
||||
for (k = 0; k < liberties; k++) {
|
||||
int aa = libs[k];
|
||||
if (is_ko(aa, OTHER_COLOR(board[pos]), NULL))
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is intended for use in autohelpers.
|
||||
*
|
||||
* If after playing a and b, the string at c can be attacked, this
|
||||
* function adds a small fixed move value for a move which defends
|
||||
* c.
|
||||
*/
|
||||
|
||||
int
|
||||
backfill_helper(int apos, int bpos, int cpos)
|
||||
{
|
||||
int color = board[cpos];
|
||||
int other = OTHER_COLOR(color);
|
||||
int dpos = NO_MOVE;
|
||||
|
||||
if (TRYMOVE(apos, color)) {
|
||||
if (TRYMOVE(bpos, other)) {
|
||||
if (attack(cpos, NULL) && find_defense(cpos, &dpos)) {
|
||||
set_minimum_move_value(dpos, 0.1);
|
||||
TRACE("%o...setting min move value of %1m to 0.1\n", dpos);
|
||||
}
|
||||
popgo();
|
||||
}
|
||||
popgo();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Returns true if (apos) kills or threatens to kill (bpos). */
|
||||
|
||||
int
|
||||
owl_threatens_attack(int apos, int bpos)
|
||||
{
|
||||
if (DRAGON2(bpos).owl_status == CRITICAL
|
||||
&& DRAGON2(bpos).owl_attack_point == apos)
|
||||
return 1;
|
||||
|
||||
if (DRAGON2(bpos).owl_threat_status == CAN_THREATEN_ATTACK)
|
||||
if (DRAGON2(bpos).owl_attack_point == apos
|
||||
|| DRAGON2(bpos).owl_second_attack_point == apos)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Returns true if O needs to connect at c in the position below after
|
||||
* O at b and X at d, because X can cut at c. In general d is the
|
||||
* second liberty of A, which must have exactly two liberties.
|
||||
*
|
||||
* |.X |dX
|
||||
* |XO |AO
|
||||
* |XO |Ae
|
||||
* |.. |bc
|
||||
*/
|
||||
|
||||
int
|
||||
connect_and_cut_helper(int Apos, int bpos, int cpos)
|
||||
{
|
||||
int dpos;
|
||||
int epos = NO_MOVE;
|
||||
int other = board[Apos];
|
||||
int color = OTHER_COLOR(other);
|
||||
int libs[2];
|
||||
int liberties = findlib(Apos, 2, libs);
|
||||
int result = 0;
|
||||
int k;
|
||||
|
||||
gg_assert(IS_STONE(color));
|
||||
gg_assert(liberties == 2);
|
||||
|
||||
if (libs[0] == bpos)
|
||||
dpos = libs[1];
|
||||
else
|
||||
dpos = libs[0];
|
||||
|
||||
for (k = 0; k < 4; k++)
|
||||
if (board[cpos + delta[k]] == color
|
||||
&& neighbor_of_string(cpos + delta[k], Apos)) {
|
||||
epos = cpos + delta[k];
|
||||
break;
|
||||
}
|
||||
|
||||
gg_assert(epos != NO_MOVE);
|
||||
|
||||
if (TRYMOVE(bpos, color)) {
|
||||
if (TRYMOVE(dpos, other)) {
|
||||
if (TRYMOVE(cpos, other)) {
|
||||
if (board[bpos] == EMPTY
|
||||
|| board[epos] == EMPTY
|
||||
|| !defend_both(bpos, epos))
|
||||
result = 1;
|
||||
popgo();
|
||||
}
|
||||
popgo();
|
||||
}
|
||||
popgo();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* This is similar to connect_and_cut_helper(), except it starts with
|
||||
* a move at A and that d is found as a general defense point for A. A
|
||||
* is no longer restricted to two liberties.
|
||||
*
|
||||
* |.X |dX
|
||||
* |XO |XO
|
||||
* |.O |Ae
|
||||
* |.. |bc
|
||||
*/
|
||||
|
||||
int
|
||||
connect_and_cut_helper2(int Apos, int bpos, int cpos, int color)
|
||||
{
|
||||
int dpos;
|
||||
int epos = NO_MOVE;
|
||||
int other = OTHER_COLOR(color);
|
||||
int result = 0;
|
||||
int k;
|
||||
|
||||
gg_assert(IS_STONE(color));
|
||||
|
||||
|
||||
if (TRYMOVE(Apos, color)) {
|
||||
for (k = 0; k < 4; k++)
|
||||
if (board[cpos + delta[k]] == other
|
||||
&& neighbor_of_string(cpos + delta[k], Apos)) {
|
||||
epos = cpos + delta[k];
|
||||
break;
|
||||
}
|
||||
|
||||
gg_assert(epos != NO_MOVE);
|
||||
|
||||
if (TRYMOVE(bpos, other)) {
|
||||
if (!find_defense(Apos, &dpos) || dpos == NO_MOVE) {
|
||||
popgo();
|
||||
popgo();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (TRYMOVE(dpos, color)) {
|
||||
if (TRYMOVE(cpos, color)) {
|
||||
if (board[bpos] == EMPTY
|
||||
|| board[epos] == EMPTY
|
||||
|| !defend_both(bpos, epos))
|
||||
result = 1;
|
||||
popgo();
|
||||
}
|
||||
popgo();
|
||||
}
|
||||
popgo();
|
||||
}
|
||||
popgo();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
test_attack_either_move(int move, int color, int worma, int wormb)
|
||||
{
|
||||
ASSERT_ON_BOARD1(move);
|
||||
ASSERT1(board[move] == EMPTY, move);
|
||||
ASSERT1(board[worma] == OTHER_COLOR(color)
|
||||
&& board[wormb] == OTHER_COLOR(color), move);
|
||||
|
||||
if (!defend_both(worma, wormb)) {
|
||||
if (0)
|
||||
gprintf("%1m: Reject attack_either_move for %1m, %1m (can't defend both)\n",
|
||||
move, worma, wormb);
|
||||
return;
|
||||
}
|
||||
if (trymove(move, color, "test_attack_either_move", worma)) {
|
||||
if (board[worma] == OTHER_COLOR(color)
|
||||
&& board[wormb] == OTHER_COLOR(color)) {
|
||||
if (!find_defense(worma, NULL) || !find_defense(wormb, NULL)) {
|
||||
if (0)
|
||||
gprintf("%1m: Rej. attack_either_move for %1m & %1m (regular attack)\n",
|
||||
move, worma, wormb);
|
||||
}
|
||||
else if (!defend_both(worma, wormb))
|
||||
add_either_move(move, ATTACK_STRING, worma, ATTACK_STRING, wormb);
|
||||
else {
|
||||
if (0)
|
||||
gprintf("%1m: Rej. attack_either_move for %1m & %1m (doesn't work)\n",
|
||||
move, worma, wormb);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (0)
|
||||
gprintf("%1m: Rej. attack_either_move for %1m & %1m (captured directly)\n",
|
||||
move, worma, wormb);
|
||||
popgo();
|
||||
}
|
||||
}
|
||||
|
||||
/* True if str is adjacent to a stone in atari, which is tactically
|
||||
* attackable (to exclude pointless captures of snapback stones).
|
||||
*/
|
||||
int
|
||||
adjacent_to_stone_in_atari(int str)
|
||||
{
|
||||
int adj;
|
||||
int adjs[MAXCHAIN];
|
||||
int k;
|
||||
|
||||
adj = chainlinks2(str, adjs, 1);
|
||||
for (k = 0; k < adj; k++)
|
||||
if (attack(adjs[k], NULL))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* True if str is adjacent to a stone in atari, which is tactically
|
||||
* defendable.
|
||||
*/
|
||||
int
|
||||
adjacent_to_defendable_stone_in_atari(int str)
|
||||
{
|
||||
int adj;
|
||||
int adjs[MAXCHAIN];
|
||||
int k;
|
||||
|
||||
adj = chainlinks2(str, adjs, 1);
|
||||
for (k = 0; k < adj; k++)
|
||||
if (attack_and_defend(adjs[k], NULL, NULL, NULL, NULL))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
backfill_replace(int move, int str)
|
||||
{
|
||||
int defense_move = NO_MOVE;
|
||||
|
||||
if (TRYMOVE(move, OTHER_COLOR(board[str]))) {
|
||||
if (attack_and_defend(str, NULL, NULL, NULL, &defense_move)) {
|
||||
/* Must undo the trymove before adding the replacement move. */
|
||||
popgo();
|
||||
add_replacement_move(move, defense_move, board[str]);
|
||||
}
|
||||
else
|
||||
popgo();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* True if
|
||||
* 1. White to move.
|
||||
* 2. All white stones look dead.
|
||||
* 3. Less than 40% of the board is filled or less than 20% of the
|
||||
* board is filled with white stones.
|
||||
*
|
||||
* This is intended for patterns forcing white to thrash around early
|
||||
* in high handicap games, instead of passing because it looks like no
|
||||
* stones can live.
|
||||
*/
|
||||
int
|
||||
thrash_around_helper(ARGS)
|
||||
{
|
||||
UNUSED(pattern);
|
||||
UNUSED(trans);
|
||||
UNUSED(move);
|
||||
|
||||
/* Do not generate these moves when doing scoring or if fuseki move
|
||||
* generation is disabled (typically used when solving life and
|
||||
* death problems embedded on a big board).
|
||||
*/
|
||||
if (doing_scoring
|
||||
|| disable_fuseki
|
||||
|| (stones_on_board(BLACK | WHITE) > board_size * board_size * 2 / 5
|
||||
&& stones_on_board(WHITE) > board_size * board_size / 5)
|
||||
|| color == BLACK
|
||||
|| lively_dragon_exists(WHITE))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Returns true if
|
||||
*
|
||||
* 1. The board size is odd.
|
||||
* 2. A white move is being generated.
|
||||
* 3. The komi is less than or equal to zero.
|
||||
* 4. str is placed at tengen.
|
||||
* 5. At least 10 moves have been played.
|
||||
* 6. The board is currently mirror symmetric.
|
||||
*
|
||||
* This is intended for patterns to break mirror go when black starts at
|
||||
* tengen and then mirrors white. We only care about breaking the mirroring
|
||||
* if komi is non-positive, otherwise the mirroring is to our advantage.
|
||||
*/
|
||||
int
|
||||
break_mirror_helper(int str, int color)
|
||||
{
|
||||
if (board_size % 2 == 1
|
||||
&& color == WHITE
|
||||
&& komi <= 0.0
|
||||
&& I(str) == (board_size - 1) / 2
|
||||
&& J(str) == (board_size - 1) / 2
|
||||
&& stones_on_board(BLACK | WHITE) > 10
|
||||
&& test_symmetry_after_move(PASS_MOVE, EMPTY, 1))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* This helper is intended to detect semeai kind of positions where
|
||||
* the tactical reading can't be trusted enough to allow amalgamation
|
||||
* over presumably tactically dead strings.
|
||||
*
|
||||
* It has turned out to be best not to trust tactical reading of three
|
||||
* and four liberty strings at all. Not trusting two liberty strings
|
||||
* leads to an underamalgamation and unnecessarily many dragons on the
|
||||
* board. Therefore we try to detect two liberty strings with an
|
||||
* enclosed nakade, which after capturing leads to an unreliable
|
||||
* reading at three or four liberties.
|
||||
*
|
||||
* More specifically we check whether the string has a neighbor with
|
||||
* the following properties:
|
||||
* 1. At least three stones in size.
|
||||
* 2. All its liberties are common liberties with the string.
|
||||
* 3. It has no second order liberties.
|
||||
* 4. Its liberties are adjacent to no other strings than itself and
|
||||
* the primary string.
|
||||
*
|
||||
* If we find such a neighbor 1 is returned, otherwise 0.
|
||||
*/
|
||||
int distrust_tactics_helper(int str)
|
||||
{
|
||||
int color = board[str];
|
||||
int adj;
|
||||
int adjs[MAXCHAIN];
|
||||
int k;
|
||||
int r;
|
||||
int s;
|
||||
int lib = countlib(str);
|
||||
|
||||
ASSERT1(IS_STONE(board[str]), str);
|
||||
|
||||
if (lib > 2)
|
||||
return 1;
|
||||
else if (lib == 1)
|
||||
return 0;
|
||||
|
||||
adj = chainlinks3(str, adjs, lib);
|
||||
for (r = 0; r < adj; r++) {
|
||||
int nakade = 1;
|
||||
int adjlib;
|
||||
int adjlibs[3];
|
||||
if (countstones(adjs[r]) < 3)
|
||||
continue;
|
||||
adjlib = findlib(adjs[r], 3, adjlibs);
|
||||
for (s = 0; s < adjlib; s++) {
|
||||
int str_found = 0;
|
||||
for (k = 0; k < 4; k++) {
|
||||
int pos = adjlibs[s] + delta[k];
|
||||
if (board[pos] == EMPTY
|
||||
&& !liberty_of_string(pos, adjs[r]))
|
||||
nakade = 0;
|
||||
else if (board[pos] == color) {
|
||||
if (same_string(pos, str))
|
||||
str_found = 1;
|
||||
else
|
||||
nakade = 0;
|
||||
}
|
||||
else if (board[pos] == OTHER_COLOR(color)
|
||||
&& !same_string(pos, adjs[r]))
|
||||
nakade = 0;
|
||||
}
|
||||
if (!str_found)
|
||||
nakade = 0;
|
||||
}
|
||||
if (nakade)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* LOCAL Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
11740
gnugo/patterns/hoshi_keima.db
Normal file
11740
gnugo/patterns/hoshi_keima.db
Normal file
File diff suppressed because it is too large
Load Diff
715
gnugo/patterns/hoshi_keima.sgf
Normal file
715
gnugo/patterns/hoshi_keima.sgf
Normal file
@ -0,0 +1,715 @@
|
||||
This is GNU Go, a Go program. Contact gnugo@gnu.org, or see
|
||||
http://www.gnu.org/software/gnugo/ for more information.
|
||||
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008 and 2009 by the Free Software Foundation.
|
||||
|
||||
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 - 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 in file COPYING 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 02111, USA.
|
||||
|
||||
(;GM[1]FF[3]
|
||||
SZ[19]HA[0]
|
||||
GN[Hoshi+keima joseki database]
|
||||
;B[pd]C[0];W[qf];C[#kogeima kakari]
|
||||
(;B[qh]C[j
|
||||
]MA[mj];C[#hasami]
|
||||
(;W[qc]C[S]MA[mj];C[#w invades]
|
||||
(;B[pc]C[#Not good unless B has stone around K17];C[#b blocks on left]
|
||||
;W[qd]C[S]MA[nh];B[pe]C[U
|
||||
]MA[nh]
|
||||
(;W[qb]C[S]MA[mj];B[pf]C[S]MA[mj]
|
||||
(;W[rf]C[S]MA[mj];B[oh]C[S]MA[mj])
|
||||
|
||||
(;W[qg]C[0]MA[mj];B[pg]C[S]MA[mj])
|
||||
)
|
||||
|
||||
(;W[rf]C[S]MA[mj];B[og]C[S]MA[ni])
|
||||
|
||||
(;W[qe]C[0]MA[mj];B[og]C[S]MA[ni])
|
||||
)
|
||||
|
||||
(;B[qd]C[S]MA[ij];C[#b blocks below];W[pc]C[S]MA[mj]
|
||||
(;B[od]C[S
|
||||
:-,reverse_followup(10),followup(15)
|
||||
]MA[mi];W[rd]C[S]
|
||||
MA[mi];B[re]C[S]MA[mi];W[rc]C[S]MA[mi]
|
||||
(;B[qe]C[S]MA[mi];W[nc]C[S]MA[mi];B[pf]C[S]MA[mj])
|
||||
|
||||
(;B[oc]C[0
|
||||
]MA[mi])
|
||||
|
||||
(;B[rf]C[T
|
||||
]MA[mi];W[nc]C[S
|
||||
]MA[li])
|
||||
)
|
||||
|
||||
(;B[oc]C[0
|
||||
# Non-joseki often played against GNU Go
|
||||
]MA[mi];W[rc]
|
||||
MA[lg]C[U
|
||||
];B[rd];W[od]MA[lg]C[U
|
||||
]
|
||||
(;B[nc];W[pe]MA[lg]C[S
|
||||
];B[oe];W[nd]MA[lg]C[U
|
||||
])
|
||||
|
||||
(;B[oe];W[nd]MA[lg]C[U
|
||||
];B[nc];W[pe]MA[lg]C[U
|
||||
];B[of];W[md]MA[kg]C[U
|
||||
])
|
||||
|
||||
(;B[ob];W[pe]MA[li])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[pf]MA[nj]C[0
|
||||
])
|
||||
)
|
||||
|
||||
(;W[of];C[#w jumps];B[nd]MA[mj]C[S]
|
||||
(;W[pi]C[0]
|
||||
(;B[qi]MA[mk]C[S];W[pj]MA[ml]C[0]
|
||||
(;B[ph]MA[mk]C[S];W[oh]MA[mk];B[qj]MA[ml]C[S];W[pk]MA[mm];B[ql]MA[mm]
|
||||
C[S];W[pg]MA[mm])
|
||||
|
||||
(;B[qj];W[pk]MA[ml];B[ph]MA[ml];W[oh]MA[ml])
|
||||
)
|
||||
|
||||
(;B[ph];W[oh]MA[mk]
|
||||
(;B[qi]MA[mk];W[pj]MA[mk])
|
||||
|
||||
(;B[oi];W[qi]MA[lk];B[og]MA[lk];W[nh]MA[lk];B[pg]MA[lk];W[ng]MA[lk];
|
||||
B[pf]MA[lk];W[rh]MA[lk];B[nf]MA[lk])
|
||||
)
|
||||
|
||||
(;B[qe]
|
||||
(;W[rf]C[#considered outdated
|
||||
]
|
||||
(;B[qi]MA[lk];W[pj]MA[lk]
|
||||
(;B[ph]MA[lk];W[oh]MA[lk];B[qj]MA[ll];W[pk]MA[ll]
|
||||
(;B[ql]MA[km];W[pg]MA[km])
|
||||
|
||||
(;B[pg];W[pf]MA[ll];B[og]MA[ll];W[ng]MA[ll];B[nh]MA[ll];W[oi]MA[ll];
|
||||
B[nf]MA[ll];W[mg]MA[ll];B[ql]MA[ln];W[qc]MA[ll];B[pc]MA[lk];W[qd]
|
||||
MA[lk];B[qb]MA[lk];W[pe]MA[lk];B[mf]MA[kk];W[rb]MA[lj];B[lg]MA[jk];
|
||||
W[mh]MA[jk];B[li]MA[jk];W[mi]MA[jk];B[mj]MA[jl])
|
||||
)
|
||||
|
||||
(;B[qj];W[pk]MA[ll];B[ph]MA[ll];W[oh]MA[ll])
|
||||
)
|
||||
|
||||
(;B[ph];W[oh]MA[lk];B[qi]MA[ll];W[pj]MA[lk])
|
||||
)
|
||||
|
||||
(;W[qi]MA[lk];B[rf]MA[lk];W[qg]MA[lk])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[qc]C[0
|
||||
];B[qd]MA[mi];W[rd];B[re]MA[mi];W[rc];B[qe]MA[mi];W[ob];
|
||||
B[mf]C[t
|
||||
]MA[ki])
|
||||
|
||||
(;W[oh];B[qe]MA[kj];W[rf]MA[kj];B[qj]MA[kj];W[mf]MA[kj])
|
||||
|
||||
(;W[mf]C[#bad for white
|
||||
];B[ld]MA[ki])
|
||||
|
||||
(;W[rd]MA[mj]C[0
|
||||
#bad for white
|
||||
])
|
||||
)
|
||||
|
||||
(;W[nc]MA[ki];B[pf]MA[li]
|
||||
(;W[pg]MA[li];B[qg]MA[li]
|
||||
(;W[qc];B[qe]MA[li];W[pc]MA[li])
|
||||
|
||||
(;W[pc]MA[li]
|
||||
(;B[qe]MA[li];W[qc]MA[li]
|
||||
(;B[tt];W[rf]MA[li];B[re]MA[li];W[of]MA[li];B[pe]MA[li];W[ne]MA[li])
|
||||
|
||||
(;B[og]MA[li]C[0
|
||||
])
|
||||
)
|
||||
|
||||
(;B[qc]MA[li]C[0
|
||||
];W[pe]MA[li];B[of];W[qd]MA[li];B[od]
|
||||
(;W[oe]MA[li];B[ne];W[qe]MA[ki];B[nd]
|
||||
(;W[nf]MA[li])
|
||||
|
||||
(;W[ph]MA[li]C[0
|
||||
])
|
||||
)
|
||||
|
||||
(;W[ph]C[0
|
||||
]MA[li])
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;W[qc]MA[li]
|
||||
(;B[qd]MA[li];W[pc]MA[li]
|
||||
(;B[od]MA[li];W[rc]MA[li];B[rd]MA[li]C[j
|
||||
])
|
||||
|
||||
(;B[tt];W[od]MA[li];B[oe];W[ne]MA[li])
|
||||
)
|
||||
|
||||
(;B[pc]MA[li];W[qd]MA[li];B[pe]MA[li];W[rf]MA[li];B[pb]MA[li];W[qb]
|
||||
MA[li];B[md]MA[li])
|
||||
|
||||
(;B[qe]MA[li];W[pc]MA[li])
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;B[nd]C[j
|
||||
]MA[kh];C[#ikken tobi]
|
||||
(;W[lc]C[t
|
||||
]MA[ih]
|
||||
(;B[nf]C[S]MA[ih])
|
||||
|
||||
(;B[me]MA[ih]C[S])
|
||||
)
|
||||
|
||||
(;W[rd]
|
||||
C[j
|
||||
# This is usually bad if W has already an extension to hoshi.
|
||||
]
|
||||
MA[mj]
|
||||
(;B[tt];W[qc]C[j
|
||||
]MA[mi])
|
||||
|
||||
(;B[qh]C[S]MA[mj]
|
||||
(;W[qc]C[S]MA[mj];B[qe]C[S]MA[mj];W[re]C[S]MA[mj];B[pf]C[S]MA[lj]
|
||||
(;W[pg]C[;!xplay_attack(A,B)
|
||||
]MA[mj]LB[qg:A][pg:B]
|
||||
(;B[qg]C[S]MA[mj];W[rf]C[S]MA[mj]
|
||||
(;B[og]C[S]MA[mj];W[tt];B[ph]C[S]MA[mj])
|
||||
|
||||
(;B[of])
|
||||
)
|
||||
|
||||
(;B[of]MA[mi]C[A
|
||||
])
|
||||
)
|
||||
|
||||
(;W[nb]MA[lj];B[rf]MA[lj];W[oc]MA[lj])
|
||||
|
||||
(;W[ob]C[j
|
||||
]MA[lj];B[rf]MA[lj])
|
||||
|
||||
(;W[rf]C[0
|
||||
];B[pg]MA[lj])
|
||||
)
|
||||
|
||||
(;W[of]C[0]MA[mi];B[qc]C[S]MA[mj])
|
||||
)
|
||||
|
||||
(;B[qc]C[S]MA[mh]
|
||||
(;W[qi]C[S]MA[nj]
|
||||
(;B[og]MA[nj]C[t
|
||||
])
|
||||
|
||||
(;B[jc]MA[hh]C[S])
|
||||
)
|
||||
|
||||
(;W[ph]C[S
|
||||
;omoyo(A)
|
||||
]LB[qj:A]MA[mj])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[tt];B[qe]C[0];W[pf]C[0];B[tt]
|
||||
(;W[qc]C[t
|
||||
;!weak(A) || dead(A)
|
||||
]MA[lg]LB[qf:A];B[pc]C[S]MA[mf];W[re]
|
||||
C[S]MA[og]
|
||||
(;B[rd]C[S]MA[og];W[qd]C[S]MA[og];B[rc]C[S]MA[og];W[pe]C[S]MA[og];
|
||||
B[qb]C[S]MA[og])
|
||||
|
||||
(;B[qd];W[rd]MA[og];B[rc]MA[og])
|
||||
)
|
||||
|
||||
(;W[pj]MA[nk])
|
||||
|
||||
(;W[qj]MA[nk])
|
||||
)
|
||||
|
||||
(;W[qd];B[qc]MA[mg]C[S];W[rc]MA[mg]C[S]
|
||||
(;B[pc]MA[mh]C[S];W[re]MA[ng]C[U
|
||||
];B[rb];W[sb]C[J
|
||||
]MA[lh])
|
||||
|
||||
(;B[qb]C[0]MA[ng];W[re]MA[ng]C[S];B[rb];W[pe]MA[ng]C[S]
|
||||
(;B[od];W[sb]MA[ng]C[S])
|
||||
|
||||
(;B[sc];W[od]MA[ng]C[S])
|
||||
)
|
||||
|
||||
(;B[qe]MA[nh]C[S];W[rd]MA[ng]C[S]
|
||||
(;B[pe]MA[mh]C[S];W[re]MA[nh]C[S];B[qb]MA[mh]C[S];W[pf]MA[mh]C[S])
|
||||
|
||||
(;B[re]MA[mi]C[0];W[pe]MA[mh]C[S];B[rf]MA[mi]C[S];W[pf]MA[mh]C[S];
|
||||
B[qg]MA[mi]C[S];W[pg]MA[mi]C[S];B[qh]MA[mi]C[S];W[pc]MA[mf]C[S];B[od]
|
||||
MA[mf]C[S];W[pb]MA[mf]C[S])
|
||||
|
||||
(;B[pf]MA[mh]C[0
|
||||
];W[re]MA[mh])
|
||||
)
|
||||
|
||||
(;B[rb]MA[mg]C[S];W[re]MA[og]C[U
|
||||
];B[sc]MA[ng]C[S];W[pe]MA[mh]C[S]
|
||||
(;B[od]MA[mg]C[S];W[rd]MA[ng]C[S];B[pb]MA[ng]C[S;D])
|
||||
|
||||
(;B[rd]MA[mg]C[0];W[od]MA[mh]C[S])
|
||||
)
|
||||
|
||||
(;B[rd]MA[mg]C[0];W[qe]MA[mg]C[S];B[rb]MA[mg];W[pc]MA[mg]C[S];B[qb]
|
||||
MA[mg];W[od]MA[mg]C[S];B[oc]MA[mg];W[pe]MA[mg]C[U
|
||||
])
|
||||
)
|
||||
|
||||
(;W[qc]
|
||||
(;B[qd]MA[mg])
|
||||
|
||||
(;B[pc]MA[mg]C[0
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[pj]C[0]PL[B];B[pf]MA[ml];C[#tsuke nobi 6-9 stone games];W[pg];
|
||||
B[of]MA[ml]C[U];C[#tsuke nobi 6-9 stone games])
|
||||
|
||||
(;B[pf]MA[mj]C[j
|
||||
];C[#tsuke nobi normal]
|
||||
(;W[pg]MA[mi]C[U]
|
||||
(;B[of]MA[mh]C[U];C[#nobi]
|
||||
(;W[qe]MA[mi]C[U];C[#w crawls];B[qd]MA[mh]C[U]PL[W]
|
||||
(;W[qj]MA[nk]C[U];C[#standard joseki];B[nd]
|
||||
C[U
|
||||
; !oterri(A)
|
||||
#overconcentrated in this case
|
||||
]MA[mk]LB[md:A])
|
||||
|
||||
(;W[qh]MA[nk]C[S];C[#alternative joseki];B[nd]MA[mh]C[U
|
||||
]PL[B]
|
||||
(;W[pe]PL[W]
|
||||
(;B[oe]MA[mh])
|
||||
|
||||
(;W[oe];B[od]MA[lh]C[S
|
||||
])
|
||||
)
|
||||
|
||||
(;B[jd]PL[B];B[jc]MA[if]PL[B]
|
||||
C[t
|
||||
#Usually good in high handicap games (HL 2-nov-2000)
|
||||
];B[jf]C[t
|
||||
])
|
||||
|
||||
(;B[rg]C[0
|
||||
# Don't do it! (HL 2-nov-2000)
|
||||
]MA[oi])
|
||||
)
|
||||
|
||||
(;W[pe]MA[mi]C[0];C[#trick_I3_p121_d4];B[oe]MA[mi]C[U];W[od]MA[mi]C[0]
|
||||
;B[nd]MA[mi]C[U];W[oc]MA[mi]C[0];B[rd]MA[mi]C[U]
|
||||
(;W[qg]MA[mi]C[0];C[#trick_I3_p121_d5];B[nc]MA[mi]C[U]
|
||||
(;W[pb]MA[mi]C[0];B[nb]MA[mi]C[U];W[rb]MA[mi]C[0];B[pc]MA[mi]C[U];
|
||||
W[ob]MA[mi]C[0];B[qb]MA[mi]C[U]
|
||||
(;W[qa]MA[mi]C[0];B[qc]MA[mi]C[U];W[pa]MA[mi]C[0];B[ra]MA[mi]C[U];
|
||||
W[sa]MA[mi]C[0];B[na]MA[li]C[U])
|
||||
|
||||
(;W[qc]MA[mi]C[0];B[rc]MA[mi]C[U];W[qa]MA[mi]C[0];B[qc]MA[mi]C[U];
|
||||
W[pa]MA[mi]C[0];B[sb]MA[mi]C[U]
|
||||
(;W[ra]MA[mi]C[0];B[na]MA[mi]C[U];C[# wrong plays Bsc ])
|
||||
|
||||
(;W[re]MA[mi]C[0];B[na]MA[mi]C[U])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[ob]MA[mi]C[0];B[nb]MA[mi]C[U]
|
||||
(;W[qb]MA[mi]C[0];B[rb]MA[mi]C[U];W[ra]MA[mi]C[0];B[sb]MA[mi]C[U];
|
||||
W[re]MA[mi]C[0];B[sd]MA[mi]C[U]
|
||||
(;W[qc]MA[mi]C[0];B[pc]MA[mi]C[U];W[pb]MA[mi]C[0];B[rc]MA[mi]C[U];
|
||||
W[se]MA[mi]C[0];B[oa]MA[mi]C[U])
|
||||
|
||||
(;W[na]MA[mi]C[0];C[#trick_SK1_1121];B[mb]MA[mi]C[U];
|
||||
C[#wrong here it plays Bog]
|
||||
(;W[qc]MA[mi]C[0];B[pc]MA[mi]C[U];W[pb]MA[mi]C[0];B[rc]MA[mi]C[U];
|
||||
W[qa]MA[mi]C[0];B[oa]MA[mi]C[U])
|
||||
|
||||
(;W[pc]MA[mi]C[0];B[pa]MA[li]C[U]
|
||||
(;W[qa]MA[mi]C[0];B[qc]MA[mi]C[U];W[rc]MA[mi]C[0];B[oa]MA[mi]C[U];
|
||||
W[pb]MA[mi]C[0];B[oa]MA[li]C[U])
|
||||
|
||||
(;W[qc]MA[mi]C[0];B[rc]MA[mi]C[U];W[qa]MA[mi]C[0];B[oa]MA[mi]C[U];
|
||||
W[pb]MA[mi]C[0];B[oa]MA[mi]C[S];W[pa]MA[mi]C[0];B[tt];W[se]MA[mi]C[0];
|
||||
B[tt];W[ma]MA[kb]C[0];B[lb]MA[jb]C[U];W[la]MA[jb]C[0];B[kb]MA[jb]C[U])
|
||||
|
||||
(;W[se]MA[mi]C[0];B[qc]MA[mi]C[U];W[rc]MA[mi]C[0];B[sc]MA[mi]C[U]
|
||||
(;W[pb]MA[mi]C[0];B[ma]MA[mi]C[U];W[qa]MA[mi]C[0];B[oa]MA[mi]C[U];
|
||||
W[na]MA[mi]C[0];B[oa]MA[mi]C[U])
|
||||
|
||||
(;W[qa]MA[mi]C[0];B[oa]MA[mi]C[U];W[pb]MA[mi]C[0];B[oa]MA[mi]C[U];
|
||||
W[pa]MA[mi]C[0];B[tt];W[ma]MA[ke]C[0];B[lb]MA[ke]C[U];W[la]MA[jc]C[0]
|
||||
(;B[kb])
|
||||
|
||||
(;B[ka]MA[jb]C[0])
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;W[qc]MA[mi]C[0];C[#stupid move];B[pc]MA[mi]C[U];W[pb]MA[mi]C[0];
|
||||
B[qb]MA[mi]C[U];W[rb]MA[mi]C[0])
|
||||
)
|
||||
|
||||
(;W[pc]MA[mi]C[0];C[stupid move];B[qb]MA[mi]C[U];C[improve that];W[pb]
|
||||
MA[mi]C[0];B[rb]MA[mi]C[U];W[nb]MA[mi]C[0];B[mb]MA[mi]C[U];W[sc]MA[mi]
|
||||
C[0];B[sd]MA[mi]C[U];W[sb]MA[mi]C[0];B[qc]MA[mi]C[U];W[qa]MA[mi]C[0];
|
||||
B[oa]MA[mi]C[U])
|
||||
)
|
||||
|
||||
(;W[re]MA[mi]C[0];C[#trick_I3_p121_d6];B[qg]MA[mi]C[U];W[rg]MA[mi]C[0]
|
||||
;B[qh]MA[mi]C[U];W[rh]MA[mi]C[0];B[nc]MA[mi]C[U]
|
||||
(;W[pb]MA[mi]C[0];B[nb]MA[mi]C[U]
|
||||
(;W[rb]MA[mi]C[0];B[qb]MA[mi]C[U];W[qc]MA[mi]C[0];B[pc]MA[mi]C[U];
|
||||
W[ob]MA[mi]C[0];B[rc]MA[li]C[U];W[qa]MA[mi]C[0];B[oa]MA[mi]C[U];W[qc]
|
||||
MA[mi]C[0];B[se]MA[li]C[U])
|
||||
|
||||
(;W[rc]MA[mi]C[0];C[#trick_SK1_1124];B[se]MA[mi]C[U];W[rf]MA[mi]C[0];
|
||||
B[qc]MA[mi]C[U];W[qb]MA[mi]C[0];B[rb]MA[mi]C[U];W[ra]MA[mi]C[0];B[sb]
|
||||
MA[mi]C[U];C[# here it doesnt know how to continue])
|
||||
)
|
||||
|
||||
(;W[ob]MA[mi]C[0];C[#trick_SK1_1125];B[se]MA[mi]C[U];W[rf]MA[mi]C[0];
|
||||
B[nb]MA[mi]C[U]
|
||||
(;W[qb]MA[mi]C[0];B[rb]MA[mi]C[U];W[ra]MA[mi]C[0];B[qc]MA[mi]C[U];
|
||||
W[oa]MA[mi]C[0];B[pb]MA[mi]C[U];W[pa]MA[mi]C[0];B[pc]MA[mi]C[U];W[sb]
|
||||
MA[mi]C[0];B[na]MA[mi]C[U])
|
||||
|
||||
(;W[qc]MA[mi]C[0];C[#maybe this needs more];B[rc]MA[mi]C[U])
|
||||
)
|
||||
|
||||
(;W[pc]MA[mi]C[0];C[#stupid move];B[qb]MA[mi]C[U];W[qc]MA[mi]C[0];
|
||||
B[rc]MA[mi]C[U];W[pb]MA[mi]C[0];B[ob]MA[mi]C[U];W[pa]MA[mi]C[0];B[oa]
|
||||
MA[mi]C[U])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[rd]MA[mi]C[0];C[#trick_I3_p121_d8];B[rc]MA[mi]C[U];W[pe]MA[mi]C[0]
|
||||
;B[oe]MA[mi]C[U];W[od]MA[mi]C[0];B[nd]MA[mi]C[U];W[oc]MA[mi]C[0];B[pb]
|
||||
MA[mi]C[U];C[#trick_I3_p122_d9]
|
||||
(;W[ob]MA[mi]C[0];B[pc]MA[mi]C[U])
|
||||
|
||||
(;W[pc]MA[mi]C[0];C[#trick_I3_p122_d10];B[qc]MA[mi]C[U];W[ob]MA[mi]
|
||||
C[0];B[nb]MA[mi]C[U];W[qb]MA[mi]C[0];B[nc]MA[mi]C[U];W[pa]MA[mi]C[0];
|
||||
B[rb]MA[li]C[U];W[ra]MA[mi]C[0];B[re]MA[mi]C[U]
|
||||
(;W[sd]MA[mi]C[0];B[se]MA[li]C[U];W[rf]MA[mi]C[0];B[sc]MA[mi]C[U]
|
||||
(;W[qh]MA[mi]C[0];B[na]MA[mi]C[U];W[oa]MA[mi]C[0];B[sa]MA[mi]C[U];
|
||||
W[sb]MA[mi]C[0];B[tt];W[rd]MA[mi]C[0];B[sd]MA[mi]C[U])
|
||||
|
||||
(;W[sf]MA[mi]C[0];C[#trick_SK1_1127];B[na]MA[mi]C[U];W[oa]MA[mi]C[0];
|
||||
B[ph]MA[mi]C[U];W[qh]MA[mi]C[0];B[og]MA[mi]C[U];W[qg]MA[mi]C[0];B[pi]
|
||||
MA[mi]C[U])
|
||||
)
|
||||
|
||||
(;W[rf]MA[mi]C[0];C[#trick_SK1_1128];B[sd]MA[mi]C[U];W[sb]MA[mi]C[0];
|
||||
B[na]MA[mi]C[U];W[oa]MA[mi]C[0];B[sc]MA[mi]C[U])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[nc]MA[ng]C[0];C[# w invades];B[oc]MA[ng]C[U]
|
||||
(;W[nd]MA[ng]C[0];B[pe]MA[ng]C[U])
|
||||
|
||||
(;W[md]MA[mg]C[0];B[nd]MA[ng]C[U])
|
||||
)
|
||||
|
||||
(;B[qj];W[qh]C[U
|
||||
]MA[nk])
|
||||
|
||||
(;B[pj];W[qh]MA[nk]C[U
|
||||
])
|
||||
|
||||
(;W[og];B[nd]MA[mi])
|
||||
)
|
||||
|
||||
(;W[qd]MA[mi]C[S];C[# w jumps ]
|
||||
(;B[qe]MA[mi]C[S];W[re]MA[mi]C[S];B[pe]MA[mi]C[S];W[rg]MA[oh]C[S];
|
||||
B[qc]MA[ni]C[S];W[rd]MA[ni]C[S];B[og]MA[mi]C[S];W[ph]MA[mi]C[S])
|
||||
|
||||
(;B[qc]MA[mi]
|
||||
(;W[qe]MA[mi];B[pc]MA[mi];W[qi]MA[mk];B[jc]MA[hj])
|
||||
|
||||
(;W[re]MA[mi];B[rd]MA[mi];W[qe]MA[mi];B[rc]MA[mi];W[qj]MA[ml];B[nd]
|
||||
MA[kl])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[og];B[qe]MA[mi]C[U
|
||||
])
|
||||
|
||||
(;W[qc]
|
||||
(;B[pc]MA[mi];W[qd]MA[mi];B[qe]MA[mi];W[re]MA[mi]PL[B];B[pe]MA[mi];
|
||||
W[rg]MA[mi];B[og]MA[li])
|
||||
|
||||
(;B[qe]MA[mi]
|
||||
(;W[ob]MA[ki];B[qg]MA[ki];W[mc]MA[ki])
|
||||
|
||||
(;W[qg]C[0
|
||||
];B[pc]MA[mi];W[re];B[qd]MA[mi];W[rd];B[rc]MA[mi])
|
||||
|
||||
(;W[pc]C[0
|
||||
];B[nc]MA[mi];W[nb];B[mb]MA[mi];W[ob];B[mc]MA[mi])
|
||||
)
|
||||
|
||||
(;B[qd]C[0
|
||||
];W[pc];B[oc];W[ob];B[nc];W[nb];B[mc];W[rd];B[re];W[rc];
|
||||
B[qe])
|
||||
)
|
||||
|
||||
(;W[re]MA[mh]
|
||||
(;B[qe]MA[mh]
|
||||
(;W[qd]C[#reverts to as if w jumped
|
||||
]MA[mh])
|
||||
|
||||
(;W[rf]MA[mh];B[qc]MA[mh])
|
||||
)
|
||||
|
||||
(;B[rd]MA[mh];W[qd]MA[mh];B[qc]C[#reverts to w jump
|
||||
]MA[mh])
|
||||
)
|
||||
|
||||
(;W[pc]C[0
|
||||
#trick play
|
||||
];B[qe]MA[mh]
|
||||
(;W[qc]C[#reverts to entering at the 3,3 point
|
||||
])
|
||||
|
||||
(;W[oc]
|
||||
(;B[qc]MA[mh];W[qb];B[rc]MA[mh];W[lc])
|
||||
|
||||
(;B[jd];W[tt]C[#if b has extension, for handicap games
|
||||
];B[mc]MA[ii];
|
||||
W[nd];B[md]MA[ii];W[ne];B[lf]MA[ii];W[mg];B[og]MA[ii])
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;B[qe]MA[mh]C[S];C[#osae];W[of]MA[nh]C[U
|
||||
];B[pe]MA[nh]C[S]
|
||||
(;W[og]MA[mi]C[S]
|
||||
(;B[nd]MA[mh]C[S])
|
||||
|
||||
(;B[qg]MA[ni]C[S];W[qh]MA[nj]C[S];B[rf]MA[ni]C[S;D];W[rg]MA[nj]C[S];
|
||||
B[nd]MA[mi]C[S])
|
||||
)
|
||||
|
||||
(;W[qg]MA[mj]C[S];B[nd]MA[mh]C[S];W[qc]C[0]MA[nf];B[pb]MA[nf]C[S];
|
||||
W[rd]MA[nf]C[0];B[re]MA[nf]C[S];W[pc]MA[nf]C[0];B[oc]MA[nf]C[S];W[qb]
|
||||
MA[nf]C[0];B[ob]MA[nf]C[S])
|
||||
|
||||
(;W[rf]MA[mi]C[0];B[og]MA[lj]C[S];W[ph]MA[mj]C[S];B[nf]MA[mj]C[S];
|
||||
W[oh]MA[lj]C[S];B[ng]MA[li]C[S];W[re]MA[mi]C[S]
|
||||
(;B[qc]MA[nh]C[S])
|
||||
|
||||
(;B[rd]C[0];W[qc]MA[nh]C[S];B[qd]C[0];W[pc]MA[mh]C[S])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[qg]MA[mi]C[S];W[pe]MA[mi]C[S];B[of]MA[mi]C[S];W[qe]MA[mi]C[S];
|
||||
B[oe]MA[mi]C[S];W[qh]MA[mi]C[S];B[rg]MA[mi]C[S];W[rh]MA[mi]C[S];B[og]
|
||||
MA[mi]C[S];W[ph]MA[mi]C[S];B[qd]MA[mi]C[S];W[rf]MA[mi]C[S];B[re]MA[mi]
|
||||
C[S];W[sg]MA[mi]C[S];B[nc]MA[mi]C[S])
|
||||
)
|
||||
|
||||
(;W[qe];B[pe]MA[ng]C[S])
|
||||
|
||||
(;W[rd];B[qe]MA[nh]C[S];W[re];B[qg]MA[nh]C[S];W[rf];B[pg]MA[nh]C[S])
|
||||
|
||||
(;W[qc];B[qe]MA[nh])
|
||||
|
||||
(;W[pe]
|
||||
(;B[qe]LB[oe:A][qd:B][pf:C]MA[mi]C[;!oplay_attack(*,A,B,C)
|
||||
];W[oe]
|
||||
(;B[qd]MA[mi];W[qg];B[nd]MA[mi];W[ne];B[me]MA[li];W[od];B[oc]MA[li];
|
||||
W[og];B[md]MA[li])
|
||||
|
||||
(;B[re]MA[mi]C[0
|
||||
])
|
||||
|
||||
(;B[pg]MA[mi]C[0
|
||||
])
|
||||
)
|
||||
|
||||
(;B[oe]MA[mi]LB[qe:A][qd:B][pf:C]C[;!oplay_attack(A,*,B,C)
|
||||
];W[qe]
|
||||
(;B[od]MA[mi];W[pg];B[of]MA[mi];W[qd];B[qc]MA[mi];W[rc];B[rb]MA[mi];
|
||||
W[qb];B[pc]MA[mi]
|
||||
(;W[rd];B[pb]MA[mi];W[qj])
|
||||
|
||||
(;W[sb];B[qg]MA[mi];W[qh];B[rg]MA[mi];W[ra];B[qi]MA[mj];W[og];B[rh]
|
||||
MA[mj];W[ng];B[ld]MA[kj])
|
||||
)
|
||||
|
||||
(;B[qd]MA[mi]C[0
|
||||
];W[od]MA[mi];B[nd];W[oc]MA[mi];B[nc];W[pb]MA[mi];
|
||||
B[nb];W[qc]MA[mi];B[rd];W[rc]MA[mi])
|
||||
|
||||
(;B[pc]MA[mi]C[0
|
||||
])
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;B[nc]MA[lh]C[j
|
||||
];C[#kogeima]
|
||||
(;W[rd]C[S]MA[mh];B[qc]MA[ng]C[S]
|
||||
(;W[qi]MA[mk]C[S];B[tt];W[lc]C[j
|
||||
]MA[ij];B[tt];W[rc]C[j
|
||||
]MA[jj];B[rb]
|
||||
C[0];W[pb]MA[kg]C[S];B[qb]C[0];W[oc]C[S]MA[kg])
|
||||
|
||||
(;W[tt]PL[W]
|
||||
(;B[pj];W[ph]C[S]MA[mk])
|
||||
|
||||
(;W[qk]C[0];B[tt];W[ph]C[S]MA[ml])
|
||||
)
|
||||
|
||||
(;W[ph]C[0];B[tt];W[lc]C[S]MA[ii])
|
||||
)
|
||||
|
||||
(;W[qd]C[S];B[qc]MA[mg]C[S];W[rc]MA[mg]C[S]
|
||||
(;B[pc]MA[mh]C[S];W[re]MA[ng]C[S];B[rb]C[0];W[sb]C[S]MA[mh])
|
||||
|
||||
(;B[qb]C[0];W[re]MA[ng]C[S];B[rb];W[pe]MA[ng]C[S]
|
||||
(;B[od];W[sb]MA[ng]C[S])
|
||||
|
||||
(;B[sc];W[od]MA[ng]C[S])
|
||||
)
|
||||
|
||||
(;B[qe]MA[nh]C[S];W[rd]MA[ng]C[S]
|
||||
(;B[pe]MA[mh]C[S];W[re]MA[nh]C[S];B[qb]MA[mh]C[S];W[pf]MA[mh]C[S])
|
||||
|
||||
(;B[re]MA[mi]C[0];W[pe]MA[mh]C[S];B[rf]MA[mi]C[S];W[pf]MA[mh]C[S];
|
||||
B[qg]MA[mi]C[S];W[pg]MA[mi]C[S];B[qh]MA[mi]C[S];W[pc]MA[mf]C[S];B[od]
|
||||
MA[mf]C[S];W[pb]MA[mf]C[S])
|
||||
|
||||
(;B[pf]MA[mh]C[0
|
||||
];W[re]MA[ng])
|
||||
)
|
||||
|
||||
(;B[rb]MA[mg]C[S];W[re];B[sc]MA[ng]C[S];W[pe]MA[mh]C[S]
|
||||
(;B[od]MA[mg]C[S];W[rd]MA[ng]C[S];B[pb]MA[ng]C[S;D])
|
||||
|
||||
(;B[rd]MA[mg]C[0];W[od]MA[mh]C[S])
|
||||
)
|
||||
|
||||
(;B[rd]MA[mg];W[qe]MA[mg]C[S];B[rb]MA[mg];W[pc]MA[mg]C[S];B[qb]MA[mg];
|
||||
W[od]MA[mg]C[S])
|
||||
)
|
||||
|
||||
(;W[qc];B[qd]MA[mg];W[rd];B[re]MA[mg]
|
||||
(;W[rc];B[qe]MA[mg])
|
||||
|
||||
(;W[rb];B[sd]MA[mg]
|
||||
(;W[sc];B[rc]MA[mg])
|
||||
|
||||
(;W[rc];B[qe]MA[mg])
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;B[of]C[0];W[ph]MA[nj]C[S])
|
||||
|
||||
(;B[tt]
|
||||
(;W[nc]MA[kg]C[t
|
||||
]
|
||||
(;B[oe]MA[mg]C[S];W[qc]MA[mg]C[S];B[qd]MA[mg]C[S];W[pc]MA[mg]C[S];
|
||||
B[me]MA[lg]C[S];W[od]MA[mg]C[S];B[pe]MA[mg]C[S];W[rd]MA[mg]C[S];B[re]
|
||||
MA[mg]C[S];W[rc]C[S]MA[mg];B[qe]C[S]MA[mg])
|
||||
|
||||
(;B[nd]MA[kg]C[S];W[md]MA[kg]C[S];B[ne]MA[kg]C[S];W[qc]MA[kg]C[S]
|
||||
(;B[oc]MA[kg]C[S];W[qd]MA[kg]C[S];B[mc]MA[kg]C[S])
|
||||
|
||||
(;B[qd];W[pc]MA[kg])
|
||||
)
|
||||
|
||||
(;B[qj]C[0];W[tt];B[nd]C[S]MA[lj])
|
||||
)
|
||||
|
||||
(;W[nd]MA[kg]C[t
|
||||
]
|
||||
(;B[oe]MA[mg]C[S];W[qc]MA[mg]C[S];B[qd]MA[mg]C[S];W[pc]MA[mg]C[S];
|
||||
B[rc]MA[mg]C[S];W[od]MA[mg]C[S];B[pf]MA[mg]C[S];W[rb]MA[mg]C[S];B[rd]
|
||||
MA[mg]C[S])
|
||||
|
||||
(;B[pf];W[pg]MA[mh])
|
||||
)
|
||||
|
||||
(;W[qc];B[qd]MA[ii];W[pc]MA[lh];B[od]MA[lh]C[U
|
||||
];W[rd]MA[lh];B[re]
|
||||
MA[lh];W[rc]MA[lh];B[qe]MA[lh]C[U
|
||||
];W[nc]MA[lh]
|
||||
(;B[pf]MA[lh])
|
||||
|
||||
(;B[tt];W[of]MA[ij]C[j
|
||||
];B[nd]MA[ij]C[U
|
||||
];W[mc]MA[ij]C[U
|
||||
];B[md]MA[ij]
|
||||
C[j
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[jd]C[0];W[tt]
|
||||
(;B[qh]MA[ij]C[S];W[qc]C[S]MA[hj];B[pc]MA[ij]C[S])
|
||||
|
||||
(;B[pi]MA[ij];W[of]MA[ij]
|
||||
(;B[nd]MA[ij];W[rd]MA[ij];B[qc]MA[ij]
|
||||
(;W[ri]MA[ij]
|
||||
(;B[mf]C[j
|
||||
]MA[ij])
|
||||
|
||||
(;B[tt];W[mf]C[j
|
||||
]MA[ij])
|
||||
)
|
||||
|
||||
(;W[tt]C[#this is why w must play S11
|
||||
];B[pg]MA[ij];W[pf]MA[ij];B[qg]
|
||||
MA[ij];W[rg]MA[ij];B[rh]MA[ij];W[rf]MA[ij])
|
||||
)
|
||||
|
||||
(;B[ne]C[0
|
||||
#gg has trouble here; I assume this is reasonable /evan
|
||||
];
|
||||
W[rd]MA[ij];B[qc]MA[ij];W[ri]MA[ij])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[pi]MA[ij]C[j
|
||||
]
|
||||
(;W[qc]MA[ij];B[qd]MA[ij];W[pc]MA[ij];B[od]MA[ij];W[rd]MA[ij];B[re]
|
||||
MA[ij];W[rc]MA[ij];B[qe]MA[ij];W[nc]MA[ij];B[pf]C[j
|
||||
])
|
||||
|
||||
(;W[of]MA[ij];B[nd]MA[ij];W[rd]MA[ij];B[qc]MA[ij];W[ri]MA[ij];B[jc]
|
||||
MA[ij];W[qi]MA[ij]C[j
|
||||
])
|
||||
)
|
||||
|
||||
)
|
3880
gnugo/patterns/hoshi_other.db
Normal file
3880
gnugo/patterns/hoshi_other.db
Normal file
File diff suppressed because it is too large
Load Diff
268
gnugo/patterns/hoshi_other.sgf
Normal file
268
gnugo/patterns/hoshi_other.sgf
Normal file
@ -0,0 +1,268 @@
|
||||
This is GNU Go, a Go program. Contact gnugo@gnu.org, or see
|
||||
http://www.gnu.org/software/gnugo/ for more information.
|
||||
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008 and 2009 by the Free Software Foundation.
|
||||
|
||||
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 - 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 in file COPYING 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 02111, USA.
|
||||
|
||||
(;GM[1]FF[3]
|
||||
SZ[19]HA[0]
|
||||
GN[Hoshi+other joseki database]
|
||||
;B[pd]
|
||||
(;B[pj];C[#kosumi tsuke for 6-9 stone games]PL[W]
|
||||
(;W[qf]PL[B]
|
||||
(;B[qe]MA[mk]
|
||||
(;W[pf]C[S]MA[mi]
|
||||
(;B[nd]MA[mk]C[U]PL[W];W[ph]C[j];B[re]MA[lk]C[j])
|
||||
|
||||
(;B[tt];W[od]MA[mi];B[oc];W[nd]TR[mi];B[nc];W[pc]MA[mi];B[qc];W[pb]
|
||||
MA[mi];B[qb];W[pe]MA[mi];B[qd])
|
||||
)
|
||||
|
||||
(;W[oe]
|
||||
(;B[od]MA[lk])
|
||||
|
||||
(;B[pf]C[0
|
||||
# playable if ladder works but dangerous for GNU Go
|
||||
]MA[mh])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[qh]C[j
|
||||
]MA[nl])
|
||||
)
|
||||
|
||||
(;W[pg];B[nd];W[ld];B[nf];W[oe];B[od]MA[ki])
|
||||
|
||||
(;W[qg]
|
||||
(;B[qe]MA[ml]C[j
|
||||
:-,shape(0.015)
|
||||
])
|
||||
|
||||
(;B[nc]MA[ll]C[j
|
||||
])
|
||||
|
||||
(;B[mc]MA[kl]C[j
|
||||
])
|
||||
|
||||
(;B[nd]MA[mk]C[j
|
||||
:-,shape(-0.02)
|
||||
])
|
||||
|
||||
(;B[jj]PL[B];B[jd]PL[B];B[og]MA[ik]C[j
|
||||
:-,shape(-0.02)
|
||||
])
|
||||
|
||||
(;B[md]MA[mj]C[0
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[qg]C[0];C[#17 stone concrete];B[pj]C[0]
|
||||
(;W[re]MA[ok]C[0];B[qe]MA[ok];W[pc]MA[ok]C[0];B[qd]MA[ok])
|
||||
|
||||
(;W[qf]MA[ok]C[0];B[pg]MA[ok]C[U])
|
||||
|
||||
(;W[pe]MA[ok]C[0];B[qd]MA[ok]C[U])
|
||||
|
||||
(;W[qd]MA[ok]C[0];B[qe]MA[ok]C[U];W[re]MA[ok]C[0];B[pe]MA[ok]C[U];
|
||||
W[rd]MA[ok]C[0];B[rf]MA[ok]C[U];W[pc]MA[ok]C[0];B[oc]MA[ok]C[U];W[pb]
|
||||
MA[ok]C[0];B[ob]MA[ok]C[U];W[rb]MA[ok]C[0])
|
||||
|
||||
(;W[qc]MA[ok]C[0];C[#sansan inv];B[pc]MA[ok]C[U];W[qd]MA[ok]C[0];B[qb]
|
||||
MA[ok]C[U]
|
||||
(;W[qf]MA[ok]C[0];B[pf]MA[ok]C[U];W[qe]MA[ok]C[0];B[pg]MA[ok]C[U];
|
||||
W[rb]MA[ok]C[0];B[pb]MA[ok]C[U];W[rg]MA[ok]C[0];B[rh]MA[ok]C[U];W[sg]
|
||||
MA[ok]C[0])
|
||||
|
||||
(;W[rb]MA[ok]C[0];B[pb]MA[ok]C[U];W[qf]MA[ok]C[0];B[pf]MA[ok]C[U];
|
||||
W[qe]MA[ok]C[0];B[rg]MA[ok]C[U]
|
||||
(;W[ra]MA[ok]C[0];B[sd]MA[ok]C[U])
|
||||
|
||||
(;W[rf]MA[ok]C[0];B[ra]MA[ok]C[U])
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;W[pf]
|
||||
(;B[nd]MA[lh]C[S]
|
||||
(;W[qd]MA[mg]C[S];B[qc]MA[mg]C[S];W[qe]MA[mg]C[S];B[rc]MA[mg]C[S];
|
||||
W[qj]MA[ml]C[S];B[jc]MA[ig]C[S])
|
||||
|
||||
(;W[qc]C[0];B[qd]MA[mg]C[S])
|
||||
|
||||
(;W[pj]C[j
|
||||
]MA[nl];B[qf]MA[lh]C[t
|
||||
];W[qg]MA[lk]C[S];B[qe]MA[lh]C[S];
|
||||
W[pg]MA[lk]C[S])
|
||||
)
|
||||
|
||||
(;B[tt];W[nd]
|
||||
C[j
|
||||
#applicable in isolation or if b makes a pincer on the right
|
||||
]
|
||||
MA[jg]
|
||||
(;B[oe]MA[mg];W[qc]MA[mg];B[qd]MA[jg];W[pc]MA[jg];B[of]MA[jh];W[od]
|
||||
MA[jg];B[pg]MA[ji])
|
||||
|
||||
(;B[pc]C[j
|
||||
]MA[mg];W[nf]MA[lh];B[nb]MA[lh])
|
||||
|
||||
(;B[qc]MA[mg]C[j
|
||||
];W[nf]MA[lh])
|
||||
)
|
||||
|
||||
(;B[nc]C[0
|
||||
#no reason not to answer at O16
|
||||
]MA[lh]
|
||||
(;W[qd]MA[lh];B[qc]MA[lh];W[qe]MA[lh];B[rc]MA[lh];W[qj]MA[ll])
|
||||
|
||||
(;W[pj]C[j
|
||||
]MA[kl];B[qf]MA[kh];W[qg]MA[kh];B[qe]MA[kh];W[pg]MA[kh])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[qc];B[qd];W[pc]C[S]MA[nf];B[oc]MA[nf]C[S]
|
||||
(;W[ob]MA[nf]C[S];B[nc]MA[mf]C[S];W[nb]MA[mf]C[S];B[mc]MA[lf]C[S];
|
||||
W[rd]MA[nf]C[S];B[re]MA[ng]C[S];W[rc]MA[nf]C[S];B[qf]MA[mg]C[S])
|
||||
|
||||
(;W[rd]C[#Not joseki
|
||||
]
|
||||
(;B[re]MA[nf]C[S];W[rc]MA[nf]C[S]
|
||||
(;B[qf]C[j
|
||||
]MA[ng];W[ob]MA[nf]C[S];B[nc]MA[mf]C[S];W[nb]MA[mf]C[S];
|
||||
B[mc]MA[lf]C[S])
|
||||
|
||||
(;B[od]C[#depending on circumstances, P18 might be possible ?
|
||||
S
|
||||
]
|
||||
MA[mg])
|
||||
)
|
||||
|
||||
(;B[od]MA[nf]C[0
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[qe];B[qd]MA[mg]
|
||||
(;W[pe];B[oe]MA[mh]
|
||||
(;W[od];B[re]MA[lh];W[rf];B[rd]MA[mh])
|
||||
|
||||
(;W[of];B[ne]MA[lh])
|
||||
)
|
||||
|
||||
(;W[rd];B[pe]MA[mh]
|
||||
(;W[qf];B[rc]MA[ng])
|
||||
|
||||
(;W[rc];B[qf]MA[nh];W[re];B[pf]MA[mi])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[tt]
|
||||
(;B[md];W[qc];B[qd]MA[mf]C[S];W[pc]MA[mf]C[S];B[oc]MA[mf]C[S];W[ob]
|
||||
MA[mf]C[S];B[nc]MA[mf]C[S];W[rd]MA[mf]C[S];B[re]MA[mg]C[S];W[rc]MA[mf]
|
||||
C[S];B[qf]C[S])
|
||||
|
||||
(;B[nc]
|
||||
(;W[qc];B[qd]MA[nf]C[S];W[pc];B[oc]MA[nf]C[S];W[rd];B[re]MA[ng]C[S];
|
||||
W[rc];B[qf]MA[ng]C[S])
|
||||
|
||||
(;W[rd]
|
||||
(;B[qe]MA[mh])
|
||||
|
||||
(;B[qc]MA[lg])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[mc];W[qc];B[qd]MA[mf]C[S];W[pc]C[S]MA[mf];B[oc]C[S]MA[mf];W[ob]
|
||||
C[S]MA[mf];B[nb]C[S]MA[mf];W[od]C[S]MA[mf];B[nc]C[S]MA[mf];W[rd]C[S]
|
||||
MA[mf];B[re]C[S]MA[mf];W[rc]C[S]MA[mf];B[qf]C[S]MA[mg]
|
||||
(;W[pa]C[S]MA[mf];B[oe]C[S]MA[mf])
|
||||
|
||||
(;W[pb]C[S]MA[mf];B[oe]C[S]MA[mf])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[pe];B[od]MA[lh];W[qd];B[qc]MA[mh])
|
||||
|
||||
(;W[pg]C[j
|
||||
]MA[li];B[nd]MA[li]
|
||||
(;W[qd]MA[li]
|
||||
(;B[qc]MA[li]
|
||||
(;W[qe]MA[li];B[rc]MA[li];W[pe]MA[li];B[od]MA[li];W[qk]MA[ll];B[jc]
|
||||
MA[hi])
|
||||
|
||||
(;W[pe]MA[li];B[od]MA[li];W[re]MA[li];B[rc]MA[li];W[qk]MA[lm];B[jc]
|
||||
MA[hi])
|
||||
|
||||
(;W[rc]MA[li]
|
||||
(;B[pc]MA[li];W[qe]MA[li];B[rb]MA[li];W[qk]MA[lm];B[jc]MA[hi])
|
||||
|
||||
(;B[qe]MA[li];W[rd]MA[li];B[pc]MA[li];W[pe]MA[li]
|
||||
(;B[pf]MA[li];W[oe]MA[li];B[qg]MA[li];W[of]MA[li];B[qf]MA[li];W[ph]
|
||||
MA[li];B[ri]MA[lk];W[od]MA[lj];B[oc]MA[lj];W[nc]MA[kj];B[nb]MA[kj];
|
||||
W[mc]MA[kj];B[mb]MA[jj];W[lc]MA[jj];B[rb]MA[kj])
|
||||
|
||||
(;B[oe]MA[li];W[pf]MA[li];B[rb]MA[li]
|
||||
(;W[re]MA[li])
|
||||
|
||||
(;W[sb]C[0
|
||||
]MA[li];B[re]MA[li];W[qb]MA[li];B[ra]MA[li])
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;B[qe]MA[li];W[pe]MA[li];B[re]MA[li]
|
||||
(;W[rd]MA[li];B[rg]MA[li];W[pc]MA[li];B[od]MA[li];W[ob]MA[li];B[nb]
|
||||
MA[li]
|
||||
(;W[rb]MA[li];B[pf]MA[li])
|
||||
|
||||
(;W[pf];B[qc]MA[li];W[rc];B[qb]MA[li];W[rb];B[pb]MA[li];W[qa];B[oc]
|
||||
MA[li]
|
||||
(;W[rh];B[qh]MA[li];W[rf];B[ri]MA[li];W[qf];B[pk]MA[lm])
|
||||
|
||||
(;W[rf];B[qf]MA[li];W[qg];B[sf]MA[li];W[rh];B[ri]MA[lk];W[sd];B[se]
|
||||
MA[lk];W[qh];B[sh]MA[lk];W[qj];B[sb]MA[lk])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[pc]MA[li]C[0
|
||||
];B[od]MA[li];W[rc];B[pf]MA[li];W[nb]
|
||||
(;B[og]MA[li]C[j
|
||||
])
|
||||
|
||||
(;B[mb]MA[ki]
|
||||
(;W[ob];B[qb]MA[ki]
|
||||
(;W[rb];B[nc]MA[ki];W[qc];B[lc]MA[ki])
|
||||
|
||||
(;W[qc];B[mc]MA[ki];W[rb])
|
||||
)
|
||||
|
||||
(;W[mc]C[0
|
||||
];B[ob]MA[ki];W[lb];B[oc]MA[ki])
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;W[qk]MA[km]C[j
|
||||
];B[jc]MA[hl]C[j
|
||||
])
|
||||
)
|
||||
|
||||
)
|
746
gnugo/patterns/influence.db
Normal file
746
gnugo/patterns/influence.db
Normal file
@ -0,0 +1,746 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING #
|
||||
# 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 02111, USA. #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# Database of influence patterns.
|
||||
#
|
||||
# ? - don't care
|
||||
# . - empty
|
||||
# O - color of dragon making influence
|
||||
# X - opposite color of O
|
||||
# o - O or empty
|
||||
# x - X or empty
|
||||
# , - point which influence can't pass through
|
||||
#
|
||||
#
|
||||
# Two different classes of patterns are used here.
|
||||
#
|
||||
# E - Enhance influence.
|
||||
# I - Invasion points.
|
||||
|
||||
|
||||
attribute_map value_only
|
||||
|
||||
goal_elements none
|
||||
# callback_data is pattern class dependent for this database
|
||||
|
||||
|
||||
########################
|
||||
#
|
||||
# Enhancement patterns
|
||||
#
|
||||
########################
|
||||
|
||||
callback_data O
|
||||
|
||||
|
||||
Pattern Enhance1
|
||||
|
||||
o..?
|
||||
O.*.
|
||||
O...
|
||||
o.??
|
||||
|
||||
:8,E,value(30)
|
||||
|
||||
|
||||
Pattern Enhance2
|
||||
|
||||
oO....
|
||||
oo..*.
|
||||
oO....
|
||||
|
||||
:-,E,value(30)
|
||||
|
||||
|
||||
Pattern Enhance3
|
||||
|
||||
oO.....
|
||||
ooO..*.
|
||||
oO.....
|
||||
|
||||
:-,E,value(30)
|
||||
|
||||
|
||||
Pattern Enhance4
|
||||
|
||||
ooO....
|
||||
ooo..*.
|
||||
oO.....
|
||||
|
||||
:8,E,value(20)
|
||||
|
||||
|
||||
Pattern Enhance5
|
||||
|
||||
oO.....
|
||||
oO...*.
|
||||
oo.....
|
||||
oO.....
|
||||
|
||||
:8,E,value(30)
|
||||
|
||||
|
||||
Pattern Enhance6
|
||||
|
||||
oO.....
|
||||
O....*.
|
||||
oo.....
|
||||
oO.....
|
||||
|
||||
:8,E,value(20)
|
||||
|
||||
|
||||
Pattern Enhance7
|
||||
|
||||
oO......
|
||||
ooO...*.
|
||||
oo......
|
||||
oO......
|
||||
|
||||
:8,E,value(20)
|
||||
|
||||
|
||||
Pattern Enhance8
|
||||
# gf Corrected symmetry. (3.1.23)
|
||||
|
||||
oO....
|
||||
o...*.
|
||||
o.....
|
||||
oO....
|
||||
|
||||
:8,E,value(15)
|
||||
|
||||
|
||||
Pattern Enhance9
|
||||
|
||||
oO.....
|
||||
oO...*.
|
||||
o......
|
||||
O......
|
||||
|
||||
:8,E,value(20)
|
||||
|
||||
|
||||
Pattern Enhance10
|
||||
|
||||
oO....
|
||||
O...*.
|
||||
o.....
|
||||
O.....
|
||||
|
||||
:8,E,value(30)
|
||||
|
||||
|
||||
Pattern Enhance11
|
||||
|
||||
oO....
|
||||
o...*.
|
||||
O.....
|
||||
O.....
|
||||
|
||||
:8,E,value(30)
|
||||
|
||||
|
||||
Pattern Enhance12
|
||||
|
||||
oO.....
|
||||
o....*.
|
||||
oO.....
|
||||
O......
|
||||
|
||||
:8,E,value(30)
|
||||
|
||||
|
||||
Pattern Enhance13
|
||||
|
||||
oO.....
|
||||
oo...*.
|
||||
ooO....
|
||||
O......
|
||||
|
||||
:8,E,value(30)
|
||||
|
||||
|
||||
Pattern Enhance14
|
||||
|
||||
oO....
|
||||
o...*.
|
||||
o.....
|
||||
O.....
|
||||
|
||||
:8,E,value(20)
|
||||
|
||||
|
||||
Pattern Enhance15
|
||||
|
||||
??.....??
|
||||
oo.....oo
|
||||
oo.O...oo
|
||||
......*..
|
||||
.........
|
||||
---------
|
||||
|
||||
:8,E,value(30)
|
||||
|
||||
??.....??
|
||||
ac.....oo
|
||||
bd.O...oo
|
||||
......*..
|
||||
.........
|
||||
---------
|
||||
|
||||
;o_somewhere(a,b,c,d)
|
||||
|
||||
|
||||
Pattern Enhance16
|
||||
|
||||
oo..|
|
||||
oO.*|
|
||||
oo..|
|
||||
|
||||
:-,E,value(20)
|
||||
|
||||
|
||||
Pattern Enhance17
|
||||
|
||||
oo...|
|
||||
oO.*.|
|
||||
oo...|
|
||||
|
||||
:-,E,value(20)
|
||||
|
||||
|
||||
Pattern Enhance18
|
||||
|
||||
oo...
|
||||
oO...
|
||||
...*.
|
||||
.....
|
||||
-----
|
||||
|
||||
:8,E,value(20)
|
||||
|
||||
|
||||
Pattern Enhance19
|
||||
|
||||
oo...
|
||||
oo.*.
|
||||
oO...
|
||||
.....
|
||||
.....
|
||||
.....
|
||||
-----
|
||||
|
||||
:8,E,value(20)
|
||||
|
||||
|
||||
Pattern Enhance20
|
||||
|
||||
|..ooooo
|
||||
|.......
|
||||
|..*....
|
||||
|.......
|
||||
|.......
|
||||
|..O.oo.
|
||||
|....oo.
|
||||
|.......
|
||||
|.......
|
||||
+-------
|
||||
|
||||
:8,E,value(50)
|
||||
|
||||
|..ooooo
|
||||
|.......
|
||||
|..*....
|
||||
|.......
|
||||
|.......
|
||||
|..O.ac.
|
||||
|....bd.
|
||||
|.......
|
||||
|.......
|
||||
+-------
|
||||
|
||||
;o_somewhere(a,b,c,d)
|
||||
|
||||
|
||||
Pattern Enhance21
|
||||
|
||||
|.........o
|
||||
|.........o
|
||||
|..O.oo...o
|
||||
|....oo.*.o
|
||||
|..........
|
||||
|..........
|
||||
+----------
|
||||
|
||||
:8,E,value(50)
|
||||
|
||||
|.........o
|
||||
|.........o
|
||||
|..O.ac...o
|
||||
|....bd.*.o
|
||||
|..........
|
||||
|..........
|
||||
+----------
|
||||
|
||||
;o_somewhere(a,b,c,d)
|
||||
|
||||
|
||||
Pattern Enhance22
|
||||
|
||||
|..ooooo
|
||||
|.......
|
||||
|..*....
|
||||
|.......
|
||||
|.......
|
||||
|....oo.
|
||||
|..O.oo.
|
||||
|.......
|
||||
|.......
|
||||
+-------
|
||||
|
||||
:8,E,value(40)
|
||||
|
||||
|..ooooo
|
||||
|.......
|
||||
|..*....
|
||||
|.......
|
||||
|.......
|
||||
|....ac.
|
||||
|..O.bd.
|
||||
|.......
|
||||
|.......
|
||||
+-------
|
||||
|
||||
;o_somewhere(a,b,c,d)
|
||||
|
||||
|
||||
Pattern Enhance23
|
||||
|
||||
|.........o
|
||||
|.........o
|
||||
|....oo...o
|
||||
|..O.oo.*.o
|
||||
|..........
|
||||
|..........
|
||||
+----------
|
||||
|
||||
:8,E,value(40)
|
||||
|
||||
|.........o
|
||||
|.........o
|
||||
|....ac...o
|
||||
|..O.bd.*.o
|
||||
|..........
|
||||
|..........
|
||||
+----------
|
||||
|
||||
;o_somewhere(a,b,c,d)
|
||||
|
||||
|
||||
Pattern Enhance24
|
||||
|
||||
??....
|
||||
??O...
|
||||
.O..*.
|
||||
......
|
||||
......
|
||||
------
|
||||
|
||||
:8,E,value(30)
|
||||
|
||||
|
||||
Pattern Enhance25
|
||||
|
||||
+------
|
||||
|......
|
||||
|......
|
||||
|.....o
|
||||
|.o.X.o
|
||||
|......
|
||||
|..O.*.
|
||||
|......
|
||||
|..oo..
|
||||
|..oo..
|
||||
|
||||
:8,E,value(15)
|
||||
|
||||
|
||||
Pattern Enhance26
|
||||
|
||||
+------
|
||||
|......
|
||||
|......
|
||||
|.....o
|
||||
|.*.X.o
|
||||
|......
|
||||
|..O.o.
|
||||
|......
|
||||
|..oo..
|
||||
|..oo..
|
||||
|
||||
:8,E,value(15)
|
||||
|
||||
|
||||
########################
|
||||
#
|
||||
# Invasion patterns
|
||||
#
|
||||
########################
|
||||
|
||||
callback_data none
|
||||
|
||||
|
||||
Pattern Invade1
|
||||
|
||||
+-----
|
||||
|.....
|
||||
|.....
|
||||
|..*..
|
||||
|...O.
|
||||
|.....
|
||||
|
||||
:\,I,value(3)
|
||||
|
||||
|
||||
Pattern Invade2
|
||||
|
||||
+-------
|
||||
|.......
|
||||
|.......
|
||||
|..*.OX.
|
||||
|...O.X.
|
||||
|.......
|
||||
|
||||
:8,I,value(3)
|
||||
|
||||
|
||||
Pattern Invade3
|
||||
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..*..
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..O..
|
||||
|
||||
:8,sIe,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade4
|
||||
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..*..
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..oO.
|
||||
|
||||
:8,sIe,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade4b
|
||||
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..*..
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..ooO
|
||||
|
||||
:8,sIe,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade4c
|
||||
|
||||
|.....?
|
||||
|.....?
|
||||
|.....?
|
||||
|.....?
|
||||
|..*..?
|
||||
|.....?
|
||||
|.....?
|
||||
|.....?
|
||||
|.....?
|
||||
|..oooO
|
||||
|
||||
:8,sIe,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade5
|
||||
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..*..
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..O..
|
||||
|
||||
:8,Ie,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade6
|
||||
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..*..
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..oO.
|
||||
|
||||
:8,Ie,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade6b
|
||||
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..*..
|
||||
|.....
|
||||
|.....
|
||||
|.....
|
||||
|..ooO
|
||||
|
||||
:8,Ie,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade6c
|
||||
|
||||
|.....?
|
||||
|.....?
|
||||
|.....?
|
||||
|..*..?
|
||||
|.....?
|
||||
|.....?
|
||||
|.....?
|
||||
|..oooO
|
||||
|
||||
:8,Ie,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade7a
|
||||
|
||||
O.....o
|
||||
.......
|
||||
.......
|
||||
...*...
|
||||
.......
|
||||
.......
|
||||
o.....o
|
||||
|
||||
:\,Ie,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade7b
|
||||
|
||||
.......
|
||||
.......
|
||||
..O....
|
||||
.......
|
||||
....*..
|
||||
.......
|
||||
.......
|
||||
|
||||
:\,Ie,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade7c
|
||||
# gf Corrected symmetry. (3.1.23)
|
||||
|
||||
.......
|
||||
.......
|
||||
.......
|
||||
..O.*..
|
||||
.......
|
||||
.......
|
||||
.......
|
||||
|
||||
:-,Ie,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade7d
|
||||
|
||||
O.....o
|
||||
.......
|
||||
.......
|
||||
...*...
|
||||
.......
|
||||
.......
|
||||
-------
|
||||
|
||||
:8,Ie,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade8
|
||||
|
||||
+-----
|
||||
|.....
|
||||
|.....
|
||||
|..*..
|
||||
|.....
|
||||
|..Ooo
|
||||
|
||||
:8,sI,value(2)
|
||||
|
||||
|
||||
Pattern Invade9
|
||||
|
||||
+-----
|
||||
|.....
|
||||
|.....
|
||||
|..*..
|
||||
|.....
|
||||
|...Oo
|
||||
|
||||
:8,sI,value(2)
|
||||
|
||||
|
||||
Pattern Invade10
|
||||
|
||||
+-----
|
||||
|.....
|
||||
|.....
|
||||
|..*..
|
||||
|.....
|
||||
|....O
|
||||
|
||||
:\,sI,value(2)
|
||||
|
||||
|
||||
Pattern Invade11
|
||||
|
||||
+------
|
||||
|......
|
||||
|......
|
||||
|..*...
|
||||
|......
|
||||
|......
|
||||
|.....O
|
||||
|
||||
:\,sI,value(2)
|
||||
|
||||
|
||||
Pattern Invade12
|
||||
|
||||
+-------
|
||||
|.......
|
||||
|.......
|
||||
|..*....
|
||||
|.......
|
||||
|.......
|
||||
|.......
|
||||
|......O
|
||||
|
||||
:\,sI,value(2)
|
||||
|
||||
|
||||
Pattern Invade13
|
||||
|
||||
|......
|
||||
|..O...
|
||||
|......
|
||||
|..*...
|
||||
|......
|
||||
|...O..
|
||||
|......
|
||||
|
||||
:8,Ie,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade14
|
||||
|
||||
|......
|
||||
|...O..
|
||||
|......
|
||||
|...*..
|
||||
|......
|
||||
|...O..
|
||||
|......
|
||||
|
||||
:8,Ie,value(0.2)
|
||||
|
||||
|
||||
Pattern Invade15
|
||||
|
||||
|......
|
||||
|......
|
||||
|......
|
||||
|.*.O..
|
||||
|......
|
||||
|......
|
||||
|......
|
||||
|
||||
:8,Ie,value(0.4)
|
||||
|
||||
|
||||
Pattern Invade16
|
||||
|
||||
+------
|
||||
|......
|
||||
|......
|
||||
|..*...
|
||||
|......
|
||||
|......
|
||||
|......
|
||||
|..O...
|
||||
|
||||
:8,sI,value(2)
|
||||
|
||||
|
||||
Pattern Invade17
|
||||
|
||||
+------
|
||||
|......
|
||||
|......
|
||||
|.....x
|
||||
|...O.x
|
||||
|......
|
||||
|......
|
||||
|...*..
|
||||
|......
|
||||
|......
|
||||
|...O..
|
||||
|......
|
||||
|
||||
:8,sI,value(0.5)
|
||||
|
||||
|
||||
# END OF FILE
|
459
gnugo/patterns/joseki.c
Normal file
459
gnugo/patterns/joseki.c
Normal file
@ -0,0 +1,459 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/* Convert joseki from sgf format to patterns.db format. */
|
||||
|
||||
#include "board.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define USAGE "\
|
||||
Usage : joseki prefix filename\n\
|
||||
"
|
||||
|
||||
/* Joseki move types. */
|
||||
#define STANDARD 0
|
||||
#define URGENT 1
|
||||
#define MINOR 2
|
||||
#define TRICK 3
|
||||
#define ANTISUJI 4
|
||||
#define TENUKI_OK 5
|
||||
|
||||
|
||||
/* We don't want to play moves on edges of board which might have been
|
||||
* cropped, since there might appear an accidential capture.
|
||||
*/
|
||||
#define SAFE_ON_BOARD(i, j) ((i) >= 0 && (j) >= 0\
|
||||
&& (i) < MAX_BOARD - 1 && (j) < MAX_BOARD - 1)
|
||||
|
||||
static int boardsize;
|
||||
|
||||
|
||||
/* Identify the type of joseki move.
|
||||
* FIXME: We might want the relax the requirement that this info comes
|
||||
* as the very first character.
|
||||
*/
|
||||
static int
|
||||
identify_move_type(char *text)
|
||||
{
|
||||
if (!text)
|
||||
return STANDARD;
|
||||
|
||||
switch ((int) *text) {
|
||||
case 'u':
|
||||
case 'U':
|
||||
return URGENT;
|
||||
break;
|
||||
case 'J':
|
||||
case 'S':
|
||||
return STANDARD;
|
||||
break;
|
||||
case 'j':
|
||||
case 's':
|
||||
return MINOR;
|
||||
break;
|
||||
case 'T':
|
||||
return TRICK;
|
||||
break;
|
||||
case 't':
|
||||
return TENUKI_OK;
|
||||
break;
|
||||
case '0':
|
||||
case 'a':
|
||||
case 'A':
|
||||
return ANTISUJI;
|
||||
break;
|
||||
}
|
||||
|
||||
return STANDARD;
|
||||
}
|
||||
|
||||
/* Copy the lines starting with a certain character to stdout. */
|
||||
static void
|
||||
write_selected_lines(char *text, char start_char)
|
||||
{
|
||||
char *p;
|
||||
if (!text)
|
||||
return;
|
||||
while (1) {
|
||||
p = strchr(text, '\n');
|
||||
if (p)
|
||||
*p = 0;
|
||||
if (*text == start_char)
|
||||
printf("%s\n", text);
|
||||
if (p) {
|
||||
*p = '\n';
|
||||
text = p+1;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Is there any line starting with a certain character? */
|
||||
static int
|
||||
selected_line_exists(char *text, char start_char)
|
||||
{
|
||||
char *p;
|
||||
if (!text)
|
||||
return 0;
|
||||
while (1) {
|
||||
if (*text == start_char)
|
||||
return 1;
|
||||
p = strchr(text, '\n');
|
||||
if (p)
|
||||
text = p+1;
|
||||
else
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Write the main diagram or the constraint diagram. In the former
|
||||
* case, pass a NULL pointer for labels.
|
||||
*/
|
||||
static void
|
||||
write_diagram(int movei, int movej, int color, int marki, int markj,
|
||||
char labels[MAX_BOARD][MAX_BOARD])
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for (i = -1; i <= marki; i++) {
|
||||
for (j = markj; j >= 0; j--) {
|
||||
if (i == -1)
|
||||
printf("-");
|
||||
else if (labels && labels[i][j])
|
||||
printf("%c", labels[i][j]);
|
||||
else if (i == movei && j == movej)
|
||||
printf("*");
|
||||
else if (BOARD(i, j) == color)
|
||||
printf("O");
|
||||
else if (BOARD(i, j) == OTHER_COLOR(color))
|
||||
printf("X");
|
||||
else
|
||||
printf(".");
|
||||
}
|
||||
if (i == -1)
|
||||
printf("+\n");
|
||||
else
|
||||
printf("|\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* Write the colon line of the pattern. */
|
||||
static void
|
||||
write_colon_line(int move_type, char symmetry, char *text)
|
||||
{
|
||||
char *p;
|
||||
|
||||
/* Locate a possible colon line in the sgf file comment. */
|
||||
if (!text)
|
||||
p = NULL;
|
||||
else if (*text == ':')
|
||||
p = text + 1;
|
||||
else {
|
||||
p = strstr(text, "\n:");
|
||||
if (p)
|
||||
p += 2;
|
||||
}
|
||||
|
||||
printf(":%c,sF", symmetry);
|
||||
switch (move_type) {
|
||||
case URGENT:
|
||||
printf("U");
|
||||
break;
|
||||
case STANDARD:
|
||||
printf("J");
|
||||
break;
|
||||
case MINOR:
|
||||
printf("j");
|
||||
break;
|
||||
case TRICK:
|
||||
printf("T");
|
||||
break;
|
||||
case TENUKI_OK:
|
||||
printf("t");
|
||||
break;
|
||||
case ANTISUJI:
|
||||
printf("N");
|
||||
break;
|
||||
}
|
||||
|
||||
if (p) {
|
||||
/* A little trick to guess whether the supplied colon line in the
|
||||
* sgf file begins with a classification.
|
||||
*/
|
||||
if (strchr(p, '(')
|
||||
&& (!strchr(p, ',') || strchr(p, ',') > strchr(p, '(')))
|
||||
printf(",");
|
||||
while (*p != 0 && *p != '\n')
|
||||
fputc(*(p++), stdout);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
/* Check if the board and labels are symmetric. */
|
||||
static int
|
||||
board_is_symmetric(int n, char labels[MAX_BOARD][MAX_BOARD])
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
|
||||
for (i = 0; i <= n; i++) {
|
||||
for (j = 0; j < i; j++) {
|
||||
if (BOARD(i, j) != BOARD(j, i)
|
||||
|| (labels && labels[i][j] != labels[j][i]))
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Write a pattern to stdout. */
|
||||
static void
|
||||
make_pattern(int movei, int movej, int color,
|
||||
int marki, int markj, int multiple_marks,
|
||||
char labels[MAX_BOARD][MAX_BOARD], char *text,
|
||||
const char *prefix)
|
||||
{
|
||||
static int pattern_number = 0;
|
||||
int move_type;
|
||||
char symmetry = '8';
|
||||
|
||||
pattern_number++;
|
||||
move_type = identify_move_type(text);
|
||||
|
||||
printf("Pattern %s%d\n", prefix, pattern_number);
|
||||
|
||||
/* Write comments. */
|
||||
write_selected_lines(text, '#');
|
||||
printf("\n");
|
||||
|
||||
/* Write the main diagram. */
|
||||
write_diagram(movei, movej, color, marki, markj, NULL);
|
||||
printf("\n");
|
||||
|
||||
/* Write the colon line. */
|
||||
if (movei == movej && marki == markj && board_is_symmetric(marki, labels))
|
||||
symmetry = '/';
|
||||
write_colon_line(move_type, symmetry, text);
|
||||
printf("\n");
|
||||
|
||||
/* Write the constraint diagram if there are any labels, a
|
||||
* constraint line, or an action line.
|
||||
*/
|
||||
if (labels
|
||||
|| selected_line_exists(text, ';')
|
||||
|| selected_line_exists(text, '>')) {
|
||||
write_diagram(movei, movej, color, marki, markj, labels);
|
||||
|
||||
printf("\n");
|
||||
|
||||
/* Write constraint and action lines. */
|
||||
write_selected_lines(text, ';');
|
||||
write_selected_lines(text, '>');
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
/* Basic sanity checking. We do this at the end to simplify debugging. */
|
||||
if (multiple_marks)
|
||||
fprintf(stderr, "Warning: Multiple square marks in pattern %s%d\n",
|
||||
prefix, pattern_number);
|
||||
|
||||
if (is_suicide(POS(movei, movej), color)) {
|
||||
fprintf(stderr, "Error: Illegal move in pattern %s%d\n",
|
||||
prefix, pattern_number);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Analyze the node properties in order to make a pattern. Then make
|
||||
* recursive calls for child node and siblings.
|
||||
*/
|
||||
static void
|
||||
analyze_node(SGFNode *node, const char *prefix)
|
||||
{
|
||||
SGFProperty *prop;
|
||||
int i, j;
|
||||
char labels[MAX_BOARD][MAX_BOARD];
|
||||
int label_found = 0;
|
||||
int movei = -1;
|
||||
int movej = -1;
|
||||
int color = EMPTY;
|
||||
int marki = -1;
|
||||
int markj = -1;
|
||||
int multiple_marks = 0;
|
||||
char *comment = NULL;
|
||||
|
||||
/* Clear the labels array. */
|
||||
memset(labels, 0, MAX_BOARD * MAX_BOARD);
|
||||
|
||||
/* Check the node properties for a move, a square mark, labels, and
|
||||
* a comment.
|
||||
*/
|
||||
for (prop = node->props; prop; prop = prop->next) {
|
||||
switch (prop->name) {
|
||||
case SGFSQ: /* Square */
|
||||
case SGFMA: /* Mark */
|
||||
if (marki != -1)
|
||||
multiple_marks = 1;
|
||||
else {
|
||||
get_moveXY(prop, &marki, &markj, boardsize);
|
||||
markj = boardsize - 1 - markj;
|
||||
}
|
||||
break;
|
||||
|
||||
case SGFW: /* White move */
|
||||
color = WHITE;
|
||||
get_moveXY(prop, &movei, &movej, boardsize);
|
||||
movej = boardsize - 1 - movej;
|
||||
break;
|
||||
|
||||
case SGFB: /* Black move */
|
||||
color = BLACK;
|
||||
get_moveXY(prop, &movei, &movej, boardsize);
|
||||
movej = boardsize - 1 - movej;
|
||||
break;
|
||||
|
||||
case SGFLB: /* Label, with value like "mh:A" */
|
||||
get_moveXY(prop, &i, &j, boardsize);
|
||||
j = boardsize - 1 - j;
|
||||
gg_assert(prop->value[2] == ':');
|
||||
if (ON_BOARD2(i, j)) {
|
||||
labels[i][j] = prop->value[3];
|
||||
label_found = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case SGFC: /* Comment */
|
||||
comment = prop->value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we have a move and a square mark, produce a pattern. */
|
||||
if (SAFE_ON_BOARD(movei, movej) && ON_BOARD2(marki, markj))
|
||||
make_pattern(movei, movej, color, marki, markj, multiple_marks,
|
||||
(label_found ? labels : NULL), comment, prefix);
|
||||
|
||||
/* Traverse child, if any. */
|
||||
if (node->child) {
|
||||
if (SAFE_ON_BOARD(movei, movej))
|
||||
tryko(POS(movei, movej), color, NULL);
|
||||
analyze_node(node->child, prefix);
|
||||
if (SAFE_ON_BOARD(movei, movej))
|
||||
popgo();
|
||||
}
|
||||
|
||||
/* Traverse sibling, if any. */
|
||||
if (node->next)
|
||||
analyze_node(node->next, prefix);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
const char *filename;
|
||||
const char *prefix;
|
||||
SGFNode *sgf;
|
||||
|
||||
/* Check number of arguments. */
|
||||
if (argc != 3) {
|
||||
fprintf(stderr, USAGE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
prefix = argv[1];
|
||||
filename = argv[2];
|
||||
|
||||
/* Read the sgf file into a tree in memory. */
|
||||
sgf = readsgffile(filename);
|
||||
if (!sgf) {
|
||||
fprintf(stderr, "%s: Couldn't open sgf file %s.\n", argv[0], filename);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#define PREAMBLE "\
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n\
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #\n\
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #\n\
|
||||
# #\n\
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #\n\
|
||||
# 2008 and 2009 by the Free Software Foundation. #\n\
|
||||
# #\n\
|
||||
# This program is free software; you can redistribute it and/or #\n\
|
||||
# modify it under the terms of the GNU General Public License as #\n\
|
||||
# published by the Free Software Foundation - version 3 or #\n\
|
||||
# (at your option) any later version. #\n\
|
||||
# #\n\
|
||||
# This program is distributed in the hope that it will be useful, #\n\
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #\n\
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #\n\
|
||||
# GNU General Public License in file COPYING for more details. #\n\
|
||||
# #\n\
|
||||
# You should have received a copy of the GNU General Public #\n\
|
||||
# License along with this program; if not, write to the Free #\n\
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, #\n\
|
||||
# Boston, MA 02111, USA. #\n\
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n\
|
||||
# This file is automatically generated by joseki. Do not edit #\n\
|
||||
# it directly. Instead, edit the corresponding sgf file. #\n\
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n\
|
||||
\n\n\
|
||||
"
|
||||
|
||||
printf(PREAMBLE);
|
||||
printf("attribute_map general\n\n");
|
||||
|
||||
/* Call the engine to setup and clear the board. */
|
||||
board_size = MAX_BOARD;
|
||||
clear_board();
|
||||
|
||||
/* Determine board size of the file. */
|
||||
if (!sgfGetIntProperty(sgf, "SZ", &boardsize)) {
|
||||
fprintf(stderr, "joseki: error: can't determine file board size\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Walk through the tree and make patterns. */
|
||||
analyze_node(sgf, prefix);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
109
gnugo/patterns/joseki.dsp
Normal file
109
gnugo/patterns/joseki.dsp
Normal file
@ -0,0 +1,109 @@
|
||||
# Microsoft Developer Studio Project File - Name="joseki" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=joseki - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "joseki.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "joseki.mak" CFG="joseki - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "joseki - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "joseki - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "joseki - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /GX /Zi /O2 /I "." /I ".." /I "../sgf" /I "../engine" /I "../utils" /D "WIN32" /D "NDEBUG" /D "HAVE_CONFIG_H" /D "_CONSOLE" /D "_MBCS" /Fd"Release/joseki" /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 sgf.lib utils.lib board.obj /nologo /subsystem:console /incremental:yes /machine:I386 /libpath:"../sgf/$(IntDir)/" /libpath:"../utils/$(IntDir)/" /libpath:"../engine/$(IntDir)/"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "joseki - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /W2 /Gm /GX /ZI /Od /I "." /I ".." /I "../sgf" /I "../engine" /I "../utils" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /FR /Fd"Debug/joseki" /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 sgf.lib utils.lib board.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../sgf/$(IntDir)/" /libpath:"../utils/$(IntDir)/" /libpath:"../engine/$(IntDir)/"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "joseki - Win32 Release"
|
||||
# Name "joseki - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\patterns\joseki.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
7000
gnugo/patterns/komoku.db
Normal file
7000
gnugo/patterns/komoku.db
Normal file
File diff suppressed because it is too large
Load Diff
425
gnugo/patterns/komoku.sgf
Normal file
425
gnugo/patterns/komoku.sgf
Normal file
@ -0,0 +1,425 @@
|
||||
This is GNU Go, a Go program. Contact gnugo@gnu.org, or see
|
||||
http://www.gnu.org/software/gnugo/ for more information.
|
||||
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008 and 2009 by the Free Software Foundation.
|
||||
|
||||
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 - 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 in file COPYING 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 02111, USA.
|
||||
|
||||
(;GM[1]FF[3]
|
||||
SZ[19]HA[0]
|
||||
GN[Komoku joseki database]
|
||||
;B[qd]
|
||||
(;W[od]
|
||||
(;B[oc]MA[mg]
|
||||
(;W[nc]MA[lg];B[pc]MA[mf]C[U]
|
||||
(;W[nd]MA[lg]C[:-,shape(6)]
|
||||
(;B[qf]MA[mh]C[U];W[jc]MA[if]C[U];B[hc]MA[gg]C[t
|
||||
]
|
||||
(;W[je]MA[gg])
|
||||
|
||||
(;W[tt];B[lc]MA[hg]
|
||||
(;W[ld]C[0
|
||||
#an obvious, but wrong, move
|
||||
];B[lb])
|
||||
|
||||
(;W[lb]MA[gg])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[tt];W[qe]MA[li]C[s];B[re]MA[li];W[pd]MA[li];B[rc]MA[li];W[qf]
|
||||
MA[li];B[rf]MA[li];W[qg]MA[li])
|
||||
|
||||
(;B[kd]MA[if];W[qe]MA[ig];B[re]MA[ig];W[pd]MA[ig];B[rc]MA[ig];
|
||||
C[:-,shape(6)
|
||||
#here
|
||||
]W[qf]MA[ii];B[rf]MA[ii]
|
||||
(;W[qh]MA[ij])
|
||||
|
||||
(;W[qg]MA[ii])
|
||||
)
|
||||
|
||||
(;B[pe]MA[lg];W[jc]MA[if];B[qj]MA[ik];W[tt];B[nf]C[t
|
||||
]MA[ik])
|
||||
)
|
||||
|
||||
(;W[md]MA[jg]C[:-, shape(6)]
|
||||
(;B[qf]MA[mh];W[ic]MA[hf])
|
||||
|
||||
(;B[ne]MA[lg]
|
||||
(;W[oe]MA[lg];B[nb]MA[lg]
|
||||
(;W[nf]MA[lg]C[:-,shape(6)
|
||||
];B[mb]MA[lg];W[qe]MA[lg];B[re]MA[lg];W[qg]
|
||||
MA[lg])
|
||||
|
||||
(;W[mb]MA[lg]C[0
|
||||
#gnugo likes this move, which is bad.];B[nd]MA[lg];
|
||||
W[mc]MA[lg];B[of]MA[lg])
|
||||
)
|
||||
|
||||
(;W[nd]MA[lg];B[pe]MA[lg];W[ic]MA[hg];B[qj]MA[hk]C[t
|
||||
:-,shape(8)
|
||||
])
|
||||
)
|
||||
|
||||
(;B[pe]C[0
|
||||
#bad idea without the peep first
|
||||
]MA[kg];W[ic]MA[hg];B[ne]
|
||||
MA[hg];W[me]C[:-,shape(8)
|
||||
]MA[hg])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[pd]MA[mh];B[pc]MA[nf]C[U];W[qe]MA[ng]C[U]
|
||||
(;B[qc]MA[ng];W[nd]MA[mg]C[U]
|
||||
(;B[mc]MA[lg];W[pf]MA[lg]C[:-,shape(6)])
|
||||
|
||||
(;B[re]MA[lh];W[qf]MA[lh];B[rf]MA[lh];W[qg]MA[li];B[mc]MA[ki];W[le]
|
||||
MA[ji]C[U];B[lc]MA[ji]C[U])
|
||||
)
|
||||
|
||||
(;B[nd]MA[ki]
|
||||
LB[qc:A][rd:B][qb:C][re:D][qf:E][rf:F][nc:G][oe:H][pe:I][qg:J][pf:K][of:L][pg:M]
|
||||
C[; xplay_attack(A,B,C,D,E,F,G,H,I,J,K,L,M,M)
|
||||
];W[qc]MA[ki]C[U];B[rd]
|
||||
MA[ki];W[qb]MA[ki];B[re]MA[ki];W[pf]MA[ki]C[U]
|
||||
(;B[qf]MA[ki]C[U];W[nc]MA[ki]C[U];B[pe]MA[ki];W[oe]MA[ki];B[of]MA[ki];
|
||||
W[ne]MA[ki];B[pg]MA[ki];W[md]MA[ki])
|
||||
|
||||
(;B[pb]MA[mg]
|
||||
C[0
|
||||
#this is bad, and gnugo will try it.
|
||||
#actually, probably ok. See Ishida p31. this is simply a non-standard order.
|
||||
])
|
||||
)
|
||||
|
||||
(;B[nc]MA[kg]
|
||||
C[0
|
||||
#we don't start the large avalanche. It probably has complications to
|
||||
check.]
|
||||
;W[nd]MA[kg];B[md]MA[kg]
|
||||
(;W[qc]MA[kg];B[rd]MA[kg];W[qb]MA[kg];B[rc]MA[kg];W[mc]MA[jg];B[lc]
|
||||
MA[ji];W[rb]MA[ji]C[U];B[re]MA[ji];W[mb]MA[ji];B[nb]MA[ii];W[lb]MA[ii]
|
||||
;B[pb]MA[ih];W[kc]MA[ii];B[me]MA[ii];W[of]MA[ii]C[U];B[qf]MA[ii];W[nf]
|
||||
MA[ii]C[U];B[ke]MA[ii];W[hc]MA[fi];B[lg]MA[fi];W[oi]MA[fk];B[qi]MA[fk])
|
||||
|
||||
(;W[me]MA[kg]C[0
|
||||
#bad
|
||||
])
|
||||
)
|
||||
|
||||
(;B[re]MA[mg]
|
||||
(;W[rd]MA[mg]C[U];B[qc]MA[mg]C[U];W[rf]MA[mg]C[U];B[nd]MA[lg]
|
||||
C[:-,shape(6)];W[pf]MA[lg]C[:-,shape(6)]
|
||||
(;B[of]C[t
|
||||
]MA[lh]
|
||||
(;W[og]C[U
|
||||
]MA[mi]
|
||||
(;B[ne]C[0
|
||||
#don't worry so much about the two stones.
|
||||
]MA[mi];W[ng]
|
||||
C[:-,shape(8)
|
||||
]MA[mi];B[pe]C[0
|
||||
]MA[mi];W[qf]C[U
|
||||
]MA[mi])
|
||||
|
||||
(;B[ng]MA[lj];W[oh]MA[lj];B[ne]MA[lj];W[nh]MA[lj])
|
||||
)
|
||||
|
||||
(;W[pg]C[0
|
||||
#too submissive. the hane is better.
|
||||
]MA[mh])
|
||||
)
|
||||
|
||||
(;B[tt];W[rc]C[t
|
||||
:-,shape(6)
|
||||
]MA[lg]
|
||||
(;B[mc]MA[lg]C[:-,shape(8)
|
||||
])
|
||||
|
||||
(;B[of]MA[lh];W[og]MA[lh];B[ng]MA[lh];W[oh]MA[li];B[ne]MA[li];W[pe]
|
||||
MA[li];B[lc]MA[ki])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[rf]C[0
|
||||
]
|
||||
(;B[rd]MA[lh]C[J
|
||||
])
|
||||
|
||||
(;B[pe]MA[lh]C[0
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[rd]MA[mg]C[0
|
||||
#not very good for b.];W[nd]MA[lg];B[re];W[qf]MA[lg];
|
||||
B[nc];W[md]MA[kg];B[lc])
|
||||
|
||||
(;B[pe]C[0
|
||||
#we need answers to this.
|
||||
]MA[lh];W[qf]
|
||||
C[0
|
||||
#very bad, but gnugo likes it.
|
||||
]MA[lh];B[nd];W[oe];B[ne];W[of];
|
||||
B[rd])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[pf]MA[lh]
|
||||
(;W[qc]MA[lh]C[:-,shape(3)]
|
||||
(;B[rc]MA[lh];W[pc]MA[lh]C[U]
|
||||
(;B[re]MA[lh]C[:-,shape(8)];W[kc]MA[jg])
|
||||
|
||||
(;B[rb]MA[kg];W[kc]MA[jg];B[qj]MA[jk])
|
||||
)
|
||||
|
||||
(;B[pc]MA[lh]C[0])
|
||||
)
|
||||
|
||||
(;W[lc]MA[lh]C[0])
|
||||
|
||||
(;W[nf]MA[lh]C[0])
|
||||
)
|
||||
|
||||
(;B[oe]MA[lg];W[ne]MA[lg]
|
||||
(;B[pe]MA[lg];W[md]MA[kg]C[U];B[oc]MA[kg]C[j];W[nc]MA[kg])
|
||||
|
||||
(;B[of];W[md]MA[kg]
|
||||
(;B[oc];W[pd])
|
||||
|
||||
(;B[pd]MA[lg];W[oc]MA[kg])
|
||||
)
|
||||
|
||||
(;B[nd];W[pe]MA[mg]C[U];B[of];W[pd]MA[lh]C[U]
|
||||
(;B[me];W[nc]MA[kh]C[U]
|
||||
(;B[nf];W[mc]MA[kh]C[U])
|
||||
|
||||
(;B[md];W[pf]MA[li])
|
||||
)
|
||||
|
||||
(;B[md];W[pf];B[og];W[pg])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[ld]MA[ki]C[S]
|
||||
(;W[of]MA[ki]C[U]
|
||||
(;B[qf]MA[ki]C[S];W[oh]MA[ki]C[S];B[qh]MA[ki]C[S];W[id]MA[ii]C[S])
|
||||
|
||||
(;B[qg]MA[ki];W[oh]MA[kj];B[pi]MA[kk];W[id]MA[gk])
|
||||
)
|
||||
|
||||
(;W[pg]MA[ki]C[U];B[oe]MA[ki]C[U];W[ne]MA[ki]C[U];B[of]MA[ki]C[U];
|
||||
W[pd]MA[ki]C[U]
|
||||
(;B[pe]MA[ki]C[U];W[qc]MA[ki];B[qe]MA[ki];W[nc]MA[ki];B[rc]MA[ki];
|
||||
W[qb]MA[ki])
|
||||
|
||||
(;B[qf]MA[ki]C[U]
|
||||
(;W[qc]MA[ki];B[qe]MA[ki];W[nc]MA[ki];B[rc]MA[ki];W[qb]MA[ki]
|
||||
(;B[qj]MA[kk])
|
||||
|
||||
(;B[qk]MA[kl])
|
||||
|
||||
(;B[ql]MA[km])
|
||||
)
|
||||
|
||||
(;W[nf]MA[ki];B[og]MA[ki]C[U];W[qc]MA[ki];B[qe]MA[ki]C[U]
|
||||
(;W[pb]MA[ki]
|
||||
(;B[ql]MA[km])
|
||||
|
||||
(;B[qk]MA[kl])
|
||||
)
|
||||
|
||||
(;W[rc]MA[ki]C[0
|
||||
# Requires a ladder.];B[pi]MA[kj];W[nc]MA[kj])
|
||||
)
|
||||
|
||||
(;W[pe]MA[ki]C[0
|
||||
# Bad];B[pf]MA[ki];W[qe]MA[ki];B[nd]MA[ki];W[rf]
|
||||
MA[ki];B[rg]MA[ki];W[re]MA[ki];B[qg]MA[ki];W[nc]MA[ki];B[md]MA[ki])
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;B[qf]MA[ii];W[qc]MA[ii]
|
||||
(;B[rc];W[pc]MA[ii];B[rb]MA[ii];W[kc]MA[ii])
|
||||
|
||||
(;B[pc]C[0
|
||||
]MA[ih];W[pd]MA[ih];B[qb]MA[ih];W[rc]MA[ih];B[rd]MA[ih]
|
||||
(;W[pb]C[0
|
||||
]MA[ih];B[oc]MA[ih];W[rb];B[ob]MA[ih];W[qa];B[mc]MA[ih])
|
||||
|
||||
(;W[rb]C[0
|
||||
]MA[mg];B[pb]MA[mg])
|
||||
|
||||
(;W[oc]MA[ih];B[pb]MA[ih];W[ob]MA[ih];B[rb]MA[ih];W[kc]MA[ih])
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;W[oc]
|
||||
(;B[pe]MA[mi]
|
||||
(;W[md]MA[kg];B[pc]MA[jh]C[U];W[od]MA[kh]C[:-,shape(5)])
|
||||
|
||||
(;W[lc]MA[jf];B[jc];W[qb]MA[if])
|
||||
|
||||
(;B[nd]MA[mg]
|
||||
(;W[mc]MA[kh]C[U];B[pc]MA[kh];W[nc];B[qj]MA[ll])
|
||||
|
||||
(;W[nc];B[md]MA[lh];W[lc]MA[kh];B[qj]MA[kk])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[ld]MA[ig]
|
||||
(;W[of]MA[ki]C[:-,shape(5)]
|
||||
(;B[qg]MA[ki])
|
||||
|
||||
(;B[oe]MA[jh];W[ne]MA[ki]C[U];B[pe]MA[kg]C[U];W[nd]MA[kh]C[U];B[nf]
|
||||
MA[kh]C[U];W[mf]MA[ki]C[U];B[ng]MA[ji]C[U];W[le]MA[ji]C[U]
|
||||
(;B[og]MA[ji]C[:-,shape(8)];W[kd]MA[ji]C[U])
|
||||
|
||||
(;B[jd]MA[hi]C[:-,shape(8)];W[qf]MA[ii]C[U];B[pf]MA[ji]C[U];W[og]
|
||||
MA[ii]C[U];B[pg]MA[ii]C[U];W[oh]MA[ij]C[U];B[qi]MA[ik]C[U];W[mh]C[U])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[nd]MA[jg]C[:-,shape(5)];B[pf]MA[ki]C[:-,shape(5)];W[qb]MA[ki]C[U];
|
||||
B[qj]MA[kl]C[:-,shape(5)])
|
||||
)
|
||||
|
||||
(;B[kc]MA[ig]C[:-,shape(8)])
|
||||
|
||||
(;B[mc]MA[kf]LB[kc:A]C[;!xarea(A)];W[oe]MA[lg];B[pf]MA[lh]
|
||||
(;W[md]MA[kh];B[ld];W[me]MA[kh];B[nc];W[od]MA[kg])
|
||||
|
||||
(;W[ld];B[pc]MA[ih]
|
||||
(;W[ob]MA[ih];B[lc]MA[ih];W[kd]MA[hh];B[md]MA[hh];W[me]MA[hh];B[kc]
|
||||
MA[hh];W[jd]MA[hh]
|
||||
(;B[ic]MA[gh];W[nd]MA[gh])
|
||||
|
||||
(;B[jc]MA[hh];W[of]MA[gi]
|
||||
(;B[pg]MA[gi];W[id]MA[gi];B[hc]MA[gi])
|
||||
|
||||
(;B[id]MA[ii];W[pg]MA[ij];B[qg]MA[ij];W[pe]MA[ij];B[qf]MA[ij];W[qe]
|
||||
MA[ij];B[re]MA[ij];W[qh]MA[ij])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[pb]MA[ih];B[qb]MA[ih];W[pd]MA[ih];B[qc]MA[ih];W[md]MA[ih])
|
||||
)
|
||||
|
||||
(;W[ph];B[of]MA[ij];W[md]MA[ij];B[lc]MA[ij];W[nf]MA[ij]
|
||||
(;B[ng]MA[ij];W[mf]MA[ij];B[oh]MA[ij]
|
||||
(;W[pj]MA[il];B[pc]MA[il];W[nc]MA[il];B[ic]MA[hk])
|
||||
|
||||
(;W[ic]MA[gj])
|
||||
)
|
||||
|
||||
(;B[oh]MA[ik]
|
||||
(;W[pj]MA[ik];B[ng]MA[ik];W[mf]MA[ik])
|
||||
|
||||
(;W[pe]MA[ik];B[qe]MA[ik];W[og]MA[ik];B[ng]MA[ik];W[pg]MA[ik];B[qf]
|
||||
MA[ik];W[mf]MA[ik];B[pi]MA[ik];W[nh]MA[ik];B[oi]MA[ik];W[mg]MA[ik];
|
||||
B[qh]MA[ik];W[ic]MA[gj])
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;B[od]MA[mf]C[0
|
||||
];W[nd]MA[kg];B[pc]MA[kg];W[oe]MA[kg];B[pd]MA[kg];
|
||||
W[nc]MA[kg])
|
||||
|
||||
(;B[pf]MA[kj]
|
||||
(;W[qc]MA[lh];B[rc]MA[lh];W[pd]MA[lh]
|
||||
(;B[qe]MA[lh]
|
||||
(;W[qb]MA[lh];B[qj]MA[ll])
|
||||
|
||||
(;W[tt];B[qb]MA[mh];W[pb]MA[mh])
|
||||
)
|
||||
|
||||
(;B[qb]MA[lh];W[qe]MA[lh];B[pc]MA[lh];W[rd]MA[lh];B[qc]MA[lh];W[pe]
|
||||
MA[lh];B[od]MA[lh];W[oe]MA[lh];B[nd]MA[kh];W[lc];B[ne]MA[kh];W[of]
|
||||
MA[kh];B[nc]MA[kh])
|
||||
)
|
||||
|
||||
(;W[lc]MA[ji]
|
||||
(;B[pc]MA[ji];W[od]MA[ji]
|
||||
(;B[ph]MA[jk])
|
||||
|
||||
(;B[qi]MA[jk])
|
||||
)
|
||||
|
||||
(;B[qj]C[0
|
||||
]MA[jl];W[qc]MA[jl];B[rc]MA[jl];W[pd]MA[jl];B[qe]MA[jl]
|
||||
(;W[qb]C[j
|
||||
]MA[jl])
|
||||
|
||||
(;W[tt];B[qb]MA[jl];W[pb]MA[jl])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[kc]MA[hj]C[j
|
||||
]
|
||||
(;B[pc]C[0
|
||||
];W[od])
|
||||
|
||||
(;B[ic]MA[hj];W[qc]MA[hj];B[rc]MA[hj];W[pd]MA[hj];B[qe]MA[hj];W[qb]
|
||||
MA[hj];B[qj]MA[hl])
|
||||
|
||||
(;B[mc]MA[ii]C[#are there other continuations of note here?
|
||||
];W[mb]
|
||||
MA[ii];B[lb]MA[jh];W[lc]MA[jh];B[nb]MA[jh];W[md]MA[jh];B[nc]MA[jh];
|
||||
W[nd]MA[jh];B[od]MA[jh];W[ob]MA[jh];B[ma]MA[jh];W[oa]MA[jh];B[na]
|
||||
MA[jh];W[kb]MA[jh];B[pc]MA[jh];W[oe]MA[jh];B[pd]MA[jh])
|
||||
)
|
||||
|
||||
(;W[qh]C[j
|
||||
]MA[ik]
|
||||
(;B[kc]MA[ik])
|
||||
|
||||
(;B[pk]MA[il])
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(;W[nc]
|
||||
(;B[lc]MA[jf];W[qc]MA[jf]
|
||||
(;B[rc]C[0
|
||||
#too easy for w
|
||||
]MA[jf];W[pc]MA[jf];B[re]MA[jf];W[ne]MA[jf])
|
||||
|
||||
(;B[pc]MA[jf];W[pd]MA[jf]
|
||||
(;B[qb]MA[jf];W[rc]MA[jf];B[od]MA[jf];W[pe]MA[jf];B[oc]MA[jf];W[rb]
|
||||
MA[jf];B[of]MA[jh];W[oe]MA[jh];B[ne]MA[jh];W[qe]MA[jh];B[nf]MA[jh])
|
||||
|
||||
(;B[od]C[0
|
||||
#bad for b
|
||||
]MA[jf];W[pe]MA[jf];B[qb]MA[jf];W[oc]MA[jf];
|
||||
B[rc]MA[jf];W[pb]MA[jf];B[qc]MA[jf];W[ne]MA[jf])
|
||||
)
|
||||
)
|
||||
|
||||
(;B[pc]MA[jf];W[kc]MA[jf])
|
||||
|
||||
(;B[od]MA[jf];W[nd]MA[jf]
|
||||
(;B[oc]MA[jf];W[ne]MA[jf])
|
||||
|
||||
(;B[ne]MA[jg];W[me]MA[jg];B[oc]MA[jg];W[ob]MA[jg];B[pb]MA[jg];W[nb]
|
||||
MA[jg];B[oe]MA[jg];W[mf]MA[jg])
|
||||
)
|
||||
)
|
||||
|
||||
)
|
257
gnugo/patterns/mc_mogo_classic.db
Normal file
257
gnugo/patterns/mc_mogo_classic.db
Normal file
@ -0,0 +1,257 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING #
|
||||
# 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 02111, USA. #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# This is an approximate adaptation to patterns of the simulation
|
||||
# policy for an early version of MoGo, as published in the report
|
||||
# "Modification of UCT with Patterns in Monte-Carlo Go", RR-6062, by
|
||||
# Sylvain Gelly, Yizao Wang, R<>mi Munos, and Olivier Teytaud.
|
||||
#
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
|
||||
|
||||
# Proper eyes.
|
||||
|
||||
oOo
|
||||
O*O
|
||||
oO?
|
||||
|
||||
:0
|
||||
|
||||
|
||||
oOo
|
||||
O*O
|
||||
---
|
||||
|
||||
:0
|
||||
|
||||
|
||||
|Oo
|
||||
|*O
|
||||
+--
|
||||
|
||||
:0
|
||||
|
||||
|
||||
# Run away from atari or capture near move.
|
||||
|
||||
?X?
|
||||
?*?
|
||||
???
|
||||
|
||||
:10000,ocap1+,osafe,near
|
||||
|
||||
?O?
|
||||
?*?
|
||||
???
|
||||
|
||||
:10000,xcap1+,osafe,near
|
||||
|
||||
|
||||
# 1. Patterns for hane.
|
||||
# 1.1 First figure.
|
||||
|
||||
XOX
|
||||
.*.
|
||||
???
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
OXO
|
||||
.*.
|
||||
???
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
# 1.2 Second figure.
|
||||
|
||||
XO.
|
||||
.*.
|
||||
?.?
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
OX.
|
||||
.*.
|
||||
?.?
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
# 1.3 Third figure.
|
||||
|
||||
XO?
|
||||
X*.
|
||||
?.?
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
OX?
|
||||
O*.
|
||||
?.?
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
# 1.4 Fourth figure.
|
||||
|
||||
OXX
|
||||
.*.
|
||||
?.?
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
# 2. Patterns for cut 1.
|
||||
|
||||
XO?
|
||||
O*X
|
||||
???
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
XO?
|
||||
O*O
|
||||
?O?
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
XO?
|
||||
O*.
|
||||
?.?
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
OX?
|
||||
X*.
|
||||
?.?
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
OX?
|
||||
X*X
|
||||
?X?
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
OX?
|
||||
X*.
|
||||
?.?
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
# 3. Patterns for cut 2.
|
||||
|
||||
?O?
|
||||
X*X
|
||||
ooo
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
?X?
|
||||
O*O
|
||||
xxx
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
# 4. Patterns on the edge.
|
||||
# 4.1 First figure.
|
||||
|
||||
O.?
|
||||
X*?
|
||||
---
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
X.?
|
||||
O*?
|
||||
---
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
# 4.2 Second figure.
|
||||
|
||||
XO?
|
||||
x*?
|
||||
---
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
?X?
|
||||
O*o
|
||||
---
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
# 4.3 Third figure.
|
||||
|
||||
XO?
|
||||
?*?
|
||||
---
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
# 4.4 Fourth figure.
|
||||
|
||||
OX?
|
||||
o*?
|
||||
---
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
# 4.5 Fifth figure.
|
||||
|
||||
?XO
|
||||
O*X
|
||||
---
|
||||
|
||||
:100,near
|
||||
|
||||
|
||||
# Default value.
|
||||
|
||||
???
|
||||
?*?
|
||||
???
|
||||
|
||||
:1
|
||||
|
176
gnugo/patterns/mc_montegnu_classic.db
Normal file
176
gnugo/patterns/mc_montegnu_classic.db
Normal file
@ -0,0 +1,176 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING #
|
||||
# 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 02111, USA. #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# This is an approximate adaptation to patterns of the original
|
||||
# simulation policy of GNU Go's Monte Carlo code.
|
||||
#
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
# Proper eyes.
|
||||
|
||||
oOo
|
||||
O*O
|
||||
oO?
|
||||
|
||||
:0
|
||||
|
||||
oOo
|
||||
O*O
|
||||
---
|
||||
|
||||
:0
|
||||
|
||||
|Oo
|
||||
|*O
|
||||
+--
|
||||
|
||||
:0
|
||||
|
||||
|
||||
# If the opponent played self-atari, with high probability capture.
|
||||
# This also applies to capturing out of recent atari on own stones.
|
||||
|
||||
?X%
|
||||
?*%
|
||||
%%%
|
||||
|
||||
:10000,ocap1,near,osafe
|
||||
:13000,ocap2,near
|
||||
:20000,ocap3,near
|
||||
|
||||
|
||||
# Extend out of recent atari.
|
||||
|
||||
?O%
|
||||
?*%
|
||||
%%%
|
||||
|
||||
:2000,xcap1,osafe,near
|
||||
:4000,xcap2,osafe,near
|
||||
:6000,xcap3,osafe,near
|
||||
|
||||
|
||||
# If the opponent might cut, connect or at least try to connect.
|
||||
#
|
||||
# oYo
|
||||
# o*o
|
||||
|
||||
?XO
|
||||
O*?
|
||||
%%%
|
||||
|
||||
:1000,near,osafe
|
||||
|
||||
?X?
|
||||
O*O
|
||||
%%%
|
||||
|
||||
:1000,near,osafe
|
||||
|
||||
?X|
|
||||
O*|
|
||||
%%%
|
||||
|
||||
:1000,near,osafe
|
||||
|
||||
OX|
|
||||
?*|
|
||||
%%%
|
||||
|
||||
:1000,near,osafe
|
||||
|
||||
|
||||
# If the opponent invited a cut, do cut.
|
||||
#
|
||||
# Y
|
||||
# o*O
|
||||
# X
|
||||
#
|
||||
|
||||
?X?
|
||||
o*O
|
||||
?X?
|
||||
|
||||
:400,near,osafe
|
||||
|
||||
|X?
|
||||
|*O
|
||||
|X?
|
||||
|
||||
:400,near,osafe
|
||||
|
||||
|
||||
# Crosscut.
|
||||
#
|
||||
# YO
|
||||
# o*X
|
||||
# o
|
||||
#
|
||||
|
||||
?XO
|
||||
o*X
|
||||
?o?
|
||||
|
||||
:100,near,osafe
|
||||
|
||||
?XO
|
||||
o*X
|
||||
---
|
||||
|
||||
:100,near,osafe
|
||||
|
||||
|XO
|
||||
|*X
|
||||
+--
|
||||
|
||||
:100,near,osafe
|
||||
|
||||
|
||||
# Capturing stones is always fun.
|
||||
|
||||
?X%
|
||||
?*%
|
||||
%%%
|
||||
|
||||
:30,ocap1,far,osafe
|
||||
:40,ocap2,far
|
||||
:60,ocap3,far
|
||||
|
||||
|
||||
# Slightly prefer near moves.
|
||||
|
||||
??%
|
||||
?*%
|
||||
%%%
|
||||
|
||||
:3,near,osafe
|
||||
|
||||
|
||||
# Default move value.
|
||||
|
||||
??%
|
||||
?*%
|
||||
%%%
|
||||
|
||||
:1
|
49
gnugo/patterns/mc_uniform.db
Normal file
49
gnugo/patterns/mc_uniform.db
Normal file
@ -0,0 +1,49 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING #
|
||||
# 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 02111, USA. #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# This is the so called "light playout" simulation policy where moves
|
||||
# are chosen with uniform probability over the legal moves, except for
|
||||
# playing into small proper eyes.
|
||||
#
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
# Proper eyes.
|
||||
|
||||
oOo
|
||||
O*O
|
||||
oO?
|
||||
|
||||
:0
|
||||
|
||||
oOo
|
||||
O*O
|
||||
---
|
||||
|
||||
:0
|
||||
|
||||
|Oo
|
||||
|*O
|
||||
+--
|
||||
|
||||
:0
|
404
gnugo/patterns/mkeyes.c
Normal file
404
gnugo/patterns/mkeyes.c
Normal file
@ -0,0 +1,404 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/* Compile the eye database. This produces eyes.c. */
|
||||
|
||||
/* see also eyes.db, eyes.h and engine/optics.c */
|
||||
|
||||
|
||||
#define MAXLINE 80
|
||||
#define MAXDIMEN 20
|
||||
#define MAXSIZE 20
|
||||
#define MAXPATNO 800
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "eyes.h"
|
||||
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
char line[MAXLINE];
|
||||
int patno = 0;
|
||||
int p;
|
||||
char vertex[MAXDIMEN][MAXDIMEN];
|
||||
signed char marginal[MAXDIMEN][MAXDIMEN];
|
||||
signed char edge[MAXDIMEN][MAXDIMEN];
|
||||
unsigned char flags[MAXDIMEN][MAXDIMEN];
|
||||
int neighbors[MAXSIZE];
|
||||
int k, l, h;
|
||||
int m = 0, n = 0;
|
||||
int vi[MAXSIZE];
|
||||
int vj[MAXSIZE];
|
||||
int eye_number[MAXPATNO];
|
||||
int esize[MAXPATNO];
|
||||
int msize[MAXPATNO];
|
||||
int value_a[MAXPATNO];
|
||||
int value_b[MAXPATNO];
|
||||
int value_c[MAXPATNO];
|
||||
int value_d[MAXPATNO];
|
||||
int ends[MAXPATNO];
|
||||
int two_neighbors[MAXPATNO];
|
||||
int three_neighbors[MAXPATNO];
|
||||
int num_attacks = 0;
|
||||
int num_defenses = 0;
|
||||
int debug = 0;
|
||||
int fatal_errors = 0;
|
||||
|
||||
printf("\
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\\\n\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *\n\
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *\n\
|
||||
* *\n\
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 and 2007 *\n\
|
||||
* by the Free Software Foundation. *\n\
|
||||
* *\n\
|
||||
* This program is free software; you can redistribute it and/or *\n\
|
||||
* modify it under the terms of the GNU General Public License as *\n\
|
||||
* published by the Free Software Foundation - version 3 *\n\
|
||||
* or (at your option) any later version *\n\
|
||||
* *\n\
|
||||
* This program is distributed in the hope that it will be useful, *\n\
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *\n\
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\n\
|
||||
* GNU General Public License in file COPYING for more details. *\n\
|
||||
* *\n\
|
||||
* You should have received a copy of the GNU General Public *\n\
|
||||
* License along with this program; if not, write to the Free *\n\
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *\n\
|
||||
* Boston, MA 02111, USA. *\n\
|
||||
\\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n");
|
||||
|
||||
printf("/* This file is automatically generated by mkeyes. Do not\n");
|
||||
printf(" * edit it directly. Instead, edit the eye shape database.\n");
|
||||
printf(" */\n\n");
|
||||
printf("#include <stdio.h> /* for NULL */\n");
|
||||
printf("#include \"eyes.h\"\n\n");
|
||||
|
||||
memset(ends, 0, sizeof(ends));
|
||||
memset(two_neighbors, 0, sizeof(two_neighbors));
|
||||
memset(three_neighbors, 0, sizeof(three_neighbors));
|
||||
memset(esize, 0, sizeof(esize));
|
||||
|
||||
while (fgets(line, MAXLINE, stdin) && !fatal_errors) {
|
||||
int last = strlen(line) - 1;
|
||||
|
||||
if (line[last] != '\n') {
|
||||
fprintf(stderr, "mkeyes: line truncated: %s\n", line);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* remove trailing whitespace */
|
||||
for (last--; last >= 0 && isspace((int) line[last]); last--) {
|
||||
line[last] = '\n';
|
||||
line[last+1] = '\0';
|
||||
}
|
||||
|
||||
/* New pattern. */
|
||||
if (sscanf(line, "Pattern %d", &p)) {
|
||||
eye_number[patno] = p;
|
||||
if (patno > 0 && eye_number[patno] <= eye_number[patno-1]) {
|
||||
fprintf(stderr, "mkeyes: Pattern %d out of sequence\n",
|
||||
eye_number[patno]);
|
||||
return 1;
|
||||
}
|
||||
if (debug)
|
||||
fprintf(stderr, "parsing pattern %d\n", eye_number[patno]);
|
||||
|
||||
memset(vertex, 0, sizeof(vertex));
|
||||
memset(marginal, 0, sizeof(marginal));
|
||||
memset(edge, 0, sizeof(edge));
|
||||
memset(flags, 0, sizeof(flags));
|
||||
|
||||
m = 0;
|
||||
esize[patno] = 0;
|
||||
msize[patno] = 0;
|
||||
num_attacks = 0;
|
||||
num_defenses = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Empty line or comment line, skip. */
|
||||
if (strncmp("#", line, 1) == 0 || strncmp("\n", line, 1) == 0)
|
||||
continue;
|
||||
|
||||
if (strncmp(":", line, 1) != 0) {
|
||||
/* diagram line. */
|
||||
for (n = 0; n < MAXDIMEN && strncmp("\n", line + n, 1); n++) {
|
||||
/* space, harmless CR, or corner symbol */
|
||||
if (line[n] == ' ' || line[n] == '\r' || line[n] == '+')
|
||||
continue;
|
||||
|
||||
/* vertical edge */
|
||||
if (line[n] == '|') {
|
||||
if (n == 0)
|
||||
edge[m][n+1]++;
|
||||
else
|
||||
edge[m][n-1]++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* horizontal edge */
|
||||
if (line[n] == '-') {
|
||||
if (m == 0)
|
||||
edge[m+1][n]++;
|
||||
else
|
||||
edge[m-1][n]++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* All other symbols. */
|
||||
vi[esize[patno]] = m;
|
||||
vj[esize[patno]] = n;
|
||||
vertex[m][n] = line[n];
|
||||
if (debug)
|
||||
fprintf(stderr, "%c", line[n]);
|
||||
switch (line[n])
|
||||
{
|
||||
case '.':
|
||||
marginal[m][n] = 0;
|
||||
flags[m][n] = CAN_BE_EMPTY;
|
||||
break;
|
||||
|
||||
case '!':
|
||||
msize[patno]++;
|
||||
marginal[m][n] = 1;
|
||||
flags[m][n] = CAN_BE_EMPTY;
|
||||
break;
|
||||
|
||||
case '@':
|
||||
msize[patno]++;
|
||||
marginal[m][n] = 1;
|
||||
flags[m][n] = CAN_BE_EMPTY | EYE_DEFENSE_POINT | EYE_ATTACK_POINT;
|
||||
num_attacks++;
|
||||
num_defenses++;
|
||||
break;
|
||||
|
||||
case '$':
|
||||
msize[patno]++;
|
||||
marginal[m][n] = 1;
|
||||
flags[m][n] = CAN_CONTAIN_STONE;
|
||||
break;
|
||||
|
||||
case '(':
|
||||
msize[patno]++;
|
||||
marginal[m][n] = 1;
|
||||
flags[m][n] = CAN_BE_EMPTY | EYE_ATTACK_POINT;
|
||||
num_attacks++;
|
||||
break;
|
||||
|
||||
case ')':
|
||||
msize[patno]++;
|
||||
marginal[m][n] = 1;
|
||||
flags[m][n] = CAN_BE_EMPTY | EYE_DEFENSE_POINT;
|
||||
num_defenses++;
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
marginal[m][n] = 0;
|
||||
flags[m][n] = CAN_BE_EMPTY | CAN_CONTAIN_STONE;
|
||||
break;
|
||||
|
||||
case '*':
|
||||
marginal[m][n] = 0;
|
||||
flags[m][n] = CAN_BE_EMPTY | EYE_ATTACK_POINT | EYE_DEFENSE_POINT;
|
||||
num_attacks++;
|
||||
num_defenses++;
|
||||
break;
|
||||
|
||||
case '<':
|
||||
marginal[m][n] = 0;
|
||||
flags[m][n] = CAN_BE_EMPTY | EYE_ATTACK_POINT;
|
||||
num_attacks++;
|
||||
break;
|
||||
|
||||
case '>':
|
||||
marginal[m][n] = 0;
|
||||
flags[m][n] = CAN_BE_EMPTY | EYE_DEFENSE_POINT;
|
||||
num_defenses++;
|
||||
break;
|
||||
|
||||
case 'X':
|
||||
marginal[m][n] = 0;
|
||||
flags[m][n] = CAN_CONTAIN_STONE;
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr,
|
||||
"mkeyes: invalid character %c in pattern %d\n",
|
||||
line[n], eye_number[patno]);
|
||||
fatal_errors++;
|
||||
break;
|
||||
}
|
||||
esize[patno]++;
|
||||
}
|
||||
m++;
|
||||
if (debug)
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
else {
|
||||
/* Colon line. */
|
||||
sscanf(line, ":%1d%1d%1d%1d", &value_a[patno], &value_b[patno],
|
||||
&value_c[patno], &value_d[patno]);
|
||||
if (debug)
|
||||
fprintf(stderr, "value=%d%d%d%d\n", value_a[patno], value_b[patno],
|
||||
value_c[patno], value_d[patno]);
|
||||
|
||||
if (value_b[patno] != value_c[patno]) {
|
||||
if (num_attacks == 0 || num_defenses == 0) {
|
||||
fprintf(stderr,
|
||||
"mkeyes: missing attack or defense point in pattern %d\n",
|
||||
eye_number[patno]);
|
||||
fatal_errors++;
|
||||
}
|
||||
}
|
||||
|
||||
if (value_b[patno] == value_c[patno]) {
|
||||
if (num_attacks > 0 || num_defenses > 0) {
|
||||
fprintf(stderr,
|
||||
"mkeyes: attack or defense point in settled pattern %d\n",
|
||||
eye_number[patno]);
|
||||
fatal_errors++;
|
||||
}
|
||||
}
|
||||
|
||||
printf("static struct eye_vertex eye%d[] = {\n", eye_number[patno]);
|
||||
|
||||
for (l = 0; l < esize[patno]; l++) {
|
||||
int ni[4];
|
||||
int nj[4];
|
||||
int nb[4];
|
||||
int mx[MAXDIMEN][MAXDIMEN];
|
||||
int count = 0;
|
||||
int i = vi[l];
|
||||
int j = vj[l];
|
||||
|
||||
memset(mx, -1, sizeof(mx));
|
||||
|
||||
neighbors[l] = 0;
|
||||
|
||||
for (h = 0; h < 4; h++) {
|
||||
ni[h] = -1;
|
||||
nj[h] = -1;
|
||||
nb[h] = -1;
|
||||
}
|
||||
|
||||
mx[i][j] = 0;
|
||||
|
||||
if (i > 0 && vertex[i-1][j]) {
|
||||
ni[neighbors[l]] = i-1;
|
||||
nj[neighbors[l]] = j;
|
||||
neighbors[l]++;
|
||||
count++;
|
||||
mx[i-1][j] = l;
|
||||
}
|
||||
|
||||
if (i < MAXDIMEN-1 && vertex[i+1][j]) {
|
||||
ni[neighbors[l]] = i+1;
|
||||
nj[neighbors[l]] = j;
|
||||
neighbors[l]++;
|
||||
count++;
|
||||
mx[i+1][j] = l;
|
||||
}
|
||||
|
||||
if (j > 0 && vertex[i][j-1]) {
|
||||
ni[neighbors[l]] = i;
|
||||
nj[neighbors[l]] = j-1;
|
||||
neighbors[l]++;
|
||||
mx[i][j-1] = l;
|
||||
}
|
||||
|
||||
if (j < MAXDIMEN-1 && vertex[i][j+1]) {
|
||||
ni[neighbors[l]] = i;
|
||||
nj[neighbors[l]] = j+1;
|
||||
neighbors[l]++;
|
||||
mx[i][j+1] = l;
|
||||
}
|
||||
|
||||
|
||||
if (neighbors[l] == 1)
|
||||
ends[patno]++;
|
||||
else if (neighbors[l] == 2)
|
||||
two_neighbors[patno]++;
|
||||
else if (neighbors[l] == 3)
|
||||
three_neighbors[patno]++;
|
||||
|
||||
for (h = 0; h < esize[patno]; h++) {
|
||||
|
||||
for (k = 0; k < 4; k++)
|
||||
if (ni[k] != -1 && vi[h] == ni[k] && vj[h] == nj[k])
|
||||
nb[k] = h;
|
||||
}
|
||||
|
||||
|
||||
printf(" {%d, %d, %2d, %d, {%2d, %2d, %2d, %2d}}",
|
||||
marginal[i][j], (int) edge[i][j], (int) flags[i][j],
|
||||
neighbors[l], nb[0], nb[1], nb[2], nb[3]);
|
||||
|
||||
if (l < esize[patno]-1)
|
||||
printf(",\n");
|
||||
else
|
||||
printf("\n};\n\n");
|
||||
}
|
||||
|
||||
patno++;
|
||||
if (patno >= MAXPATNO) {
|
||||
fprintf(stderr,
|
||||
"mkeyes: Too many eye patterns. Increase MAXPATNO in mkeyes.c\n");
|
||||
fatal_errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
printf("\nstruct eye_graph graphs[] = {\n");
|
||||
for (l = 0; l < patno; l++) {
|
||||
|
||||
printf(" {eye%d, %d, %d, %d, %d, %d, %d, {%d, %d, %d, %d}}",
|
||||
eye_number[l], eye_number[l], esize[l], msize[l], ends[l],
|
||||
two_neighbors[l], three_neighbors[l],
|
||||
value_a[l], value_b[l], value_c[l], value_d[l]);
|
||||
if (l < patno-1)
|
||||
printf(",\n");
|
||||
else
|
||||
printf(",\n {NULL, 0, 0, 0, 0, 0, 0, {0, 0, 0, 0}}\n};\n");
|
||||
}
|
||||
|
||||
if (fatal_errors) {
|
||||
printf("\n\n#error in eye database. Rebuild.\n\n");
|
||||
}
|
||||
|
||||
return fatal_errors;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
98
gnugo/patterns/mkeyes.dsp
Normal file
98
gnugo/patterns/mkeyes.dsp
Normal file
@ -0,0 +1,98 @@
|
||||
# Microsoft Developer Studio Project File - Name="mkeyes" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=mkeyes - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mkeyes.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mkeyes.mak" CFG="mkeyes - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "mkeyes - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "mkeyes - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "mkeyes - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /GX /Zi /O2 /I ".." /I "../engine" /I "../sgf" /I "../utils" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /Fd"Release/mkeyes" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "mkeyes - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /W2 /Gm /GX /ZI /Od /I ".." /I "../engine" /I "../sgf" /I "../utils" /D "_DEBUG" /D "HAVE_CONFIG_H" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /Fd"Debug/mkeyes" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "mkeyes - Win32 Release"
|
||||
# Name "mkeyes - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mkeyes.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
154
gnugo/patterns/mkmcpat.c
Normal file
154
gnugo/patterns/mkmcpat.c
Normal file
@ -0,0 +1,154 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/* Compile Monte Carlo local pattern database. This produces mcpat.c. */
|
||||
|
||||
/* See also mc_*.db and engine/montecarlo.c. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "liberty.h"
|
||||
|
||||
/* Trim leading path, a possible mc_ prefix, and a possible .db suffix
|
||||
* from the filename. The caller has to free the returned pointer when
|
||||
* it's no longer needed.
|
||||
*
|
||||
* FIXME: This code is quite ugly and should be possible to clean up.
|
||||
*/
|
||||
static char *
|
||||
copy_and_trim_name(const char *filename)
|
||||
{
|
||||
int name_length = strlen(filename);
|
||||
char *name = malloc(name_length + 1);
|
||||
char *start = name;
|
||||
char *p;
|
||||
char *name2;
|
||||
|
||||
strcpy(name, filename);
|
||||
|
||||
p = strrchr(name, '/');
|
||||
if (p) {
|
||||
p++;
|
||||
name_length -= (p - name);
|
||||
start = p;
|
||||
}
|
||||
|
||||
if (strncmp(start, "mc_", 3) == 0) {
|
||||
start += 3;
|
||||
name_length -= 3;
|
||||
}
|
||||
|
||||
if (strncmp(start + name_length - 3, ".db", 3) == 0)
|
||||
start[name_length - 3] = '\0';
|
||||
|
||||
name2 = malloc(name_length + 1);
|
||||
strcpy(name2, start);
|
||||
free(name);
|
||||
|
||||
return name2;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int N = mc_get_size_of_pattern_values_table();
|
||||
unsigned int *values;
|
||||
int i;
|
||||
int k;
|
||||
char *name;
|
||||
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "Usage: ...\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
printf("\
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\\\n\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *\n\
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *\n\
|
||||
* *\n\
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *\n\
|
||||
* 2008 and 2009 by the Free Software Foundation. *\n\
|
||||
* *\n\
|
||||
* This program is free software; you can redistribute it and/or *\n\
|
||||
* modify it under the terms of the GNU General Public License as *\n\
|
||||
* published by the Free Software Foundation - version 3 *\n\
|
||||
* or (at your option) any later version *\n\
|
||||
* *\n\
|
||||
* This program is distributed in the hope that it will be useful, *\n\
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *\n\
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\n\
|
||||
* GNU General Public License in file COPYING for more details. *\n\
|
||||
* *\n\
|
||||
* You should have received a copy of the GNU General Public *\n\
|
||||
* License along with this program; if not, write to the Free *\n\
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *\n\
|
||||
* Boston, MA 02111, USA. *\n\
|
||||
\\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\n");
|
||||
|
||||
printf("/* This file is automatically generated by mkmcpat. Do not\n");
|
||||
printf(" * edit it directly. Instead, edit the pattern databases\n");
|
||||
printf(" * mc_*.db.\n");
|
||||
printf(" */\n\n");
|
||||
printf("#include <stdio.h> /* for NULL */\n");
|
||||
printf("#include \"liberty.h\"\n\n");
|
||||
printf("#include \"patterns.h\"\n\n");
|
||||
|
||||
values = malloc(N * sizeof(*values));
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (!mc_load_patterns_from_db(argv[i], values))
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
name = copy_and_trim_name(argv[i]);
|
||||
|
||||
printf("static const unsigned int %s_values[] = {\n", name);
|
||||
for (k = 0; k < N; k++) {
|
||||
printf("%u, ", values[k]);
|
||||
if (k % 16 == 15)
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
|
||||
free(name);
|
||||
}
|
||||
|
||||
printf("struct mc_pattern_database mc_pattern_databases[] = {\n");
|
||||
for (i = 1; i < argc; i++) {
|
||||
name = copy_and_trim_name(argv[i]);
|
||||
printf(" {\"%s\", %s_values},\n", name, name);
|
||||
free(name);
|
||||
}
|
||||
printf(" {NULL, NULL}};\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
102
gnugo/patterns/mkmcpat.dsp
Normal file
102
gnugo/patterns/mkmcpat.dsp
Normal file
@ -0,0 +1,102 @@
|
||||
# Microsoft Developer Studio Project File - Name="mkmcpat" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=mkmcpat - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mkmcpat.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mkmcpat.mak" CFG="mkmcpat - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "mkmcpat - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "mkmcpat - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "mkmcpat - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /GX /Zi /O2 /I ".." /I "..\utils" /I "..\engine" /I "..\sgf" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /Fd"Release/mkmcpat" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\utils\Release\utils.lib .\Release\dfa.lib ..\sgf\Release\sgf.lib ..\engine\Release\engine.lib /nologo /subsystem:console /debug /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "mkmcpat - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /W2 /Gm /GX /ZI /Od /I ".." /I "..\utils" /I "..\engine" /I "..\sgf" /D "_DEBUG" /D "HAVE_CONFIG_H" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /Fd"Debug/mkmcpat" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\utils\Debug\utils.lib .\Debug\dfa.lib ..\sgf\Debug\sgf.lib ..\engine\Debug\engine.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "mkmcpat - Win32 Release"
|
||||
# Name "mkmcpat - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mkmcpat.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\engine\liberty.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
3011
gnugo/patterns/mkpat.c
Normal file
3011
gnugo/patterns/mkpat.c
Normal file
File diff suppressed because it is too large
Load Diff
102
gnugo/patterns/mkpat.dsp
Normal file
102
gnugo/patterns/mkpat.dsp
Normal file
@ -0,0 +1,102 @@
|
||||
# Microsoft Developer Studio Project File - Name="mkpat" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=mkpat - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mkpat.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mkpat.mak" CFG="mkpat - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "mkpat - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "mkpat - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "mkpat - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /GX /Zi /O2 /I ".." /I "..\utils" /I "..\engine" /I "..\sgf" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /Fd"Release/mkpat" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 ..\utils\Release\utils.lib .\Release\dfa.lib /nologo /subsystem:console /debug /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "mkpat - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /W2 /Gm /GX /ZI /Od /I ".." /I "..\utils" /I "..\engine" /I "..\sgf" /D "_DEBUG" /D "HAVE_CONFIG_H" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /Fd"Debug/mkpat" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\utils\Debug\utils.lib .\Debug\dfa.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "mkpat - Win32 Release"
|
||||
# Name "mkpat - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mkpat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\transform.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
217
gnugo/patterns/mokuhazushi.db
Normal file
217
gnugo/patterns/mokuhazushi.db
Normal file
@ -0,0 +1,217 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING 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 02111, USA. #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This file is automatically generated by joseki. Do not edit #
|
||||
# it directly. Instead, edit the corresponding sgf file. #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
|
||||
attribute_map general
|
||||
|
||||
Pattern JM1
|
||||
|
||||
-------+
|
||||
.......|
|
||||
.......|
|
||||
..O....|
|
||||
....X..|
|
||||
...*...|
|
||||
.......|
|
||||
.......|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JM2
|
||||
|
||||
-------+
|
||||
.......|
|
||||
.......|
|
||||
..X....|
|
||||
....O..|
|
||||
...X*..|
|
||||
.......|
|
||||
.......|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JM3
|
||||
|
||||
-------+
|
||||
.......|
|
||||
.......|
|
||||
..O....|
|
||||
....X..|
|
||||
...OX..|
|
||||
...*...|
|
||||
.......|
|
||||
.......|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JM4
|
||||
|
||||
-------+
|
||||
.......|
|
||||
.......|
|
||||
..X....|
|
||||
....O..|
|
||||
...XO..|
|
||||
...X...|
|
||||
....*..|
|
||||
.......|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JM5
|
||||
|
||||
-----------+
|
||||
...........|
|
||||
...........|
|
||||
.*....O....|
|
||||
........X..|
|
||||
.......OX..|
|
||||
.......O...|
|
||||
........X..|
|
||||
...........|
|
||||
|
||||
:8,sFU
|
||||
|
||||
|
||||
Pattern JM6
|
||||
|
||||
-------+
|
||||
.......|
|
||||
.......|
|
||||
..O....|
|
||||
....X..|
|
||||
...OX..|
|
||||
...OX..|
|
||||
...*...|
|
||||
.......|
|
||||
.......|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JM7
|
||||
|
||||
------------+
|
||||
............|
|
||||
............|
|
||||
..*....O....|
|
||||
.........X..|
|
||||
........OX..|
|
||||
........OX..|
|
||||
........O...|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JM8
|
||||
|
||||
-----------+
|
||||
...........|
|
||||
...........|
|
||||
.O....O....|
|
||||
........X..|
|
||||
.*.....OX..|
|
||||
.......OX..|
|
||||
.......O...|
|
||||
|
||||
:8,sFj
|
||||
|
||||
|
||||
Pattern JM9
|
||||
|
||||
-------+
|
||||
.......|
|
||||
.......|
|
||||
..O.X..|
|
||||
.......|
|
||||
...*...|
|
||||
.......|
|
||||
.......|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JM10
|
||||
|
||||
---------+
|
||||
.........|
|
||||
.........|
|
||||
....O.X..|
|
||||
.........|
|
||||
.....OX..|
|
||||
.....*...|
|
||||
.........|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JM11
|
||||
|
||||
---------+
|
||||
.........|
|
||||
.........|
|
||||
....O.X..|
|
||||
.........|
|
||||
.....OX..|
|
||||
.....OX..|
|
||||
.....*...|
|
||||
.........|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JM12
|
||||
|
||||
------------+
|
||||
............|
|
||||
............|
|
||||
..*....O.X..|
|
||||
............|
|
||||
........OX..|
|
||||
........OX..|
|
||||
........O...|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JM13
|
||||
|
||||
-----------+
|
||||
...........|
|
||||
...........|
|
||||
.O....O.X..|
|
||||
...........|
|
||||
.*.....OX..|
|
||||
.......OX..|
|
||||
.......O...|
|
||||
|
||||
:8,sFj
|
||||
|
||||
|
38
gnugo/patterns/mokuhazushi.sgf
Normal file
38
gnugo/patterns/mokuhazushi.sgf
Normal file
@ -0,0 +1,38 @@
|
||||
This is GNU Go, a Go program. Contact gnugo@gnu.org, or see
|
||||
http://www.gnu.org/software/gnugo/ for more information.
|
||||
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008 and 2009 by the Free Software Foundation.
|
||||
|
||||
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 - 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 in file COPYING 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 02111, USA.
|
||||
|
||||
(;GM[1]FF[3]
|
||||
SZ[19]HA[0]
|
||||
GN[Mokuhazushi joseki database]
|
||||
;B[oc]
|
||||
(;W[qd];B[pe]MA[mg];W[qe]MA[mg];B[pf]MA[mh]
|
||||
(;W[qg]MA[mh];B[jc]MA[ih]C[U
|
||||
])
|
||||
|
||||
(;W[qf];B[pg]MA[mi];W[qh];B[jc]MA[hg]PL[B];B[je]MA[ig]C[j
|
||||
])
|
||||
)
|
||||
|
||||
(;W[qc];B[pe]MA[mg];W[qe];B[pf]MA[kg];W[qf];B[pg]MA[kh]PL[B];B[jc]
|
||||
MA[hg]PL[B];B[je]MA[ig]C[j
|
||||
])
|
||||
|
||||
)
|
99
gnugo/patterns/oracle.db
Normal file
99
gnugo/patterns/oracle.db
Normal file
@ -0,0 +1,99 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING #
|
||||
# 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 02111, USA #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
# This database is included as an example only to show how
|
||||
# a pattern matcher can be used with the oracle, in oracle.c.
|
||||
# It doesn't do much.
|
||||
|
||||
# Nadare joseki variations
|
||||
|
||||
|
||||
attribute_map value_only
|
||||
|
||||
|
||||
Pattern O1
|
||||
|
||||
+-------
|
||||
|.......
|
||||
|.......
|
||||
|...*O..
|
||||
|..OXX..
|
||||
|.......
|
||||
|
||||
:8,-,value(10)
|
||||
|
||||
|
||||
Pattern O2
|
||||
|
||||
+-------
|
||||
|.......
|
||||
|.......
|
||||
|...XX..
|
||||
|..XOO..
|
||||
|..*....
|
||||
|.......
|
||||
|
||||
:8,-,value(10)
|
||||
|
||||
|
||||
Pattern O3
|
||||
|
||||
+-------
|
||||
|.......
|
||||
|.......
|
||||
|...OO..
|
||||
|..OXX*.
|
||||
|..X....
|
||||
|.......
|
||||
|.......
|
||||
|
||||
:8,-,value(10)
|
||||
|
||||
+-------
|
||||
|.......
|
||||
|..c....
|
||||
|..aOOg.
|
||||
|.bOHH*.
|
||||
|.dX....
|
||||
|.fe....
|
||||
|.......
|
||||
|
||||
; oplay_attack(*,a,b,c,d,e,f,g,H)
|
||||
|
||||
|
||||
Pattern O4
|
||||
|
||||
+-------
|
||||
|.......
|
||||
|.......
|
||||
|...OO*.
|
||||
|..OXX..
|
||||
|..X....
|
||||
|.......
|
||||
|.......
|
||||
|
||||
:8,-,value(10)
|
||||
|
||||
|
||||
# END OF FILE
|
6320
gnugo/patterns/owl_attackpats.db
Normal file
6320
gnugo/patterns/owl_attackpats.db
Normal file
File diff suppressed because it is too large
Load Diff
350
gnugo/patterns/owl_attackpats.dtr
Normal file
350
gnugo/patterns/owl_attackpats.dtr
Normal file
@ -0,0 +1,350 @@
|
||||
A1 0
|
||||
A2 0
|
||||
A3 1
|
||||
A101 5
|
||||
A102 0
|
||||
A103 7
|
||||
A104 7
|
||||
A105 7
|
||||
A106 7
|
||||
A107 6
|
||||
A108 0
|
||||
A109 1
|
||||
A110 0
|
||||
A111 6
|
||||
A112 1
|
||||
A113 4
|
||||
A114 0
|
||||
A115 0
|
||||
A201 7
|
||||
A203 7
|
||||
A204 0
|
||||
A205 7
|
||||
A205b 0
|
||||
A206 7
|
||||
A206b 0
|
||||
A207 0
|
||||
A207b 7
|
||||
A207c 7
|
||||
A207d 7
|
||||
A208a 4
|
||||
A208b 3
|
||||
A208c 6
|
||||
A209 0
|
||||
A210 0
|
||||
A211 0
|
||||
A214 1
|
||||
A215 1
|
||||
A216 0
|
||||
A216b 0
|
||||
A217 0
|
||||
A217b 0
|
||||
A217c 0
|
||||
A218 0
|
||||
A219 0
|
||||
A220 0
|
||||
A221 0
|
||||
A222 0
|
||||
A223 0
|
||||
A224 0
|
||||
A225 0
|
||||
A226 0
|
||||
A227 3
|
||||
A227b 7
|
||||
A228 3
|
||||
A229 7
|
||||
A229b 3
|
||||
A229c 3
|
||||
A229d 3
|
||||
A230 0
|
||||
A231 6
|
||||
A232 0
|
||||
A233 7
|
||||
A234 1
|
||||
A235 5
|
||||
A236 0
|
||||
A237 0
|
||||
A238 6
|
||||
A301 0
|
||||
A302 0
|
||||
A305 0
|
||||
A401 5
|
||||
A401a 5
|
||||
A402 5
|
||||
A403 1
|
||||
A403b 1
|
||||
A404 1
|
||||
A406 3
|
||||
A406b 3
|
||||
A406c 4
|
||||
A407 2
|
||||
A408 4
|
||||
A409 6
|
||||
A410 0
|
||||
A411 4
|
||||
A411a 4
|
||||
A413a 3
|
||||
A414 2
|
||||
A414a 2
|
||||
A415 3
|
||||
A416 6
|
||||
A417 0
|
||||
A418 0
|
||||
A419 6
|
||||
A419b 6
|
||||
A420 0
|
||||
A421 3
|
||||
A422 0
|
||||
A422a 0
|
||||
A423 1
|
||||
A423a 1
|
||||
A424 7
|
||||
A501 7
|
||||
A502 6
|
||||
A503 0
|
||||
A504 0
|
||||
A505 0
|
||||
A506 6
|
||||
A507 1
|
||||
A508 7
|
||||
A509 1
|
||||
A510 3
|
||||
A511 0
|
||||
A512 3
|
||||
A513 0
|
||||
A514 6
|
||||
A515 7
|
||||
A516 0
|
||||
A517 0
|
||||
A601 1
|
||||
A602 1
|
||||
A603 0
|
||||
A603b 0
|
||||
A604 7
|
||||
A605 7
|
||||
A606 0
|
||||
A607 7
|
||||
A607b 7
|
||||
A608 7
|
||||
A609 0
|
||||
A610 7
|
||||
A611 0
|
||||
A612 0
|
||||
A613 3
|
||||
A614 3
|
||||
A615 0
|
||||
A616 6
|
||||
A617 0
|
||||
A618 3
|
||||
A619 3
|
||||
A620 0
|
||||
A621 7
|
||||
A701 4
|
||||
A702 4
|
||||
A703 6
|
||||
A704 1
|
||||
A705b 1
|
||||
A706 6
|
||||
A707 6
|
||||
A708 0
|
||||
A709 1
|
||||
A710 0
|
||||
A711 6
|
||||
A712 0
|
||||
A713 6
|
||||
A714 6
|
||||
A715 0
|
||||
A716 6
|
||||
A717 7
|
||||
A718 7
|
||||
A719 0
|
||||
A720 7
|
||||
A721 0
|
||||
A801 0
|
||||
A802 1
|
||||
A803 0
|
||||
A804 0
|
||||
A805 0
|
||||
A806 0
|
||||
A807 0
|
||||
A808 7
|
||||
A809 6
|
||||
A810 1
|
||||
A811 1
|
||||
A812 2
|
||||
A901 3
|
||||
A902 0
|
||||
A902b 0
|
||||
A903 0
|
||||
A904 3
|
||||
A905 1
|
||||
A907 0
|
||||
A908 0
|
||||
A909 7
|
||||
A910 0
|
||||
A911 0
|
||||
A912 7
|
||||
A913 6
|
||||
A914 6
|
||||
A915 0
|
||||
A916 0
|
||||
A917 3
|
||||
A918 7
|
||||
A919 0
|
||||
A920 7
|
||||
A1001 0
|
||||
A1001b 0
|
||||
A1002 3
|
||||
A1003 3
|
||||
A1005 3
|
||||
A1005b 3
|
||||
A1006 7
|
||||
A1006b 7
|
||||
A1008 2
|
||||
A1008b 6
|
||||
A1009 6
|
||||
A1010 3
|
||||
A1011 7
|
||||
A1012 0
|
||||
A1013 6
|
||||
A1014 7
|
||||
A1015 6
|
||||
A1015a 6
|
||||
A1016 7
|
||||
A1016a 7
|
||||
A1017 1
|
||||
A1018 0
|
||||
A1019 1
|
||||
A1020 2
|
||||
A1021 6
|
||||
A1022 2
|
||||
A1023 7
|
||||
A1100 0
|
||||
A1101 1
|
||||
A1101b 1
|
||||
A1101c 2
|
||||
A1102 1
|
||||
A1104 4
|
||||
A1105 0
|
||||
A1106 0
|
||||
A1107 1
|
||||
A1107b 1
|
||||
A1107c 1
|
||||
A1108 0
|
||||
A1109 7
|
||||
A1110 0
|
||||
A1111 6
|
||||
A1112 6
|
||||
A1113 2
|
||||
A1114 3
|
||||
A1115 6
|
||||
A1116 0
|
||||
A1117 2
|
||||
A1117a 2
|
||||
A1118 0
|
||||
A1119 6
|
||||
A1121 1
|
||||
A1122 0
|
||||
A1122a 0
|
||||
A1123 7
|
||||
A1123a 7
|
||||
A1124 7
|
||||
A1124a 7
|
||||
A1125 1
|
||||
A1126 2
|
||||
A1127 2
|
||||
A1127a 2
|
||||
A1128 7
|
||||
A1129 6
|
||||
A1130 3
|
||||
A1131 6
|
||||
A1132 0
|
||||
A1133a 0
|
||||
A1133b 0
|
||||
A1201 0
|
||||
A1203 2
|
||||
A1204 5
|
||||
A1205 1
|
||||
A1206 1
|
||||
A1207 3
|
||||
A1208 6
|
||||
A1209 0
|
||||
A1301 0
|
||||
A1302 3
|
||||
A1303 4
|
||||
A1303b 7
|
||||
A1304 7
|
||||
A1305 0
|
||||
A1305b 7
|
||||
A1306 0
|
||||
A1307 0
|
||||
A1308 7
|
||||
A1309 7
|
||||
A1310 0
|
||||
A1310b 0
|
||||
A1311 6
|
||||
A1311b 6
|
||||
A1312 7
|
||||
A1313 6
|
||||
A1314 7
|
||||
A1315 0
|
||||
A1316 0
|
||||
A1317 7
|
||||
A1318 0
|
||||
A1319 7
|
||||
A1319b 0
|
||||
A1319c 7
|
||||
A1320 3
|
||||
A1321 0
|
||||
A1322 4
|
||||
A1323 0
|
||||
A1324 7
|
||||
A1325 0
|
||||
A1326 2
|
||||
A1327 0
|
||||
A1328 7
|
||||
A1329 7
|
||||
A1330 0
|
||||
A1331 3
|
||||
A1332 7
|
||||
A1333 7
|
||||
A1334 7
|
||||
A1335 7
|
||||
A1335b 0
|
||||
A1336 0
|
||||
A1337 0
|
||||
A1338 6
|
||||
A1339 0
|
||||
A1340 7
|
||||
A1341 0
|
||||
A1342 3
|
||||
A1343 3
|
||||
A1344 0
|
||||
A1345 3
|
||||
A1346 3
|
||||
A1347 7
|
||||
A1348 0
|
||||
A1349a 0
|
||||
A1349b 0
|
||||
A1350 7
|
||||
A1401 0
|
||||
A1403 7
|
||||
A1501 1
|
||||
A1502 1
|
||||
A1503 5
|
||||
A1503a 5
|
||||
A1504 6
|
||||
A1601 6
|
||||
A1602 3
|
||||
A1603 7
|
||||
A1604 0
|
||||
A1605 0
|
||||
A1606 3
|
||||
A1607 7
|
||||
A1608 3
|
||||
A1608b 0
|
||||
A1609 0
|
||||
A1610 0
|
||||
A1611 0
|
||||
A1612 0
|
||||
A1613 0
|
7642
gnugo/patterns/owl_defendpats.db
Normal file
7642
gnugo/patterns/owl_defendpats.db
Normal file
File diff suppressed because it is too large
Load Diff
448
gnugo/patterns/owl_defendpats.dtr
Normal file
448
gnugo/patterns/owl_defendpats.dtr
Normal file
@ -0,0 +1,448 @@
|
||||
D1 5
|
||||
D2 7
|
||||
D3 7
|
||||
D4 1
|
||||
D100 0
|
||||
D101 4
|
||||
D102 0
|
||||
D103 0
|
||||
D104 0
|
||||
D104b 0
|
||||
D105 5
|
||||
D106 7
|
||||
D107 0
|
||||
D108 0
|
||||
D109 0
|
||||
D110 0
|
||||
D111 7
|
||||
D112 0
|
||||
D113 7
|
||||
D114 6
|
||||
D115 0
|
||||
D116 3
|
||||
D117 0
|
||||
D118 7
|
||||
D119 7
|
||||
D120 0
|
||||
D121 7
|
||||
D122 0
|
||||
D123 6
|
||||
D124 7
|
||||
D200 0
|
||||
D201 0
|
||||
D202 0
|
||||
D203 0
|
||||
D204 6
|
||||
D205 0
|
||||
D206 0
|
||||
D207 0
|
||||
D208 6
|
||||
D209 0
|
||||
D209a 0
|
||||
D209b 0
|
||||
D210 0
|
||||
D211 4
|
||||
D212 0
|
||||
D213 6
|
||||
D214 0
|
||||
D215 0
|
||||
D216 7
|
||||
D217 0
|
||||
D217a 0
|
||||
D217b 0
|
||||
D217c 0
|
||||
D218 0
|
||||
D220 0
|
||||
D221 0
|
||||
D222 0
|
||||
D223 7
|
||||
D224 6
|
||||
D225 7
|
||||
D226 6
|
||||
D227 7
|
||||
D228 0
|
||||
D229 3
|
||||
D230 7
|
||||
D231 4
|
||||
D232 0
|
||||
D233 0
|
||||
D300 1
|
||||
D301 6
|
||||
D302 7
|
||||
D303 6
|
||||
D304 6
|
||||
D305 7
|
||||
D306 6
|
||||
D307 7
|
||||
D308 3
|
||||
D309 6
|
||||
D309a 6
|
||||
D309b 6
|
||||
D310a 0
|
||||
D310b 0
|
||||
D311 0
|
||||
D313 3
|
||||
D314 7
|
||||
D315 1
|
||||
D316 6
|
||||
D317 6
|
||||
D318 6
|
||||
D319 7
|
||||
D320 2
|
||||
D400 1
|
||||
D401 1
|
||||
D402 6
|
||||
D403 5
|
||||
D404 6
|
||||
D405 7
|
||||
D406 0
|
||||
D407 0
|
||||
D408 0
|
||||
D409 0
|
||||
D500 0
|
||||
D502 0
|
||||
D503 3
|
||||
D504 1
|
||||
D505 0
|
||||
D506 0
|
||||
D507 0
|
||||
D508 0
|
||||
D509 7
|
||||
D510 6
|
||||
D511 7
|
||||
D512 0
|
||||
D513 0
|
||||
D514 6
|
||||
D515 0
|
||||
D600 2
|
||||
D600a 2
|
||||
D602 1
|
||||
D603 1
|
||||
D604 0
|
||||
D604a 0
|
||||
D605 7
|
||||
D606 1
|
||||
D607 7
|
||||
D608 0
|
||||
D608b 6
|
||||
D609 6
|
||||
D610 0
|
||||
D611 6
|
||||
D612 7
|
||||
D613 3
|
||||
D614 0
|
||||
D614b 0
|
||||
D615 3
|
||||
D616 2
|
||||
D616a 0
|
||||
D617 2
|
||||
D618 2
|
||||
D619 2
|
||||
D620 7
|
||||
D621 0
|
||||
D622 0
|
||||
D623 0
|
||||
D624 7
|
||||
D625 7
|
||||
D626 0
|
||||
D627 0
|
||||
D628 0
|
||||
D629 7
|
||||
D630 5
|
||||
D631 6
|
||||
D632 0
|
||||
D633 3
|
||||
D634 7
|
||||
D635 7
|
||||
D636 7
|
||||
D637 2
|
||||
D638 7
|
||||
D639 0
|
||||
D640 7
|
||||
D641 0
|
||||
D642 7
|
||||
D643 6
|
||||
D700 1
|
||||
D701 6
|
||||
D702 6
|
||||
D703 0
|
||||
D704 1
|
||||
D704b 7
|
||||
D705 0
|
||||
D706 0
|
||||
D707 0
|
||||
D708 4
|
||||
D709 1
|
||||
D710 1
|
||||
D711 0
|
||||
D712 1
|
||||
D713 0
|
||||
D714 7
|
||||
D715 1
|
||||
D715b 7
|
||||
D715c 6
|
||||
D716 6
|
||||
D717 1
|
||||
D718 6
|
||||
D720 7
|
||||
D721 3
|
||||
D722 4
|
||||
D800 0
|
||||
D801 0
|
||||
D802 0
|
||||
D803 6
|
||||
D804 0
|
||||
D804b 0
|
||||
D805 0
|
||||
D805a 6
|
||||
D805b 7
|
||||
D806 0
|
||||
D807 0
|
||||
D808 0
|
||||
D809 0
|
||||
D810 7
|
||||
D811 7
|
||||
D811a 3
|
||||
D812 0
|
||||
D813 7
|
||||
D814 7
|
||||
D815 7
|
||||
D816 3
|
||||
D817 3
|
||||
D818 0
|
||||
D818b 0
|
||||
D819 3
|
||||
D820 0
|
||||
D820b 0
|
||||
D821 7
|
||||
D822 7
|
||||
D823a 5
|
||||
D823b 0
|
||||
D824 0
|
||||
D825 7
|
||||
D826 3
|
||||
D827 0
|
||||
D828 5
|
||||
D829 7
|
||||
D830 3
|
||||
D831 0
|
||||
D832 7
|
||||
D833 0
|
||||
D834 0
|
||||
D835 7
|
||||
D836 0
|
||||
D837 0
|
||||
D838 7
|
||||
D839 0
|
||||
D900 7
|
||||
D902 7
|
||||
D903 7
|
||||
D904 0
|
||||
D905 0
|
||||
D906 3
|
||||
D907 3
|
||||
D908 3
|
||||
D909 1
|
||||
D910a 6
|
||||
D910b 6
|
||||
D911 0
|
||||
D1000 0
|
||||
D1000a 1
|
||||
D1001 5
|
||||
D1001b 0
|
||||
D1002 5
|
||||
D1003 1
|
||||
D1004 1
|
||||
D1004b 1
|
||||
D1005 7
|
||||
D1006 0
|
||||
D1006b 0
|
||||
D1007 0
|
||||
D1100 0
|
||||
D1101 1
|
||||
D1102 1
|
||||
D1102a 1
|
||||
D1103 0
|
||||
D1104 6
|
||||
D1105 0
|
||||
D1106 1
|
||||
D1107 0
|
||||
D1108 7
|
||||
D1108b 7
|
||||
D1109 6
|
||||
D1110 1
|
||||
D1111 6
|
||||
D1112 6
|
||||
D1113 4
|
||||
D1114 4
|
||||
D1115 6
|
||||
D1116 3
|
||||
D1117 3
|
||||
D1117a 0
|
||||
D1118 1
|
||||
D1119 5
|
||||
D1120 2
|
||||
D1120b 0
|
||||
D1121a 5
|
||||
D1121b 0
|
||||
D1121c 6
|
||||
D1122 0
|
||||
D1123 0
|
||||
D1124 7
|
||||
D1125 3
|
||||
D1126 1
|
||||
D1127 5
|
||||
D1128 3
|
||||
D1129 1
|
||||
D1130 0
|
||||
D1131 6
|
||||
D1132 6
|
||||
D1133 0
|
||||
D1134 5
|
||||
D1135 6
|
||||
D1136 1
|
||||
D1137 6
|
||||
D1138 0
|
||||
D1139 6
|
||||
D1140 0
|
||||
D1141 2
|
||||
D1200 0
|
||||
D1201 0
|
||||
D1202 1
|
||||
D1203 7
|
||||
D1204 7
|
||||
D1205 1
|
||||
D1206 1
|
||||
D1300 0
|
||||
D1300b 0
|
||||
D1301 0
|
||||
D1301b 0
|
||||
D1302 0
|
||||
D1303 0
|
||||
D1304 0
|
||||
D1305 3
|
||||
D1306 7
|
||||
D1307 4
|
||||
D1308 0
|
||||
D1309 0
|
||||
D1309b 0
|
||||
D1310 0
|
||||
D1311 1
|
||||
D1312 2
|
||||
D1313 1
|
||||
D1314 3
|
||||
D1315 6
|
||||
D1316 6
|
||||
D1316b 6
|
||||
D1317 3
|
||||
D1318 4
|
||||
D1319 5
|
||||
D1320 1
|
||||
D1320a 6
|
||||
D1320b 1
|
||||
D1321 1
|
||||
D1321b 1
|
||||
D1322 1
|
||||
D1323 1
|
||||
D1323a 6
|
||||
D1324 1
|
||||
D1325 1
|
||||
D1326 1
|
||||
D1327 1
|
||||
D1328 1
|
||||
D1329 1
|
||||
D1330 0
|
||||
D1331 6
|
||||
D1332 0
|
||||
D1333 0
|
||||
D1333b 7
|
||||
D1334 2
|
||||
D1335 1
|
||||
D1336 5
|
||||
D1337 0
|
||||
D1338 3
|
||||
D1339 1
|
||||
D1340 0
|
||||
D1341 0
|
||||
D1342 2
|
||||
D1343a 3
|
||||
D1343b 5
|
||||
D1343c 3
|
||||
D1343d 3
|
||||
D1344 6
|
||||
D1345 0
|
||||
D1346 0
|
||||
D1347 0
|
||||
D1348 6
|
||||
D1348b 6
|
||||
D1348c 6
|
||||
D1348d 6
|
||||
D1350 1
|
||||
D1351 7
|
||||
D1352 6
|
||||
D1353 6
|
||||
D1354 4
|
||||
D1355 0
|
||||
D1356 1
|
||||
D1356a 1
|
||||
D1357 5
|
||||
D1358 0
|
||||
D1359 7
|
||||
D1360 0
|
||||
D1361 1
|
||||
D1362 0
|
||||
D1363 6
|
||||
D1364 0
|
||||
D1365 7
|
||||
D1366 1
|
||||
D1367 1
|
||||
D1368 0
|
||||
D1370 3
|
||||
D1371 0
|
||||
D1372 7
|
||||
D1373 3
|
||||
D1374 0
|
||||
D1375 7
|
||||
D1376 7
|
||||
D1377 7
|
||||
D1378 2
|
||||
D1379 6
|
||||
D1380 1
|
||||
D1381 2
|
||||
D1382 4
|
||||
D1383 0
|
||||
D1384 6
|
||||
D1385 6
|
||||
D1386a 0
|
||||
D1386b 0
|
||||
D1387 0
|
||||
D1388 0
|
||||
D1389 0
|
||||
D1400 7
|
||||
D1400b 7
|
||||
D1401 7
|
||||
D1402 0
|
||||
D1403 7
|
||||
D1404 3
|
||||
D1405 3
|
||||
D1405b 3
|
||||
D1406 3
|
||||
D1407 7
|
||||
D1408 7
|
||||
D1409 7
|
||||
D1410 6
|
||||
D1411 7
|
||||
D1411b 7
|
||||
D1412 7
|
||||
D1413 7
|
||||
D1414 3
|
||||
D1415 1
|
||||
D1416 1
|
||||
D1417 1
|
||||
D1418 1
|
||||
D1419 2
|
||||
D1420 2
|
||||
D1421 7
|
||||
D1422 0
|
||||
D1423 7
|
||||
D1424 4
|
1020
gnugo/patterns/owl_vital_apats.db
Normal file
1020
gnugo/patterns/owl_vital_apats.db
Normal file
File diff suppressed because it is too large
Load Diff
55
gnugo/patterns/owl_vital_apats.dtr
Normal file
55
gnugo/patterns/owl_vital_apats.dtr
Normal file
@ -0,0 +1,55 @@
|
||||
VA1 1
|
||||
VA2 6
|
||||
VA3 7
|
||||
VA4 0
|
||||
VA5 3
|
||||
VA6 7
|
||||
VA7 5
|
||||
VA8 1
|
||||
VA9 1
|
||||
VA10 1
|
||||
VA11 0
|
||||
VA12 7
|
||||
VA13 7
|
||||
VA14 0
|
||||
VA15 6
|
||||
VA16 4
|
||||
VA17 1
|
||||
VA18 3
|
||||
VA19 0
|
||||
VA20 0
|
||||
VA21 0
|
||||
VA22 3
|
||||
VA23 7
|
||||
VA24 1
|
||||
VA25 7
|
||||
VA26 0
|
||||
VA26b 0
|
||||
VA27 0
|
||||
VA28 0
|
||||
VA29 7
|
||||
VA30 6
|
||||
VA31 1
|
||||
VA32 0
|
||||
VA33 6
|
||||
VA34 0
|
||||
VA35 0
|
||||
VA36 1
|
||||
VA37 0
|
||||
VA38 3
|
||||
VA39 6
|
||||
VA40 1
|
||||
VA41 0
|
||||
VA42 7
|
||||
VA43 0
|
||||
VA44 1
|
||||
VA45 0
|
||||
VA46 0
|
||||
VA47 0
|
||||
VA48 2
|
||||
VA49 0
|
||||
VA50 0
|
||||
VA51 0
|
||||
VA52a 0
|
||||
VA52b 0
|
||||
VA53 7
|
15118
gnugo/patterns/patterns.db
Normal file
15118
gnugo/patterns/patterns.db
Normal file
File diff suppressed because it is too large
Load Diff
1058
gnugo/patterns/patterns.dsp
Normal file
1058
gnugo/patterns/patterns.dsp
Normal file
File diff suppressed because it is too large
Load Diff
424
gnugo/patterns/patterns.h
Normal file
424
gnugo/patterns/patterns.h
Normal file
@ -0,0 +1,424 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/* This file describes the compiled form of the pattern database.
|
||||
* mkpat is used to compile various source files <name>.db into
|
||||
* intermediate files <name>.c which define data structures
|
||||
* describing the patterns.
|
||||
*/
|
||||
|
||||
#ifndef _PATTERN_H_
|
||||
#define _PATTERN_H_
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
/* local versions of absolute value, min and max */
|
||||
|
||||
#define gg_abs(x) ((x) < 0 ? -(x) : (x))
|
||||
#define gg_min(a, b) ((a)<(b) ? (a) : (b))
|
||||
#define gg_max(a, b) ((a)<(b) ? (b) : (a))
|
||||
|
||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||
* Ditto for AIX 3.2 and <stdlib.h>.
|
||||
*/
|
||||
#ifndef _NO_PROTO
|
||||
#define _NO_PROTO
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#else
|
||||
#define GRID_OPT 0
|
||||
#endif
|
||||
|
||||
#ifndef GRID_OPT
|
||||
#error GRID_OPT should be defined as 0, 1 or 2
|
||||
#endif
|
||||
|
||||
|
||||
/* Include support for pattern profiling. May be turned off in stable
|
||||
* releases to save some memory.
|
||||
*
|
||||
* FIXME: should probably be included in config.h
|
||||
*/
|
||||
#define PROFILE_PATTERNS 0
|
||||
|
||||
/* this trick forces a compile error if ints are not at least 32-bit */
|
||||
struct _unused_patterns_h {
|
||||
int unused[sizeof(unsigned int) >= 4 ? 1 : -1];
|
||||
};
|
||||
|
||||
|
||||
#define ATTACK_MACRO(pos) ((stackp == 0) ? (worm[pos].attack_codes[0]) : attack(pos, NULL))
|
||||
#define DEFEND_MACRO(pos) ((stackp == 0) ? (worm[pos].defense_codes[0]) : find_defense(pos, NULL))
|
||||
|
||||
struct pattern; /* forward reference to keep gcc happy */
|
||||
|
||||
/* this is the type of a function which the matcher can
|
||||
* call to evaluate the score of a move.
|
||||
* parameters:
|
||||
* pattern and rotation are the current pattern being considered
|
||||
* ti, tj: IN = posn of the 7, 8 or 9 marker
|
||||
* OUT = recommended move
|
||||
* return value : weight of move, or 0 if match failed
|
||||
*/
|
||||
|
||||
typedef int (*pattern_helper_fn_ptr)(struct pattern *, int rotation,
|
||||
int move, int color);
|
||||
|
||||
typedef int (*autohelper_fn_ptr)(int rotation, int move,
|
||||
int color, int action);
|
||||
|
||||
|
||||
/* each pattern is compiled into a sequence of these elements.
|
||||
* Each describes a relative x, y from the pattern origin,
|
||||
* and a description of what should be there.
|
||||
* Current attributes are
|
||||
* 0 = .
|
||||
* 1 = X
|
||||
* 2 = O
|
||||
* 3 = x
|
||||
* 4 = o
|
||||
* 5 = , (barriers only)
|
||||
* 6 = a (half-eye only, OBSOLETE)
|
||||
* 7 = ! (connection and barriers only)
|
||||
*/
|
||||
|
||||
#define ATT_dot 0
|
||||
#define ATT_X 1
|
||||
#define ATT_O 2
|
||||
#define ATT_x 3
|
||||
#define ATT_o 4
|
||||
#define ATT_comma 5
|
||||
#define ATT_a 6
|
||||
#define ATT_not 7
|
||||
|
||||
/* Pattern classes. The semantics of these varies between different
|
||||
* databases. The descriptions here mostly relate to patterns in
|
||||
* patterns.db and other databases which are handled by shapes.c.
|
||||
*/
|
||||
#define CLASS_O 0x0001 /* O stones must be alive or unknown */
|
||||
#define CLASS_o 0x0002 /* O stones must be dead or unknown */
|
||||
#define CLASS_X 0x0004 /* X stones must be alive or unknown */
|
||||
#define CLASS_x 0x0008 /* X stones must be dead or unknown */
|
||||
#define CLASS_s 0x0010 /* move is a sacrifice */
|
||||
#define CLASS_n 0x0020 /* X could also make this move if we do not */
|
||||
#define CLASS_D 0x0040 /* defense pattern */
|
||||
#define CLASS_C 0x0080 /* move connects two worms */
|
||||
#define CLASS_c 0x0100 /* move weakly connects two worms */
|
||||
/* for owl databases: combinable pattern */
|
||||
#define CLASS_B 0x0200 /* move breaks connection between enemy worms */
|
||||
#define CLASS_A 0x0400 /* attack pattern */
|
||||
#define CLASS_b 0x0800 /* move is intended to block opponent */
|
||||
#define CLASS_e 0x1000 /* move is intended to expand territory */
|
||||
#define CLASS_E 0x2000 /* move is intended to expand moyo */
|
||||
#define CLASS_a 0x4000 /* strategical level attack */
|
||||
#define CLASS_d 0x8000 /* strategical level defense */
|
||||
#define CLASS_I 0x00010000 /* invasions patterns (influence.db) */
|
||||
#define CLASS_J 0x00020000 /* joseki standard move */
|
||||
#define CLASS_j 0x00040000 /* joseki move, slightly less urgent */
|
||||
#define CLASS_t 0x00080000 /* minor joseki move (tenuki OK) */
|
||||
#define CLASS_U 0x00100000 /* very urgent joseki move */
|
||||
#define CLASS_T 0x00200000 /* joseki trick move */
|
||||
#define CLASS_W 0x00400000 /* worthwhile threat move */
|
||||
#define CLASS_F 0x00800000 /* for joseki moves: a fuseki pattern */
|
||||
#define CLASS_N 0x01000000 /* antisuji move (do _not_ play) */
|
||||
#define CLASS_Y 0x80000000 /* used for experimental patterns */
|
||||
|
||||
/* Collection of the classes inducing move reasons. */
|
||||
#define CLASS_MOVE_REASONS (CLASS_C | CLASS_B | CLASS_b | \
|
||||
CLASS_e | CLASS_E | CLASS_I | CLASS_a | CLASS_d | \
|
||||
CLASS_J | CLASS_j | CLASS_U | CLASS_T | CLASS_t | \
|
||||
CLASS_W | CLASS_c | CLASS_F)
|
||||
|
||||
/* directions for applying edge-constraints */
|
||||
#define NORTH_EDGE 1
|
||||
#define SOUTH_EDGE 2
|
||||
#define EAST_EDGE 4
|
||||
#define WEST_EDGE 8
|
||||
|
||||
/* different kinds of autohelpers */
|
||||
#define HAVE_CONSTRAINT 1
|
||||
#define HAVE_ACTION 2
|
||||
|
||||
/* Values of the action parameter to indicate where an influence autohelper
|
||||
* is called from.
|
||||
*/
|
||||
#define INFLUENCE_CALLBACK 1
|
||||
#define FOLLOWUP_INFLUENCE_CALLBACK 2
|
||||
|
||||
|
||||
typedef struct patval {
|
||||
short offset;
|
||||
unsigned char att;
|
||||
} Patval;
|
||||
|
||||
/* Build-time version of patval structure. */
|
||||
typedef struct patval_b {
|
||||
int x;
|
||||
int y;
|
||||
int att;
|
||||
} Patval_b;
|
||||
|
||||
|
||||
enum attribute_type {
|
||||
MIN_VALUE,
|
||||
MAX_VALUE,
|
||||
MIN_TERRITORY,
|
||||
MAX_TERRITORY,
|
||||
SHAPE,
|
||||
FOLLOWUP,
|
||||
REVERSE_FOLLOWUP,
|
||||
|
||||
/* For `mkpat'. */
|
||||
FIRST_OFFSET_ATTRIBUTE,
|
||||
|
||||
THREATENS_TO_CAPTURE = FIRST_OFFSET_ATTRIBUTE,
|
||||
THREATENS_EYE,
|
||||
REVERSE_SENTE,
|
||||
|
||||
NUM_ATTRIBUTES,
|
||||
LAST_ATTRIBUTE = NUM_ATTRIBUTES
|
||||
};
|
||||
|
||||
|
||||
#ifdef HAVE_TRANSPARENT_UNIONS
|
||||
|
||||
struct pattern_attribute {
|
||||
enum attribute_type type;
|
||||
|
||||
/* GCC allows unnamed (and transparent) unions. */
|
||||
union {
|
||||
float value;
|
||||
int offset;
|
||||
};
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
struct pattern_attribute {
|
||||
enum attribute_type type;
|
||||
float value;
|
||||
int offset;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Each pattern as a whole is compiled to an instance of this structure.
|
||||
*/
|
||||
struct pattern {
|
||||
struct patval *patn; /* array of elements */
|
||||
int patlen; /* number of elements */
|
||||
int trfno; /* number of transformations (rotations and reflections) */
|
||||
const char *name; /* short description of pattern (optional) */
|
||||
|
||||
int mini, minj; /* min and max (relative to anchor) extent of ... */
|
||||
int maxi, maxj; /* ...the pattern */
|
||||
int height, width; /* differences between max and min extents */
|
||||
unsigned int edge_constraints; /* and combinations of NORTH, EAST etc.
|
||||
* for edges */
|
||||
|
||||
int move_offset; /* offset of the suggested move (relative to anchor) */
|
||||
|
||||
#if GRID_OPT
|
||||
unsigned int and_mask[8]; /* for each rotation, masks for a */
|
||||
unsigned int val_mask[8]; /* 4x4 grid around anchor */
|
||||
#endif
|
||||
|
||||
unsigned int class; /* classification of pattern */
|
||||
|
||||
/* Value (owl-style, used for pattern sorting) is not stored as an
|
||||
* attribute, because it is very common.
|
||||
*/
|
||||
float value;
|
||||
|
||||
/* Pattern attributes like shape, followup etc. */
|
||||
struct pattern_attribute *attributes;
|
||||
|
||||
int autohelper_flag; /* whether autohelper has constraint and/or action */
|
||||
pattern_helper_fn_ptr helper; /* helper function, or NULL */
|
||||
autohelper_fn_ptr autohelper; /* automatically generated helper */
|
||||
/* function, or NULL */
|
||||
|
||||
int anchored_at_X; /* 3 if the pattern has 'X' at the anchor posn */
|
||||
|
||||
float constraint_cost; /* mkpat's estimate of the constraint complexity.*/
|
||||
|
||||
#if PROFILE_PATTERNS
|
||||
int hits;
|
||||
int dfa_hits;
|
||||
int reading_nodes;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
struct pattern_db {
|
||||
int fixed_for_size;
|
||||
const int fixed_anchor;
|
||||
struct pattern *patterns;
|
||||
struct dfa_rt *pdfa;
|
||||
};
|
||||
|
||||
|
||||
struct fullboard_pattern {
|
||||
Hash_data fullboard_hash; /* Hash of the full board position. */
|
||||
int number_of_stones; /* Number of stones on board. */
|
||||
const char *name; /* Pattern identifier. */
|
||||
int move_offset; /* position of the move relative to tengen */
|
||||
int value; /* value for pattern, if matched */
|
||||
};
|
||||
|
||||
|
||||
/* Monte Carlo local patterns. */
|
||||
struct mc_pattern_database {
|
||||
const char *name;
|
||||
const unsigned int *values;
|
||||
};
|
||||
|
||||
|
||||
/* helper functions */
|
||||
|
||||
#define DECLARE(x) int x(struct pattern *pattern, int transformation, int move, int color)
|
||||
|
||||
DECLARE(jump_out_helper);
|
||||
DECLARE(jump_out_far_helper);
|
||||
DECLARE(high_handicap_helper);
|
||||
DECLARE(reinforce_helper);
|
||||
DECLARE(throw_in_atari_helper);
|
||||
DECLARE(cutstone2_helper);
|
||||
DECLARE(thrash_around_helper);
|
||||
|
||||
/* autohelper fns */
|
||||
int seki_helper(int str);
|
||||
void threaten_to_save_helper(int move, int str);
|
||||
void threaten_to_capture_helper(int move, int str);
|
||||
void prevent_attack_threat_helper(int move, int str);
|
||||
void defend_against_atari_helper(int move, int str);
|
||||
void amalgamate_most_valuable_helper(int apos, int bpos, int cpos);
|
||||
int finish_ko_helper(int apos);
|
||||
int squeeze_ko_helper(int apos);
|
||||
int backfill_helper(int apos, int bpos, int cpos);
|
||||
int owl_threatens_attack(int apos, int bpos);
|
||||
int connect_and_cut_helper(int Apos, int bpos, int cpos);
|
||||
int connect_and_cut_helper2(int Apos, int bpos, int cpos, int color);
|
||||
int edge_double_sente_helper(int move, int apos, int bpos, int cpos);
|
||||
void test_attack_either_move(int move, int color, int worma, int wormb);
|
||||
int adjacent_to_stone_in_atari(int str);
|
||||
int adjacent_to_defendable_stone_in_atari(int str);
|
||||
void backfill_replace(int move, int str);
|
||||
int break_mirror_helper(int str, int color);
|
||||
int distrust_tactics_helper(int str);
|
||||
int disconnect_helper(int apos, int bpos);
|
||||
|
||||
|
||||
/* pattern arrays themselves */
|
||||
extern struct pattern_db pat_db;
|
||||
extern struct pattern_db aa_attackpat_db;
|
||||
extern struct pattern_db owl_attackpat_db;
|
||||
extern struct pattern_db owl_vital_apat_db;
|
||||
extern struct pattern_db owl_defendpat_db;
|
||||
extern struct pattern_db conn_db;
|
||||
extern struct pattern_db attpat_db;
|
||||
extern struct pattern_db defpat_db;
|
||||
extern struct pattern_db endpat_db;
|
||||
extern struct pattern_db influencepat_db;
|
||||
extern struct pattern_db barrierspat_db;
|
||||
extern struct pattern_db fusekipat_db;
|
||||
extern struct pattern_db handipat_db;
|
||||
extern struct pattern_db oracle_db;
|
||||
|
||||
extern struct corner_db joseki_db;
|
||||
|
||||
extern struct fullboard_pattern fuseki19[];
|
||||
extern struct fullboard_pattern fuseki13[];
|
||||
extern struct fullboard_pattern fuseki9[];
|
||||
|
||||
extern struct mc_pattern_database mc_pattern_databases[];
|
||||
|
||||
struct corner_db;
|
||||
struct corner_variation;
|
||||
struct corner_pattern;
|
||||
|
||||
struct corner_db {
|
||||
int max_width; /* Largest possible width and... */
|
||||
int max_height; /* ... largest possible height of database patterns. */
|
||||
|
||||
unsigned char num_top_variations; /* Number of top level variations. */
|
||||
struct corner_variation *top_variations;
|
||||
};
|
||||
|
||||
struct corner_variation {
|
||||
int move_offset; /* Offset of the move in this variation. */
|
||||
signed char xor_att; /* 0 - the same color as the first matched stone,
|
||||
* 3 - the opposite color.
|
||||
*/
|
||||
unsigned char num_stones; /* Number of stones in the `move_offset' rectangle. */
|
||||
|
||||
unsigned char num_variations; /* Number of subvariations. */
|
||||
struct corner_variation *variations; /* Pointer to subvariation array. */
|
||||
|
||||
struct corner_pattern *pattern; /* Address of matched pattern (if any). */
|
||||
};
|
||||
|
||||
struct corner_pattern {
|
||||
int second_corner_offset; /* Offset of pattern's second corner. */
|
||||
int symmetric; /* If the pattern is symmetric ('/' symmetry). */
|
||||
|
||||
unsigned int class; /* Pattern class. */
|
||||
const char *name; /* Pattern name (optional). */
|
||||
|
||||
/* Pattern attributes like shape (the only one used currently). */
|
||||
struct pattern_attribute *attributes;
|
||||
|
||||
int autohelper_flag; /* Whether autohelper has constraint and/or action. */
|
||||
autohelper_fn_ptr autohelper; /* Automatically generated helper (or NULL). */
|
||||
};
|
||||
|
||||
/* Build time version of corner_variation structure. */
|
||||
struct corner_variation_b {
|
||||
int move_offset;
|
||||
signed char xor_att;
|
||||
unsigned char num_stones;
|
||||
|
||||
unsigned char num_variations;
|
||||
struct corner_variation_b *next;
|
||||
struct corner_variation_b *child;
|
||||
int child_num;
|
||||
|
||||
int pattern_num;
|
||||
};
|
||||
|
||||
|
||||
#endif /* _PATTERN_H_ */
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
3713
gnugo/patterns/patterns2.db
Normal file
3713
gnugo/patterns/patterns2.db
Normal file
File diff suppressed because it is too large
Load Diff
185
gnugo/patterns/sansan.db
Normal file
185
gnugo/patterns/sansan.db
Normal file
@ -0,0 +1,185 @@
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #
|
||||
# #
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #
|
||||
# 2008 and 2009 by the Free Software Foundation. #
|
||||
# #
|
||||
# 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 - 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 in file COPYING 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 02111, USA. #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# This file is automatically generated by joseki. Do not edit #
|
||||
# it directly. Instead, edit the corresponding sgf file. #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
|
||||
attribute_map general
|
||||
|
||||
Pattern JS1
|
||||
|
||||
---------+
|
||||
.........|
|
||||
.........|
|
||||
......X..|
|
||||
.....*...|
|
||||
.........|
|
||||
.........|
|
||||
.........|
|
||||
.........|
|
||||
.........|
|
||||
|
||||
:/,sFj
|
||||
|
||||
|
||||
Pattern JS2
|
||||
|
||||
-----+
|
||||
.....|
|
||||
.....|
|
||||
..O..|
|
||||
.X*..|
|
||||
.....|
|
||||
.....|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JS3
|
||||
|
||||
-------+
|
||||
.......|
|
||||
.......|
|
||||
....X..|
|
||||
...OX..|
|
||||
...*...|
|
||||
.......|
|
||||
.......|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JS4
|
||||
|
||||
-------+
|
||||
.......|
|
||||
..*....|
|
||||
....O..|
|
||||
...XO..|
|
||||
...X...|
|
||||
.......|
|
||||
.......|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JS5
|
||||
|
||||
--------+
|
||||
........|
|
||||
...X....|
|
||||
.....X..|
|
||||
.*..OX..|
|
||||
....O...|
|
||||
........|
|
||||
........|
|
||||
|
||||
:8,sFJ-,shape(10)
|
||||
|
||||
|
||||
Pattern JS6
|
||||
|
||||
---------+
|
||||
.........|
|
||||
....X....|
|
||||
......X..|
|
||||
..O..OX..|
|
||||
.....O...|
|
||||
.......X.|
|
||||
.....*...|
|
||||
.........|
|
||||
.........|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JS7
|
||||
|
||||
--------+
|
||||
........|
|
||||
........|
|
||||
..*..O..|
|
||||
........|
|
||||
........|
|
||||
....X...|
|
||||
|
||||
:8,sFJ
|
||||
|
||||
|
||||
Pattern JS8
|
||||
|
||||
-------+
|
||||
.......|
|
||||
.......|
|
||||
...XO..|
|
||||
...*...|
|
||||
.......|
|
||||
.......|
|
||||
.......|
|
||||
|
||||
:8,sFU
|
||||
|
||||
|
||||
Pattern JS9
|
||||
|
||||
-------+
|
||||
.......|
|
||||
.......|
|
||||
...XO..|
|
||||
...OX..|
|
||||
....*..|
|
||||
.......|
|
||||
.......|
|
||||
|
||||
:8,sFU
|
||||
|
||||
|
||||
Pattern JS10
|
||||
|
||||
-------+
|
||||
.......|
|
||||
.......|
|
||||
..*XO..|
|
||||
...OXX.|
|
||||
....O..|
|
||||
.......|
|
||||
.......|
|
||||
|
||||
:8,sFU
|
||||
|
||||
|
||||
Pattern JS11
|
||||
|
||||
-------+
|
||||
.......|
|
||||
...X...|
|
||||
..OXO..|
|
||||
...OXX.|
|
||||
..*.O..|
|
||||
.......|
|
||||
.......|
|
||||
|
||||
:/,sFU
|
||||
|
||||
|
40
gnugo/patterns/sansan.sgf
Normal file
40
gnugo/patterns/sansan.sgf
Normal file
@ -0,0 +1,40 @@
|
||||
This is GNU Go, a Go program. Contact gnugo@gnu.org, or see
|
||||
http://www.gnu.org/software/gnugo/ for more information.
|
||||
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008 and 2009 by Software Foundation.
|
||||
|
||||
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 - 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 in file COPYING 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 02111, USA.
|
||||
|
||||
(;GM[1]FF[3]
|
||||
SZ[19]HA[0]
|
||||
GN[Sansan joseki database]
|
||||
;B[qc]
|
||||
(;W[pd]MA[ki]C[j
|
||||
];B[qd]MA[of];W[pe]MA[mg];B[ob]MA[mg];W[md]
|
||||
MA[lg]C[:-,shape(10)
|
||||
];B[rf];W[pg]MA[ki])
|
||||
|
||||
(;W[pf];B[nc]MA[lf])
|
||||
|
||||
(;W[pc];B[pd]MA[mg]C[U
|
||||
];W[qd];B[qe]MA[mg]C[U
|
||||
];W[rd];B[oc]MA[mg]C[U
|
||||
]
|
||||
;W[pb];B[oe]MA[mg]C[U
|
||||
])
|
||||
|
||||
)
|
1083
gnugo/patterns/takamoku.db
Normal file
1083
gnugo/patterns/takamoku.db
Normal file
File diff suppressed because it is too large
Load Diff
101
gnugo/patterns/takamoku.sgf
Normal file
101
gnugo/patterns/takamoku.sgf
Normal file
@ -0,0 +1,101 @@
|
||||
This is GNU Go, a Go program. Contact gnugo@gnu.org, or see
|
||||
http://www.gnu.org/software/gnugo/ for more information.
|
||||
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008 and 2009 by the Free Software Foundation.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
publishedby the Free Software Foundation - 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 in file COPYING 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 02111, USA.
|
||||
|
||||
(;GM[1]FF[3]
|
||||
SZ[19]HA[0]
|
||||
GN[Takamoku joseki database]
|
||||
;B[od];W[qd]
|
||||
(;B[qc]MA[lf]C[j
|
||||
];W[rc]MA[lf];B[pc]MA[lf];W[re]MA[lf]C[U
|
||||
];B[kc]
|
||||
MA[je];W[pf]MA[nh]C[U
|
||||
])
|
||||
|
||||
(;B[qe]MA[lg]C[j
|
||||
];W[re]MA[lg]C[U
|
||||
];B[pe]MA[lg];W[qf]MA[lh]C[U
|
||||
];B[rf]
|
||||
MA[lh]C[U
|
||||
];W[rg]MA[lh]C[U
|
||||
];B[rd]MA[lh]C[U
|
||||
];W[sf]MA[lh]C[U
|
||||
];B[qc]
|
||||
MA[lf]C[U
|
||||
])
|
||||
|
||||
(;B[pf]MA[li]C[j
|
||||
]
|
||||
(;W[oc]MA[li]C[U
|
||||
]
|
||||
(;B[nc]MA[ki]C[U
|
||||
];W[pc]MA[li]C[U
|
||||
];B[nd]MA[li]C[:-,shape(5)
|
||||
]
|
||||
(;W[rf]MA[li])
|
||||
|
||||
(;W[tt];B[re]MA[li])
|
||||
)
|
||||
|
||||
(;B[pd]MA[ki]C[U
|
||||
];W[pc]MA[li]C[U
|
||||
];B[qc]MA[li]C[U
|
||||
];W[rc]MA[li]C[U
|
||||
];
|
||||
B[qb]MA[li]C[U
|
||||
];W[rb]MA[ki]C[U
|
||||
];B[qe]MA[ki]C[U
|
||||
];W[rd]MA[ki]C[U
|
||||
];
|
||||
B[nc]MA[ki]C[U
|
||||
];W[pb]C[U
|
||||
];B[ob]MA[ki]C[U
|
||||
];W[qa]C[U
|
||||
];B[md]MA[ki]
|
||||
C[U
|
||||
])
|
||||
|
||||
(;B[pc]
|
||||
C[This leads to very tricky fighting, so we don't initiate this sequence.
|
||||
]
|
||||
;W[pd]MA[nf]C[U
|
||||
];B[qc]MA[mg];W[rc]MA[ng]C[U
|
||||
];B[rb]MA[mg];W[rd]MA[mg]
|
||||
;B[ob]MA[mg];W[nc]MA[mg];B[nb]MA[mg];W[mc]MA[lg];B[oe]MA[kg];W[sb]
|
||||
MA[lg];B[qb]MA[lg];W[qg]MA[mi]C[U
|
||||
];B[ph]MA[ki];W[kc]MA[ji];B[mb]
|
||||
MA[ji];W[lb]MA[ji];B[ld]MA[ji];W[lc]MA[ji]C[U
|
||||
];B[ma]MA[ki];W[qf]
|
||||
MA[ki];B[qh]MA[hi];W[rh]MA[hi];B[ri]MA[hj];W[pg]MA[kj];B[og]MA[kj];
|
||||
W[oh]MA[kj];B[ng]MA[kj];W[sg]MA[kj];B[oi]MA[kj]
|
||||
(;W[hc]MA[gj]LB[oh:A]C[;!defend(A)
|
||||
];B[nh]MA[hj])
|
||||
|
||||
(;W[nh]C[;safe_omove(*)
|
||||
]MA[kj])
|
||||
)
|
||||
)
|
||||
|
||||
(;W[tt]C[U
|
||||
];B[qc]MA[li]C[t
|
||||
])
|
||||
)
|
||||
|
||||
)
|
174
gnugo/patterns/transform.c
Normal file
174
gnugo/patterns/transform.c
Normal file
@ -0,0 +1,174 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include "liberty.h"
|
||||
#include "dfa.h"
|
||||
|
||||
#include <memory.h>
|
||||
|
||||
/* Array for use by TRANSFORM() macro. */
|
||||
int transformation[MAX_OFFSET][8];
|
||||
|
||||
/* Matrix array for use by TRANSFORM2() macro. */
|
||||
const int transformation2[8][2][2] = {
|
||||
{ { 1, 0},
|
||||
{ 0, 1}}, /* a - identity transformation matrix */
|
||||
|
||||
{ { 0, 1},
|
||||
{-1, 0}}, /* g - rotate 90 clockwise */
|
||||
|
||||
{ {-1, 0},
|
||||
{ 0, -1}}, /* d - rotate 180 */
|
||||
|
||||
{ { 0, -1},
|
||||
{ 1, 0}}, /* f - rotate 90 counter-clockwise */
|
||||
|
||||
{ { 0, -1},
|
||||
{-1, 0}}, /* h - rotate 90 clockwise and flip on x axis */
|
||||
|
||||
{ {-1, 0},
|
||||
{ 0, 1}}, /* b - flip on x axis */
|
||||
|
||||
{ { 0, 1},
|
||||
{ 1, 0}}, /* e - rotate 90 counter-clockwise and flip on x axis */
|
||||
|
||||
{ { 1, 0},
|
||||
{ 0, -1}} /* c - flip on y axis */
|
||||
};
|
||||
|
||||
|
||||
/* Initialize transformation[][] array. */
|
||||
void
|
||||
transformation_init(void)
|
||||
{
|
||||
int k;
|
||||
int dx;
|
||||
int dy;
|
||||
|
||||
for (k = 0; k < 8; k++) {
|
||||
for (dy = -MAX_BOARD+1; dy <= MAX_BOARD-1; dy++) {
|
||||
for (dx = -MAX_BOARD+1; dx <= MAX_BOARD-1; dx++) {
|
||||
int tx;
|
||||
int ty;
|
||||
|
||||
TRANSFORM2(dx, dy, &tx, &ty, k);
|
||||
transformation[OFFSET(dx, dy)][k] = DELTA(tx, ty);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Spiral orders for DFA matching and building. */
|
||||
int spiral[DFA_MAX_ORDER][8];
|
||||
|
||||
/* The spiral order is the way we scan the board, we begin on the
|
||||
* anchor and we progressively scan all its neigbouring intersections,
|
||||
* collecting all the known patterns we meet on our way:
|
||||
*
|
||||
* 4 4 4
|
||||
* 1 1 13 13 513 513 ... and so on until we reach a
|
||||
* 2 2 2 2 827 stopping state in the DFA.
|
||||
* 6
|
||||
*
|
||||
* Build the spiral order for each transformation: instead of changing
|
||||
* the board or changing the patterns, we only change the order. For
|
||||
* e.g. the same DFA can perform the pattern matching
|
||||
*
|
||||
* That way for identity:
|
||||
*
|
||||
* 40 04
|
||||
* 5139 and this way for mirror symetry: 9315
|
||||
* 827 728
|
||||
* 6 6
|
||||
*
|
||||
* Anther possibility is to generate one string by pattern and by
|
||||
* transformation in `mkpat' to avoid any runtime transformation but
|
||||
* it drastically increases the size of DFAs.
|
||||
*/
|
||||
void
|
||||
build_spiral_order(void)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
char mark[2 * DFA_MAX_BOARD + 1][2 * DFA_MAX_BOARD + 1];
|
||||
int queue_i[DFA_MAX_ORDER];
|
||||
int queue_j[DFA_MAX_ORDER];
|
||||
int queue_start = 0;
|
||||
int queue_end = 1;
|
||||
|
||||
static const int delta_i[4] = { 1, 0, -1, 0};
|
||||
static const int delta_j[4] = { 0, 1, 0, -1};
|
||||
|
||||
/* Initialization. */
|
||||
memset(mark, 1, sizeof(mark));
|
||||
for (i = 1; i < 2 * DFA_MAX_BOARD; i++) {
|
||||
for (j = 1; j < 2 * DFA_MAX_BOARD; j++)
|
||||
mark[i][j] = 0;
|
||||
}
|
||||
|
||||
queue_i[0] = DFA_MAX_BOARD;
|
||||
queue_j[0] = DFA_MAX_BOARD;
|
||||
mark[DFA_MAX_BOARD][DFA_MAX_BOARD] = 1;
|
||||
|
||||
do {
|
||||
int transformation;
|
||||
|
||||
/* Transform queued coordinates and store DFA offsets in spiral[][]. */
|
||||
for (transformation = 0; transformation < 8; transformation++) {
|
||||
TRANSFORM2(queue_i[queue_start] - DFA_MAX_BOARD,
|
||||
queue_j[queue_start] - DFA_MAX_BOARD,
|
||||
&i, &j, transformation);
|
||||
spiral[queue_start][transformation] = DFA_BASE * i + j;
|
||||
}
|
||||
|
||||
for (k = 0; k < 4; k++) {
|
||||
i = queue_i[queue_start] + delta_i[k];
|
||||
j = queue_j[queue_start] + delta_j[k];
|
||||
|
||||
if (!mark[i][j]) {
|
||||
queue_i[queue_end] = i;
|
||||
queue_j[queue_end++] = j;
|
||||
mark[i][j] = 1;
|
||||
}
|
||||
}
|
||||
} while (++queue_start < queue_end);
|
||||
|
||||
if (0) {
|
||||
int transformation;
|
||||
for (transformation = 0; transformation < 8; transformation++) {
|
||||
fprintf(stderr, "Transformation %d:\n", transformation);
|
||||
for (k = 0; k < 16; k++) {
|
||||
fprintf(stderr, "\t%d(%c); %d\n", k, 'A' + k,
|
||||
spiral[k][transformation]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
322
gnugo/patterns/uncompress_fuseki.c
Normal file
322
gnugo/patterns/uncompress_fuseki.c
Normal file
@ -0,0 +1,322 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *
|
||||
* *
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008 and 2009 by the Free Software Foundation. *
|
||||
* *
|
||||
* 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 - 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 in file COPYING 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 02111, USA. *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "board.h"
|
||||
#include "liberty.h"
|
||||
#include "hash.h"
|
||||
#include "gg_utils.h"
|
||||
|
||||
#define BUFSIZE 160
|
||||
|
||||
#define USAGE "\
|
||||
Usage :\
|
||||
uncompress_fuseki boardsize filename c\n\
|
||||
uncompress_fuseki boardsize filename db\n\
|
||||
"
|
||||
|
||||
#define DB_PREAMBLE "\
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n\
|
||||
# This is GNU Go, a Go program. Contact gnugo@gnu.org, or see #\n\
|
||||
# http://www.gnu.org/software/gnugo/ for more information. #\n\
|
||||
# #\n\
|
||||
# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 #\n\
|
||||
# 2008 and 2009 by the Free Software Foundation. #\n\
|
||||
# #\n\
|
||||
# This program is free software; you can redistribute it and/or #\n\
|
||||
# modify it under the terms of the GNU General Public License as #\n\
|
||||
# published by the Free Software Foundation - version 3 #\n\
|
||||
# or (at your option) any later version. #\n\
|
||||
# #\n\
|
||||
# This program is distributed in the hope that it will be useful, #\n\
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #\n\
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #\n\
|
||||
# GNU General Public License in file COPYING for more details. #\n\
|
||||
# #\n\
|
||||
# You should have received a copy of the GNU General Public #\n\
|
||||
# License along with this program; if not, write to the Free #\n\
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, #\n\
|
||||
# Boston, MA 02111, USA. #\n\
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n\
|
||||
# This file is automatically generated by uncompress_fuseki. Do #\n\
|
||||
# not edit it directly. Instead, edit the corresponding .dbz file. #\n\
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n\
|
||||
\n\n\
|
||||
"
|
||||
|
||||
#define DB_HEADER "# Fuseki patternsboardsize %d\nattribute_map value_only\n\n"
|
||||
#define DB_FOOTER ""
|
||||
|
||||
#define C_PREAMBLE "\
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\
|
||||
* This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *\n\
|
||||
* http://www.gnu.org/software/gnugo/ for more information. *\n\
|
||||
* *\n\
|
||||
* Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 and 2006 *\n\
|
||||
* by the Free Software Foundation. *\n\
|
||||
* *\n\
|
||||
* This program is free software; you can redistribute it and/or *\n\
|
||||
* modify it under the terms of the GNU General Public License as *\n\
|
||||
* published by the Free Software Foundation - version 3 *\n\
|
||||
* or (at your option) any later version. *\n\
|
||||
* *\n\
|
||||
* This program is distributed in the hope that it will be useful, *\n\
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *\n\
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\n\
|
||||
* GNU General Public License in file COPYING for more details. *\n\
|
||||
* *\n\
|
||||
* You should have received a copy of the GNU General Public *\n\
|
||||
* License along with this program; if not, write to the Free *\n\
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *\n\
|
||||
* Boston, MA 02111, USA. *\n\
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\
|
||||
\n#include <stdio.h> /* for NULL */\n\
|
||||
#include \"liberty.h\"\n\
|
||||
#include \"patterns.h\"\n\n\
|
||||
"
|
||||
|
||||
#define C_HEADER "struct fullboard_pattern fuseki%d[] = {\n"
|
||||
#define C_FOOTER "};\n"
|
||||
|
||||
static const char *const db_output_strings[3] =
|
||||
{DB_PREAMBLE, DB_HEADER, DB_FOOTER};
|
||||
static const char *const c_output_strings[3] =
|
||||
{C_PREAMBLE, C_HEADER, C_FOOTER};
|
||||
|
||||
#define PREAMBLE 0
|
||||
#define HEADER 1
|
||||
#define FOOTER 2
|
||||
|
||||
|
||||
/* Place a stone (or move mark) on the internal board. The board point
|
||||
* is sgf encoded.
|
||||
*/
|
||||
static int
|
||||
set_boards(char board[MAX_BOARD + 2][MAX_BOARD + 2],
|
||||
Intersection board1d[BOARDSIZE],
|
||||
char *stones, char color, int boardsize)
|
||||
{
|
||||
int i = stones[1] - 'a' + 1;
|
||||
int j = stones[0] - 'a' + 1;
|
||||
if (stones[0] != 't') {
|
||||
assert(i > 0 && i < boardsize + 2);
|
||||
board[i][j] = color;
|
||||
if (color == 'O')
|
||||
board1d[POS(i - 1, j - 1)] = WHITE;
|
||||
else if (color == 'X')
|
||||
board1d[POS(i - 1, j - 1)] = BLACK;
|
||||
return POS(i - 1, j - 1);
|
||||
}
|
||||
else
|
||||
return NO_MOVE;
|
||||
}
|
||||
|
||||
static void
|
||||
write_pattern(char *name, char board[MAX_BOARD + 2][MAX_BOARD + 2],
|
||||
int value, int boardsize)
|
||||
{
|
||||
int i, j;
|
||||
/* Output the uncompressed pattern. */
|
||||
printf("Pattern %s\n\n", name);
|
||||
for (i = 0; i <= boardsize + 1; i++) {
|
||||
for (j = 0; j <= boardsize + 1; j++)
|
||||
printf("%c", board[i][j]);
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n:8,-,value(%d)\n\n\n", value);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
write_pattern_c_code(char *name, Intersection board1d[BOARDSIZE],
|
||||
int move_pos, int value, int boardsize, int patlen)
|
||||
{
|
||||
int k;
|
||||
Hash_data pattern_hash;
|
||||
|
||||
/* Compute hash. */
|
||||
hashdata_recalc(&pattern_hash, board1d, NO_MOVE);
|
||||
printf(" {{{");
|
||||
for (k = 0; k < NUM_HASHVALUES; k++) {
|
||||
printf("0x%lx", pattern_hash.hashval[k]);
|
||||
if (k < NUM_HASHVALUES - 1)
|
||||
printf(",");
|
||||
}
|
||||
if (name)
|
||||
printf("}},%d,\"%s\",%d,%d},\n", patlen, name,
|
||||
OFFSET(I(move_pos) - (boardsize-1)/2,
|
||||
J(move_pos) - (boardsize-1)/2),
|
||||
value);
|
||||
else
|
||||
printf("}},-1,NULL,0,0},\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define DB_OUTPUT 1
|
||||
#define C_OUTPUT 2
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
const char *filename;
|
||||
FILE *input_FILE;
|
||||
const char *const *output_strings;
|
||||
int mode;
|
||||
int move_pos;
|
||||
char line[BUFSIZE];
|
||||
char name[BUFSIZE];
|
||||
char stones[BUFSIZE];
|
||||
int value;
|
||||
char board[MAX_BOARD + 2][MAX_BOARD + 2];
|
||||
Intersection board1d[BOARDSIZE];
|
||||
int boardsize;
|
||||
int i, j, k;
|
||||
int pos;
|
||||
char color;
|
||||
|
||||
/* Check number of arguments. */
|
||||
if (argc != 4) {
|
||||
fprintf(stderr, USAGE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
boardsize = atoi(argv[1]);
|
||||
filename = argv[2];
|
||||
if (strncmp(argv[3], "c", 2) == 0) {
|
||||
mode = C_OUTPUT;
|
||||
output_strings = c_output_strings;
|
||||
set_random_seed(HASH_RANDOM_SEED);
|
||||
hash_init();
|
||||
}
|
||||
else if (strncmp(argv[3], "db", 3) == 0) {
|
||||
mode = DB_OUTPUT;
|
||||
output_strings = db_output_strings;
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, USAGE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
assert(boardsize > 0);
|
||||
if (boardsize > MAX_BOARD) {
|
||||
printf(output_strings[PREAMBLE]);
|
||||
printf(output_strings[HEADER], boardsize);
|
||||
printf(output_strings[FOOTER]);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
input_FILE = fopen(filename, "r");
|
||||
if (!input_FILE) {
|
||||
fprintf(stderr, "uncompress_fuseki: Cannot open file %s\n", filename);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* Initialize the corners of the internal board description. */
|
||||
board[0][0] = '+';
|
||||
board[0][boardsize + 1] = '+';
|
||||
board[boardsize + 1][0] = '+';
|
||||
board[boardsize + 1][boardsize + 1] = '+';
|
||||
|
||||
/* Initialize the sides of the internal board description. */
|
||||
for (k = 1; k <= boardsize; k++) {
|
||||
board[0][k] = '-';
|
||||
board[boardsize + 1][k] = '-';
|
||||
board[k][0] = '|';
|
||||
board[k][boardsize + 1] = '|';
|
||||
}
|
||||
|
||||
printf(output_strings[PREAMBLE]);
|
||||
printf(output_strings[HEADER], boardsize);
|
||||
|
||||
|
||||
/* Loop over the lines of the compressed database.
|
||||
* Each line is one pattern.
|
||||
*/
|
||||
while (fgets(line, BUFSIZE, input_FILE)) {
|
||||
int num_stones = 0;
|
||||
/* Clear the internal board. */
|
||||
for (i = 1; i <= boardsize; i++)
|
||||
for (j = 1; j <= boardsize; j++)
|
||||
board[i][j] = '.';
|
||||
|
||||
/* Initialize private 1D-board. */
|
||||
for (pos = 0; pos < BOARDSIZE; pos++)
|
||||
if (I(pos) >= 0 && I(pos) < boardsize
|
||||
&& J(pos) >= 0 && J(pos) < boardsize)
|
||||
board1d[pos] = EMPTY;
|
||||
else
|
||||
board1d[pos] = GRAY;
|
||||
|
||||
/* Assume a line from copyright notice if misformed and
|
||||
* silently ignore it.
|
||||
*/
|
||||
if (sscanf(line, "%s %d %s", name, &value, stones) != 3)
|
||||
continue;
|
||||
|
||||
/* The first point in the stones list is the move to be played. */
|
||||
move_pos = set_boards(board, board1d, stones, '*', boardsize);
|
||||
|
||||
/* Then follows alternating X and O stones. */
|
||||
color = 'X';
|
||||
for (k = 2; k < (int) strlen(stones); k += 2) {
|
||||
pos = set_boards(board, board1d, stones + k, color, boardsize);
|
||||
if (I(pos) >= 0 && I(pos) < boardsize
|
||||
&& J(pos) >= 0 && J(pos) < boardsize)
|
||||
num_stones++;
|
||||
if (color == 'X')
|
||||
color = 'O';
|
||||
else
|
||||
color = 'X';
|
||||
}
|
||||
|
||||
if (mode == DB_OUTPUT)
|
||||
write_pattern(name, board, value, boardsize);
|
||||
else
|
||||
write_pattern_c_code(name, board1d, move_pos, value, boardsize,
|
||||
num_stones);
|
||||
}
|
||||
|
||||
/* Add a dummy pattern to mark the end of the array. This can't be
|
||||
* done statically in the footer since NUM_HASHVALUES may vary.
|
||||
*/
|
||||
if (mode == C_OUTPUT)
|
||||
write_pattern_c_code(NULL, board1d, NO_MOVE, 0, boardsize, -1);
|
||||
|
||||
printf(output_strings[FOOTER]);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* c-basic-offset: 2
|
||||
* End:
|
||||
*/
|
102
gnugo/patterns/uncompress_fuseki.dsp
Normal file
102
gnugo/patterns/uncompress_fuseki.dsp
Normal file
@ -0,0 +1,102 @@
|
||||
# Microsoft Developer Studio Project File - Name="uncompress_fuseki" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=uncompress_fuseki - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "uncompress_fuseki.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "uncompress_fuseki.mak" CFG="uncompress_fuseki - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "uncompress_fuseki - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "uncompress_fuseki - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "uncompress_fuseki - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "uncompress_fuseki___Win32_Release"
|
||||
# PROP BASE Intermediate_Dir "uncompress_fuseki___Win32_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /GX /Zi /I ".." /I "..\engine" /I "..\sgf" /I "..\utils" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 engine.lib /nologo /subsystem:console /incremental:yes /machine:I386 /libpath:"../engine/Release/"
|
||||
|
||||
!ELSEIF "$(CFG)" == "uncompress_fuseki - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /I "..\engine" /I "..\sgf" /I "..\utils" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x407 /d "_DEBUG"
|
||||
# ADD RSC /l 0x407 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "uncompress_fuseki - Win32 Release"
|
||||
# Name "uncompress_fuseki - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\uncompress_fuseki.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
Reference in New Issue
Block a user