gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] twogtp.py matches broken


From: Arend Bayer
Subject: [gnugo-devel] twogtp.py matches broken
Date: Tue, 29 Apr 2003 13:19:08 +0200 (CEST)

Currently, running matches with twogtp.py is broken, because the random
seed is always set to 0 starting from the 2nd game. This is due to
the final_score command:

static int
gtp_final_score(char *s)
{
  int seed;
  /* This is intended for regression purposes and should therefore be
   * deterministic. The best way to ensure this is to reset the random
   * number generator before calling genmove(). By default it is
   * seeded with 0, but if an optional unsigned integer is given in
   * the command after the color, this is used as seed instead.
   */
  seed = 0;
  sscanf(s, "%d", &seed);
  random_seed = seed;


Obviously, final_score is not only used for regression purposes, so
the comment is a bit off.
The bigger problem I see, however, is that issueing a single GTP
command that is intended to be deterministic, also makes all following
GTP commands (1) deterministic.

Should we maybe save the random seed during a determinstic command,
and restore it afterwards? (There are currently 6 such commands.)

Arend

(1): Almost: The behaviour of the fuseki module seems not fully
predictable just from the random seed, I haven't looked why.






reply via email to

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