Author: Dann Corbit
Date: 09:10:36 06/02/04
Go up one level in this thread
On June 02, 2004 at 11:39:18, Gopikrishna wrote:
>Where does board representation come in Gerbil? I mean initialising board like
>offset technique etc.. Does it come in Gen.c file or Makemove.c file or any
>other file? Thanks.
He holds the board in the pointer to the connection. It's called argsq[]:
typedef struct tagCON {
PI argpi[coMAX][ // Piece list.
cpiMAX];
int argcpi[coMAX]; // Number of pieces per side (at start of search).
SQ argsq[csqMAX]; // Board.
STE argste[csteMAX]; // Search context stack.
CM argcm[ccmMAX]; // Move generator stack.
HASHK arghashkRep[ // Repetition hash.
chashkREP];
char aszPonder[16]; // Move the engine is pondering if in ponder mode.
BOOL fAbort; // This is set to TRUE if the engine should
// immediately end its search. The engine should
// unmake all made moves as it is unwinding, but
// it shouldn't expect that a move is going to be
// made when it is done.
BOOL fTimeout; // This is true if the engine is out of time and
// should end its search at its convenience. In
// my implementation, it will finish the first
// ply before responding to this, otherwise it
// will respond immediately.
BOOL fPost; // TRUE if variation information should be posted
// to the interface.
BOOL fPonder; // TRUE if the engine should ponder (ever).
BOOL fLowPriority; // TRUE if the engine should reduce its priority
// when searching.
SEARCH_STATUS ss; // Information about search progress.
GAME_CONTEXT gc; // A list of moves made in the game so far, etc.
TIME_CONTROL tc; // Time control currently in use.
int smode; // Engine search mode (think, ponder, etc.).
BOOL fUseBook; // TRUE if I should use the book.
BOOL fResign; // TRUE if the program should resign if it is
// getting mauled.
BOOL fDrawOffered; // This will be true if the opponent offered a
// draw between my last move and now.
} CON, * PCON;
If you grep for argsq you will see how it is used.
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.