Computer Chess Club Archives


Search

Terms

Messages

Subject: Where do you include winboard stuff in your program?

Author: Uri Blass

Date: 06:19:56 12/15/04


I think that my design about winboard stuff is not the best and I think to have
better design for files that include only winboard stuff.

I am interested to know where do you have winboard stuff in your program

part of my winboard stuff is inside chess related files and I think that it may
be a bad idea.

My winboard stuff is basically in the following files:
1)main.cpp include waiting passively to winboard command and reading them not
during search.

2)analysis.cpp include dealing with winboard commands in analysis mode.

3)iterate.cpp includes both dealing in winboard commands during searching and
function to choose moves that is a loop to repeat analyzing in increasing depth.

I think that it is not a good idea to deal with winboard commands during search
in file that does other things so I added file read_during_search.cpp but the
problem is that this file need the score of the search that is not a global
variable and only iterates know about it because if I get the expected move
during pondering I may decide stop searching and in that case I want to include
the score in a special variable when if I stop to search because of unexpected
move I do not want the score in a special variable (for example in order to
decide if to resign).

It means that practically I have
4)read_during_search.cpp that have some functions that get the score when I call
them from iterate.cpp

I have also
5)winboard code in winboard.cpp that includes only code by Dieter to check if I
got winboard commands during search but not dealing with them.

6)I call the function checkup() from boardi.cpp after makemove every 8192
nodes

checkup() does not get varibale because boardi.cpp does not know about the score
of the search but checkup() is located in iterate.cpp so it can use the variable
x

I am considering to decide that x is simply a global variable or that it is not
a global variable but there is a specific class that I can get it from it.

I guess that the second solution is probably a better design if I may want in
the future to use parallel search and I am interested in your opinion.

When I write it I think about a third solution that may be better.
I think of is not to have more global variables and
simply to have third value for the variable stop_search and if I stop to search
not because of getting the expected move I will know that I do not need to
remember the score inside the search for decisions like resign decision because
stop_search will be 2 and not 1(today it can get only 0 or 1.

Uri



This page took 0.01 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.