Tom Kerrigan's TSCP deriivative : Tang project

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
marcelk
Posts: 348
Joined: Sat Feb 27, 2010 12:21 am

Re: Tom Kerrigan's TSCP deriivative : Tang project

Post by marcelk »

hgm wrote:Well, actually 'open source' does mean access to the source code. It seems some people are now trying to hijack that terminology for there own purposes. Best ignore them...
Oxford American Dictionaries hasn't ignored them:
open-source
adjective
[Computing] denoting software for which the original source code is made freely available and may be redistributed with or without modification.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Tom Kerrigan's TSCP deriivative : Tang project

Post by Ferdy »

jdart wrote:I reported recently that Winboard protocol support is broken in TSCP, when running matches, and I haven't had an answer (so far).

FYI the gist of the problem is this:

TSCP (1.81) can send an extra move after game end, which causes Winboard to pop up an error dialog and abort the next game. This occurs if the other side has resigned or if Winboard has adjudicated the game (in case of being checkmated or stalemated, TSCP has no moves so it won't send one).

The root cause of this appears to be that TSCP doesn't monitor input while searching, or before sending a move, but only afterwards.

Arasan now starts an input polling thread and this runs asynchronously with the search. When the search is running, commands such as "quit" or "result" get pushed onto a stack and the terminate flag is set. When the search completes, it first looks into the stack to see if a game ending command is present, and if so it does not send the move. Then it executes the pending commands in the stack before reading any new ones.

This is not actually much code and if implemented would have the side benefit of enabling TSCP to easily support ponder, which it doesn't, currently.
Jim has done a modification to address probably the problem you mentioned. It is in tscp-181e-ja (tscp-181d). I have tested this version for some matches and looks fine. I use the winboard 4.6.beta 120408.

Code: Select all

if (side == computer_side) {

			if &#40;x <= -9998&#41; &#123;       // small fix to stop engine from continuing to                               
				computer_side = EMPTY;  // search after lost game has ended - JA
				continue;
			&#125;                      

			think&#40;post&#41;;
			if (!pv&#91;0&#93;&#91;0&#93;.u&#41; &#123;
				computer_side = EMPTY;
				continue;
			&#125;
			printf&#40;"move %s\n", move_str&#40;pv&#91;0&#93;&#91;0&#93;.b&#41;);
			makemove&#40;pv&#91;0&#93;&#91;0&#93;.b&#41;;
			ply = 0;
			gen&#40;);
			print_result&#40;);
			continue;
		&#125;
User avatar
gleperlier
Posts: 1033
Joined: Sat Feb 04, 2012 10:03 pm

Re: Tom Kerrigan's TSCP deriivative : Tang project

Post by gleperlier »

Ferdy wrote:
jdart wrote:

Code: Select all

if &#40;side == computer_side&#41; &#123;

			if &#40;x <= -9998&#41; &#123;       // small fix to stop engine from continuing to                               
				computer_side = EMPTY;  // search after lost game has ended - JA
				continue;
			&#125;                      

			think&#40;post&#41;;
			if (!pv&#91;0&#93;&#91;0&#93;.u&#41; &#123;
				computer_side = EMPTY;
				continue;
			&#125;
			printf&#40;"move %s\n", move_str&#40;pv&#91;0&#93;&#91;0&#93;.b&#41;);
			makemove&#40;pv&#91;0&#93;&#91;0&#93;.b&#41;;
			ply = 0;
			gen&#40;);
			print_result&#40;);
			continue;
		&#125;
This part is in Main file ? or search ?

Best regards,

Gab
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Tom Kerrigan's TSCP deriivative : Tang project

Post by Ferdy »

In main file, under xboard().
User avatar
gleperlier
Posts: 1033
Joined: Sat Feb 04, 2012 10:03 pm

Re: Tom Kerrigan's TSCP deriivative : Tang project

Post by gleperlier »

Ferdy wrote:In main file, under xboard().
Thanks !
F. Bluemers
Posts: 868
Joined: Thu Mar 09, 2006 11:21 pm
Location: Nederland

Re: Tom Kerrigan's TSCP deriivative : Tang project

Post by F. Bluemers »

gleperlier wrote:
Ferdy wrote:In main file, under xboard().
Thanks !
what about gardening? :lol:
Image
User avatar
gleperlier
Posts: 1033
Joined: Sat Feb 04, 2012 10:03 pm

Re: Tom Kerrigan's TSCP deriivative : Tang project

Post by gleperlier »

:D Nice one :D

Just a reminder :
gleperlier wrote:Hi everyone,

Just want to "work" on eval, don't know anything in programming and will need cooperation for coding :oops:

At the end, the little engine would be not only Open Source but cooperative patchwork :)

Project is called : Tang

http://www.routard.com/photos/reunion/36694-un_tang.htm

Cheers,

Gab
F. Bluemers
Posts: 868
Joined: Thu Mar 09, 2006 11:21 pm
Location: Nederland

Re: Tom Kerrigan's TSCP deriivative : Tang project

Post by F. Bluemers »

gleperlier wrote::D Nice one :D

Just a reminder :
gleperlier wrote:Hi everyone,

Just want to "work" on eval, don't know anything in programming and will need cooperation for coding :oops:

At the end, the little engine would be not only Open Source but cooperative patchwork :)

Project is called : Tang

http://www.routard.com/photos/reunion/36694-un_tang.htm

Cheers,

Gab
I'm afraid that "working" on eval is not a trivial task.
There are costs (-elo) implementing ideas and then they should bring some +elo too.
Even with many engines exposing eval parameters,
not many people come with better parameters,testing is such a chore.Which also makes uci parameters a lot less interesting than they seem :P
With a certain nimzo version there was even a whole programming language to rewrite its eval,ofcouse all "experts" were invisible...
User avatar
gleperlier
Posts: 1033
Joined: Sat Feb 04, 2012 10:03 pm

Re: Tom Kerrigan's TSCP deriivative : Tang project

Post by gleperlier »

F. Bluemers wrote:
gleperlier wrote: I'm afraid that "working" on eval is not a trivial task.
There are costs (-elo) implementing ideas and then they should bring some +elo too.
Even with many engines exposing eval parameters,
not many people come with better parameters,testing is such a chore.Which also makes uci parameters a lot less interesting than they seem :P
With a certain nimzo version there was even a whole programming language to rewrite its eval,ofcouse all "experts" were invisible...
Yes I can see it. This is kind of "just for fun" idea.

Best regards,

Gab