Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Search question: returning "more"

Author: Uri Blass

Date: 05:11:05 12/16/02

Go up one level in this thread


On December 16, 2002 at 03:14:17, Tony Werten wrote:

>On December 15, 2002 at 16:12:30, Russell Reagan wrote:
>
>>Most examples of search functions that I have seen involve returning the result
>>by value, usually an int. I'd like to know how to go about arriving at a result
>>that contains more information that a simple int can hold. For example, if I
>>have a struct like this:
>>
>>typedef struct search_result_tag {
>>    // pv stuff
>>    move moves[MAX_MOVES];
>>    int num_moves;
>>    // evaluation stuff
>>    int overall_score;
>>    int material;
>>    int mobility;
>>    int king_safety;
>>    // search stuff
>>    int full_width_depth;
>>    int qsearch_depth;
>>    int time;
>>    // etc...
>>} search_result;
>>
>>How do I pass that around correctly in a recursive search function? The only
>>example remotely similar is Bruce Moreland's "Collecting the Principal
>>Variation" (http://www.seanet.com/~brucemo/topics/pv.htm).
>
>In XiniX I use a global array, wich is adressed by current depth. (root is zero
>) So when I want to know if fe kingsafety changed, I just compare
>struc[current_depth] with struc[current_depth-1] ( I only need it "backwards")
>
>Tony

I do the same in movei.

Note that I am not sure if calculating these arrays should be included in the
size of my evaluation.

I believe that it is possible to have a top program with not more than 2000
lines of evaluation code by my definition.

I do not say that it is possible to do it by Vincent's definition

Vincent includes even the static piece square table that is not done during the
evaluation as part of the evaluation in the last discussion.

Uri



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.