Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: CCT7 - Some happenings.

Author: Andrew Williams

Date: 07:47:30 02/10/05

Go up one level in this thread


On February 09, 2005 at 22:18:53, Lance Perkins wrote:

>I just realized that the engine that I sent to Enrico does not kibitz.
>
>I've added some kibitzing to Thinker for last year's CCT, but that never made it
>to the archived code. Now I need to add that again.
>
>All I need is to add something that outputs the string "tellics kibitz {pv
>info}". Right?
>

PM's kibitzing function is here:

void ics_output_eval() {
	char evalString[512];
	int items;
	int tim, nps;
	char pvString[1024];
	char scoreStr[16];

	nps = (NODES*100) / (1+time_taken(gameWhoseTurn));
	tim = time_taken(gameWhoseTurn)/100;

	if(opponentIsComputer) {
		int i;

		sprint_pv(&PV, pvString);
		for(i=60; i >= 0; i--) {
			if(pvString[i] == 0) break;
			if(pvString[i] == ' ') {
				pvString[i] = 0;
				if(pvString[i-1] == '.') continue;
				break;
			}
		}
		score_to_string(lastValidScore, scoreStr, TRUE);
		items = sprintf(evalString, "tellics kibitz PM: depth=%d \
                                score=%s time=%d nps=%d egtbprobes=%d \
                                egtbhits=%d PV: %s\n", lastCompletedDepth, \
                                scoreStr, tim, nps, egtbProbes, egtbHits, \
                                pvString);
	} else {
		score_to_string(lastValidScore, scoreStr, TRUE);
		items = sprintf(evalString, "tellics whisper PM: depth=%d \
                                score=%s time=%d nps=%d egtbprobes=%d \
                                egtbhits=%d\n", lastCompletedDepth, scoreStr, \
                                tim, nps, egtbProbes, egtbHits);
	}

	xbd_write(evalString);

}

Some of those long lines have wrapped - let me know if it doesn't make sense..

xbd_write is this:

/* Send something to xboard */
int xbd_write(char *str) {
	int sent;
#ifdef WINDOWS
	sent = _write(1, str, strlen(str));
#else
	sent = write(1, str, strlen(str));
#endif
	return sent;
}

Maybe all of this won't work if Thinker is a C++ engine? I don't know.

AW

>On February 09, 2005 at 19:12:28, Dieter Buerssner wrote:
>
>>On February 09, 2005 at 19:05:17, Peter Skinner wrote:
>>
>>
>>>The operator informed me that he as well has been trying to get a new version of
>>>the program that kibitzes with no success.
>>
>>Requiring it for each engine is somewhat stupid. Somebody should have
>>implemented it in the GUIs since long. And it was done - but seems not in freely
>>available GUIs.
>>
>>Regards,
>>Dieter



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.