gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] How to update GnuGo makefiles ?


From: Stéphane Nicolet
Subject: [gnugo-devel] How to update GnuGo makefiles ?
Date: Sat, 21 Jun 2003 16:22:57 +0200



Hello,

I am trying to write a module for gnugo that would allow to
make "parameters fitting" experiments, but I'm running into a
couple of problems.

The plan is to choose some perfect (let's say professional) games,
to define some measure of distance between the moves generated by
GnuGo and the moves played by the professionals, and to have gnugo
automatically adjust the coefficients of the evaluation function
to somehow decrease the distance.

For this we need :

(a) to write a library to minimize a function in multidimension,
    because we want to optimize for many coefficients simultaneously.
        This is implemented in the attached files minimization.h and
    minimization.c, see below.
(b) to choose a set of games against which we try to fit the
    parameters. Should we take top-level pro-pro games ?
    pro-pro handicap games ? NNGS games where Gnugo performs
    badly at high handicap, and only fit for the white moves ?
    Any idea ?
(c) to choose a "reasonable" distance function. This is the more
    problematic, because (i) we don't know the perfect value of the
    move played by the profesional (ii) we need a continuous function
    of the evaluation parameters (for the minimization algo to work),
    so we can't just take the average rank of the pro moves in the
    move list proposed by gnugo.

    Arend proposed to take :

dist(move) = 1 - (value(professional move) / value(gnugo's top move))

    and then to minimize

                \sum(dist(moves))

    However, this maybe has the problem ofeliminating any rank
    information : it's probably worse if the pro move has
    a 50% value AND is only ranked 10th, compare to having 50%
    but beinbg second best.

        
        Other possible obvious distances :

                (1) dist(move) = value(gnugo's top move) - value(professional 
move)

                (2) dist(move) = sum( value(gnugo's top move) - value(move in 
P) )

                (3) dist(move) = sum(1 - (value(move in P) / value(gnugo's top 
move)))

Where S is the set of moves ranked higher than the professional move.

    What other possibilities are worth trying ?



*******************

Looking at the code, I see that the play_replay() function has
a global variable "replay_score" that implements something similar
to (1), so I will probably try to reuse/modify that to test these
coefficients fit ideas.

However, that leads to my final questions : How can I add files to
gungo's Makefiles ? I haven't been able to figure out if I must modify
something in Makefile.am, Makefile.in, Makefile, configure.in, etc...
More precesily, here are the files I have and where I want to use them :


minimization.h, minimization.c :
          This library implement the conjugate gradient algorithm
      to find the minimum of a function in multidimension.
          As they are completely independant of Go, I think
      I would like to put them in /utils.

-> Which Makefile should I modify to be able to use the functions in
minimization.h from the engine afterwards ?


test_minimization.c :
          A small test program for the previous library. Self-contained.

-> Where should I put it ?


fitting.c, fitting.h (not written yet) :
      I would like to add these two files to the engine, and be
      able to call the functions defined in fitting.h from main().
      How do I do that from the Makefile, etc? :-)


\Stephane

Attachment: minimization.c
Description: application/applefile

Attachment: minimization.c
Description: Text document

Attachment: minimization.h
Description: application/applefile

Attachment: minimization.h
Description: Text document

Attachment: test_minimization.c
Description: application/applefile

Attachment: test_minimization.c
Description: Text document


reply via email to

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