Author: Ulrich Tuerke
Date: 04:34:13 12/27/99
Go up one level in this thread
On December 26, 1999 at 10:29:17, Steve McRiley wrote:
>Hi,
>
>I have played quite a few game with Gnuchess 5.00 on ICC (handle GnuChess)
>and I thought I'd fiddle aorund a little with its timemanagment. I
>feel that it does not use the time very well. In almost every game it
>has really alot of time left unused.
>
>Since I dont know much about programming I thought I'd ask a few
>question what to change.
>
>I found the following in cmd.c:
>
> **
> }
> else if (strcmp (cmd, "time") == 0) {
> sscanf (inputstr, "%s %[^\n]", s, inputstr);
> TimeLimit[1^board.side] = atoi(s) / 100;
I guess that the input string is cleaned from the "\n" and the remaing part,
which is numerical, will be converted to integer divided by 100 (winboard sends
centi-seconds). The resulting numerical value will be assigned to the side which
is not board.side (otherside[board.side]). This works if 0 and 1 are used to
code black and white.
> **
>I dont really get this,, can somebody explain?
>
>
> **
>} else
> suddendeath = 0;
> if (TCTime == 0) {
> SET (flags, TIMECTL);
> SearchTime = TCinc / 2;
> printf("Fischer increment of %d seconds\n",TCinc);
>**
>
>Does this mean that in TC's with increment it is suppose to use the
>increment/2 only to search or what? Can one change this?
Unfortunately, I don't know the context but it seems to me that this is the case
where you have only an increment (TCTime == 0), then indeed half of the
increment is taken as base. This is not unreasonable, taking into account that
GNU may want to alter this according to the search results, e.g. increase the
allocated time a lot in case of fail low detected.
>
> **
>{
> SET (flags, TIMECTL);
> MoveLimit[white] = MoveLimit[black] = TCMove - (GameCnt+1)/2;
> TimeLimit[white] = TimeLimit[black] = TCTime * 60;
> if (!(flags & XBOARD)) {
> printf ("Time Control: %d moves in %.2f secs\n",
> MoveLimit[white], TimeLimit[white]);
> printf("Fischer increment of %.2f seconds\n",TCinc);
>**
>
>Here, does the TCMove - (GameCnt+1)/2 mean that it will use the
>(timcontroll+1)/2 seconds to search, like in a 5 0 game it will use
>(5+1)/2=3 seconds?
>If so, this might be good to change if you want to test diffrent
>settings.
I guess that MoveLimit[] is supposed to store the number of remaining moves
until next time control. So if you set time in a game, the numer of moves which
have been done already (GameCnt+1)/2 will be subtracted. (GameCnt is apparently
used to store the ply count (no move count)).
>
> **
>if (GameCnt >= 0)
> UnmakeMove (board.side, &Game[GameCnt].move);
> else
> printf ("No moves to undo! \n");
> MoveLimit[board.side]++;
> TimeLimit[board.side] += Game[GameCnt+1].et;
> if (!(flags & XBOARD)) ShowBoard ();
>**
>
>Here, is this something that could be altered?
Is this the code for taking back a move ? The used time for the last move
(Game[GameCnt+1].et) is re-added to the total available time (TimeLimit).
Lots of guesses ! Nevertheless, I hope that I could help a little bit ?
UT
>
>
>Ive looked through time.c in craftys source but it didnt really help me alot.
>
>
>/McRiley
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.