🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.chess
Article #5214

Why does this precalc shortcut NOT work on PL64?

#5214
From: Roger Uzun
Date: Wed, 19 Jan 1994 10:56
51 lines
2272 bytes
I want to modify SelectMove inside search.c, so that
if flag.easy is not set (thinkahead on) and the computer
has guessed the correct move, and has enough plys calculated,
then it will bypass all the search stuff and go straight to
the section of code right after the if (iop == 2) return;
area of SelectMove.

I tried this and it did not work properly.  What I would
like is for gnuchess to just make a move IMMEDIATLY if
it guessed the opponents move correctly, and has enough
plys to be comfortable with its pre-calculated countermove.
What would be the easiest way to modify SelectMove to
accomplish this.  Forget about the conditions say that
we have a global variable setup to determine if we
guessed correctly and had enough ply, something like the snippet below,
pretend we have magically set the ThinkAheadGoodEnough variable when
we have though ahead enough and are comfortable with the precalculated
move, and cleared it otherwise.

SelectMove(...)
{
  xside = side ^ 1;
  if (ThinkAheadGoodEnough) // ThinkAheadGoodEnough is set or clear already
   goto ForcePreCalcMove;
  flag.timeout = false;
  flag.back = false;
  flag.musttimeout = false;
  recycle = (GameCnt % rehash) - rehash;
  /* if background mode set to infinite */
  if (iop == 2)
    {
      ResponseTime = 9999999;
      background = true;
    }
  else
    {
      player = side;
.
.
All Selectmove stuff for search is here.
.
.
  /******************************* end of main loop ***********************************/
  /* background mode */
  if (iop == 2)
    return;
ForcePreCalcMove:
--------------------------------------------------------------
bix: ruzun
NET: uzun@crash.cts.com
Technical Details
Message-ID: <1994Jan19.025624.18555@crash>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!cs.utexas.edu!uunet!news.sprintlink.net!crash!uzun

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d71d,94ac67799ac53d75,start
X-Google-Attributes: gid10d71d,public
X-Google-ArrivalTime: 1994-01-19 09:05:42 PST
Newsgroups: gnu.chess
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!cs.utexas.edu!uunet!news.sprintlink.net!crash!uzun
From: uzun@crash.cts.com (Roger Uzun)
Subject: Why does this precalc shortcut NOT work on PL64?
Organization: CTS Network Services (CTSNET/crash), San Diego, CA
Date: 19 Jan 94 02:56:24 PST
Message-ID: <1994Jan19.025624.18555@crash>
Lines: 51