gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] fuseki db


From: Gunnar Farnebäck
Subject: Re: [gnugo-devel] fuseki db
Date: Sat, 18 Dec 2004 05:58:14 +0100
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI)

Arend wrote:
> I think a reduction of the disk space usage would also be nice; the
> binary size of 7.5 M doesn't worry me so much, but 20 M for fuseki*.db
> for each CVS tree I have here on my hard disk is a bit annoying.
> The easiest solution that comes to my mind would be to patch
> extract_fuseki to generate an .sgf-file instead,

I hope you're not thinking of making an sgf file where the fuseki
patterns are represented as a "proper" branching move tree. As far as
I know that would be far from easy to generate from extract_fuseki. An
sgf file with lots of parallel variations, where only the leaf nodes
represent patterns, should be feasible though.

> which we would ship. Then joseki.c could be patched to regenerate
> fuseki*.db, and we can just pipe it's output to makepat. This way,
> we never need fuseki*.db on the disk (but can still generate it if
> we need it).

I'd rather not start patching joseki.c to do more than it was designed
for.

> Other suggestions?

Proper solution:
1. Construct a custom compact format for storing the fuseki patterns.
2. Modify extract_fuseki to output its results in that format.
3. Write a program to convert to .db format.
4. Write a program to generate fuseki*.c directly from the custom format.
5. Remove the fullboard pattern code from mkpat.c.

The main question is, I think, how much of the comments in fuseki*.db
that should be retained.

Quick solution:
What about the Makefile patch below? A drawback is that cvs update
will tend to refetch the file every time it thinks it's missing but
that should be possible to avoid with some cvs flag or by wrapping cvs
update in a script which first uncompresses fuseki19.db.

/Gunnar

Index: patterns/Makefile.am
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/Makefile.am,v
retrieving revision 1.28
diff -u -r1.28 Makefile.am
--- patterns/Makefile.am        11 Jun 2004 14:20:07 -0000      1.28
+++ patterns/Makefile.am        17 Dec 2004 21:38:59 -0000
@@ -169,8 +169,12 @@
 fuseki13.c : $(srcdir)/fuseki13.db mkpat$(EXEEXT)
        ./mkpat -b -f fuseki13 -i $(srcdir)/fuseki13.db -o fuseki13.c
 
+fuseki19.db:
+       gunzip fuseki19.db.gz
+
 fuseki19.c : $(srcdir)/fuseki19.db mkpat$(EXEEXT)
        ./mkpat -b -f fuseki19 -i $(srcdir)/fuseki19.db -o fuseki19.c
+       gzip -f fuseki19.db
 
 handipat.c : $(srcdir)/handicap.db mkpat$(EXEEXT)
        ./mkpat -b handipat -i $(srcdir)/handicap.db -o handipat.c
-------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]