Editing tscp

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Rebel
Posts: 6997
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Editing tscp

Post by Rebel »

Dann Corbit wrote:IMO, fixing TSCP is really barking up the wrong tree.

It has lots of global variables and is really not a terribly good place for a beginner to start.

This thing, for instance:
http://www.3dkingdoms.com/chess/sam/samchess.html
is a lot better.

Or maybe this one:
http://kirr.homeunix.org/chess/engines/ ... ess%2026g/

TSCP?
Just say no.
I found TSCP easy to understand, comments really help a lot, I miss that in the 2 ones you listed.
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Editing tscp

Post by hgm »

I always had mixed feelings about TSCP. It does this very strange forth-and-back switching between a 64-square board and a 0x88 board. That isn't really what I would expect from a simple program.

This is why I started writing 'Simple', (before I learned that name was already taken). To provide a very basic code with no complications for minor speed gains, and lots of comment.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

The second match result

Post by sje »

The second match result is 782-114-103 (+281 elo) in favor of Symbolic. For reasons unknown, xboard ran only 999 games instead of the requested 1,000 and reported the final result with an added spurious draw as 782-114-104.

The 999 game gzip PGN file resides at https://dl.dropboxusercontent.com/u/316 ... 924.pgn.gz
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: The second match result

Post by hgm »

Well, XBoard only keeps track of wins for each engine, and calculates draws as matchGames - wins1 - wins2. So 'unfinished' games would also show up in the draw count. Games without moves are not stored, so it could be that in one of the games got lost that way. You should be able to see that in the 'round' tag.

I think that TSCP doesn't support 'ping', so it would be susceptible to the problem that a move from a previous game is only given when the new game has already started (because the opponent in the mean time resigned), and is flagged as an illegal move there. (I would expect this to become a loss,not an unfinished game, though.)
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: The second match result

Post by sje »

hgm wrote:Well, XBoard only keeps track of wins for each engine, and calculates draws as matchGames - wins1 - wins2. So 'unfinished' games would also show up in the draw count. Games without moves are not stored, so it could be that in one of the games got lost that way. You should be able to see that in the 'round' tag.

I think that TSCP doesn't support 'ping', so it would be susceptible to the problem that a move from a previous game is only given when the new game has already started (because the opponent in the mean time resigned), and is flagged as an illegal move there. (I would expect this to become a loss,not an unfinished game, though.)
The PGN file I posted was written by Symbolic, not xboard. When the match started, the draw appeared in the xboard display header tally before the first game started.

Symbolic's gzip colorized log file for the match can be found at: https://dl.dropboxusercontent.com/u/316 ... 924.log.gz
User avatar
Rebel
Posts: 6997
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Editing tscp

Post by Rebel »

hgm wrote:I always had mixed feelings about TSCP. It does this very strange forth-and-back switching between a 64-square board and a 0x88 board. That isn't really what I would expect from a simple program.

This is why I started writing 'Simple', (before I learned that name was already taken). To provide a very basic code with no complications for minor speed gains, and lots of comment.
Where can I see Simple?
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Editing tscp

Post by hgm »

Although it isn't really finished yet, I already pushed it to my on-line git repository ( http://hgm.nubati.net/cgi-bin/gitweb.cgi ), because I needed it as an example in a discussion about IID. The version there does already play, and beats Fairy-Max, but still contains some already-identified bugs. (One of which that it does not increase alpha to eval during stand pat.) It still loses to Joker.
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: The second match result

Post by hgm »

sje wrote:The PGN file I posted was written by Symbolic, not xboard. When the match started, the draw appeared in the xboard display header tally before the first game started.
Well, so the first game must have been aborted before Symbolic got involved.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: The second match result

Post by sje »

hgm wrote:
sje wrote:The PGN file I posted was written by Symbolic, not xboard. When the match started, the draw appeared in the xboard display header tally before the first game started.
Well, so the first game must have been aborted before Symbolic got involved.
Maybe, but I don't see how as both programs are running locally. The xboard settings file with the match parameters was unchanged from before when it worked and it's working properly now in a new match.
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: The second match result

Post by hgm »

Well, I guess we will never know. As you point out, normally this does not happen, so it is not due to an obvious XBoard bug. You can get unfinished games by hitting the 'New game' menu item when a match is in progress. But you would have to be very quick to do that before Symbolic gets to move at all.

I also don't know what exactly you are doing, which makes it hard to say something sensible about this.