[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] program based on gnugo
From: |
Bernard Helmstetter |
Subject: |
[gnugo-devel] program based on gnugo |
Date: |
Fri, 11 Jan 2002 19:25:52 +0100 |
Hi,
I am trying to write a program using some parts of gnugo. To begin with,
it will probably be some kind of monte carlo go.
Do you have ideas as to how I should try and incorporate my move
generation code in gnugo ? What I've done now is patching main.c so that
it accepts an option --mcgo, and interface.c, modifying the function
gnugo_genmove :
int
gnugo_genmove(Position *pos, int *i, int *j, int color, int move_number)
{
position_to_globals(pos);
movenum = move_number; /* Another global */
/* PATCH */
switch (engine) {
case ORIGINAL_ENGINE:
return genmove(i, j, color);
case MONTECARLO_ENGINE:
return montecarlo_genmove(i, j, color);
}
}
I also added my object file in engine/Makefile and a #include in
gnugo.h.
It seems to work quite well. Is it a "normal" way to do it ?
Regards,
Bernard Helmstetter
- [gnugo-devel] program based on gnugo,
Bernard Helmstetter <=