Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: New version of TSCP (1.8)--opening book and hash keys

Author: Uri Blass

Date: 04:28:47 01/30/03

Go up one level in this thread


On January 30, 2003 at 05:42:20, Uri Blass wrote:

>On January 30, 2003 at 04:57:31, Tom Kerrigan wrote:
>
>>A new version of TSCP is now available on my home page:
>>
>>http://home.attbi.com/~tckerrigan/
>>
>>A big change is the addition of an opening book. Many people have asked for this
>>feature but until recently I couldn't think of a way to do it that was
>>appropriately simple. The new version's opening book code is only 122 lines,
>>about half of which are comments. The book that's included with the program
>>(book.txt) has 385 opening lines. This feature should make TSCP much more fun
>>for humans to play against and it should also make TSCP stronger in the
>>tournaments that people run (I've heard of people "busting" TSCP).
>>
>>I also added hash keys to the program. I've said in the past that I would never
>>do this, but TSCP's old repetition detection code was pretty hard to understand
>>and I think it was a kinda buggy, too. So I was able to remove that and the new
>>brain-dead-simple hash code is < 100 lines. (It does slow the program down by
>>~10%, BTW.) Another selling point for hash keys is that serious chess
>>programmers will have to learn about hash keys at some point anyway so they
>>might as well be in there. It also makes it a little easier for people to add
>>hash tables to TSCP.
>>
>>Well, two pretty big changes to TSCP. I hope you like them. Let me know if you
>>have any comments.
>>
>>-Tom
>
>There is another problem with TSCP.
>
>Tscp does not declare mate when it does a mate so winboard does not stop the
>clock
>
>I tried with black the opening 1.e4 f6 2.d4 g5 3.Qh5# and Tscp does not say
>checkmate in the 3th move so the clock in winboard continues to run.
>
>This problem is also a problem of first Movei because most of the winboard
>sipport code was copied from Tscp but after  peter berger asked me to fix the
>problem I did it and Movei claim the result when it delivers a mate(I decided to
>claim it in a way that people will know who claimed so if there is a bug of
>claiming the wrong result it will be easy to find the program that claimed the
>wrong claim.
>
>One of the problems in winboard is that in case of wrong claim about the result
>you need to look at the debug file to see who is quilty so I decided to
>change my print_result function to the code in the bottom of this post:
>
>Some explanation about the last part of the code:
>I have a varaible that is for adjudcation games based on scores in order to help
>people to play games faster by not spending time on positions when the result is
>clear.
>
>Usually adjudicate=2 and by default adjudicate is always 2 but if people want
>they may change that number to save time.
>
>Adjudicate=0 means a win for white and adjudicate=1 means a win for black.
>
>
>void print_result()
>{
>	/* is there a legal move? */
>	generatepinarray();
>	gen();
>	if (first_move[ply+1]==first_move[ply])
>	{
>		if (kingincheck>0)
>		{
>			if (side == LIGHT)
>				printf("0-1 {Movei->Black mates}\n");
>			else
>				printf("1-0 {Movei->White mates}\n");
>		}
>		else
>			printf("1/2-1/2 {Movei->Stalemate}\n");
>	}
>	else
>	{
>		repeat[hply]=reps();
>		if (repeat[hply]==10000)
>			printf("1/2-1/2 {Movei->Draw by insufficient material}\n");
>		else
>		if ((repeat[hply]>0)&&(repeat[repeat[hply]-1]>0))
>			printf("1/2-1/2 {Movei-> Draw by repetition}\n");
>		else if (fifty==fiftyvalue)
>		printf("1/2-1/2 {Movei-> Draw by fifty move rule}\n");
>	}
>	if (adjudicate==0)
>		printf("1-0 {Movei adjudication}\n");
>		else
>		if (adjudicate==1)
>			printf("0-1 {Movei adjudication}\n");
>}

I can add that the problem from my experience is only after tscp makes a move
and declare mate and is probably a result of a missing fflush(stdout) in tscp.

I have it but not in print_result and it may be better to put it in print_result
so I can avoid some places that I do it.

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.