ZCT 3.2442 by Zach Wegner - JA Windows builds available

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
geots
Posts: 4790
Joined: Sat Mar 11, 2006 12:42 am

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

Post by geots »

Zach Wegner wrote:OK, that's a bug with the hash/PV extension that was just added the other day. I hadn't played any games with it, and barely tested it, so no surprise there.

I'll probably fix the bug later tonight, but a workaround for now is to put "notation coord" in ZCT.ini. ZCT won't do the PV extensions in coordinate mode, but the PVs will look ugly.

That's probably what happened in the games Will Singleton posted as well. What happens is that, ZCT checks if the game is over as it prints out the PV, and it was setting the game_result variable incorrectly if the game ended in the PV, and then sending the result...

I was surprised that there were problems in XBoard mode, when I thought it was all debugged. I think the above work around should solve everything though.

I will bet that it wont solve the problem that it still wont load in chessbase as a UCI engine :cry:
User avatar
Zach Wegner
Posts: 1922
Joined: Thu Mar 09, 2006 12:51 am
Location: Earth

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

Post by Zach Wegner »

geots wrote:I will bet that it wont solve the problem that it still wont load in chessbase as a UCI engine :cry:
UCI support is not ready, really. I wouldn't be surprised if it could play a game in some limited circumstances, but I doubt it. I haven't worked much on UCI support; I don't even have a UCI interface to use it with. So if you can grab any logfiles and forward them to me, that would be nice.

And I also just committed the bugfixed version that shouldn't give any early result announcements. I also incorporated Jim's ponder-on-Windows fix.
User avatar
geots
Posts: 4790
Joined: Sat Mar 11, 2006 12:42 am

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

Post by geots »

Zach Wegner wrote:
geots wrote:I will bet that it wont solve the problem that it still wont load in chessbase as a UCI engine :cry:
UCI support is not ready, really. I wouldn't be surprised if it could play a game in some limited circumstances, but I doubt it. I haven't worked much on UCI support; I don't even have a UCI interface to use it with. So if you can grab any logfiles and forward them to me, that would be nice.

And I also just committed the bugfixed version that shouldn't give any early result announcements. I also incorporated Jim's ponder-on-Windows fix.

Zach, where would i get any logfiles that might help you with the UCI problem when i cant get it to load as a UCI engine to create any logfiles?
Sort of a catch-22 i guess.
Tony Thomas

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

Post by Tony Thomas »

George, why cant you just use arena instead??
User avatar
Jim Ablett
Posts: 1401
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

Post by Jim Ablett »

geots wrote:
Zach Wegner wrote:OK, that's a bug with the hash/PV extension that was just added the other day. I hadn't played any games with it, and barely tested it, so no surprise there.

I'll probably fix the bug later tonight, but a workaround for now is to put "notation coord" in ZCT.ini. ZCT won't do the PV extensions in coordinate mode, but the PVs will look ugly.

That's probably what happened in the games Will Singleton posted as well. What happens is that, ZCT checks if the game is over as it prints out the PV, and it was setting the game_result variable incorrectly if the game ended in the PV, and then sending the result...

I was surprised that there were problems in XBoard mode, when I thought it was all debugged. I think the above work around should solve everything though.

I will bet that it wont solve the problem that it still wont load in chessbase as a UCI engine :cry:

Hi George,

The problem with loading in Chessbase comes about because ZCT is joint uci/winboard protocol and when it first loads it is actually neither, it's neutral and Chessbase doesn't like it. I compiled a version which has uci as default and it load and runs ok, but the uci support is still buggy with regard to castling. As soon as opponent castles it sends illegal move.
I tried it the other way using winboard as default + wb2uci but it didn't work either. I'm sure Zach will this problem will be fixed in due course.

regards,
Jim.
User avatar
Zach Wegner
Posts: 1922
Joined: Thu Mar 09, 2006 12:51 am
Location: Earth

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

Post by Zach Wegner »

Jim Ablett wrote: Hi George,

The problem with loading in Chessbase comes about because ZCT is joint uci/winboard protocol and when it first loads it is actually neither, it's neutral and Chessbase doesn't like it. I compiled a version which has uci as default and it load and runs ok, but the uci support is still buggy with regard to castling. As soon as opponent castles it sends illegal move.
I tried it the other way using winboard as default + wb2uci but it didn't work either. I'm sure Zach will this problem will be fixed in due course.

regards,
Jim.
Hello everyone,

I think I have all the problems fixed now. The castling bug had a strange source--line 101 in input.c was comparing with '3' instead of '1', which meant that any move to the first two ranks was rejected. How funny...

The XBoard problems were related to the check_result stuff. That function was a pain, but it should be easier to handle now (doesn't rely on being at game level).

So I think UCI and XBoard should work reasonably well now, though I still haven't ever played a full game in UCI.

I'm not sure how I'm going to get ZCT working as a pure UCI engine, because I think the problem is that it prints out some basic information before it ever gets "uci" as input. I'll think about it, maybe change it after I'm sure that that's the problem.

The new release is 0.3.2443 to prevent confusion.

Thanks everyone...
Gandalf

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

Post by Gandalf »

Zach Wegner wrote:I'm not sure how I'm going to get ZCT working as a pure UCI engine, because I think the problem is that it prints out some basic information before it ever gets "uci" as input. I'll think about it, maybe change it after I'm sure that that's the problem.
I don't think so, since many engines such as Fruit/Naum/Spike do this. My basically unsubstantiated guess would be that it has something to do with the id tag output not being flushed in time. By editing the binary a bit I got the author line to be detected by Chessbase, but couldn't get the name tag to work. Have you tried using two separate print() calls, one for name and one for author?
User avatar
geots
Posts: 4790
Joined: Sat Mar 11, 2006 12:42 am

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

Post by geots »

Jim Ablett wrote:
geots wrote:
Zach Wegner wrote:OK, that's a bug with the hash/PV extension that was just added the other day. I hadn't played any games with it, and barely tested it, so no surprise there.

I'll probably fix the bug later tonight, but a workaround for now is to put "notation coord" in ZCT.ini. ZCT won't do the PV extensions in coordinate mode, but the PVs will look ugly.

That's probably what happened in the games Will Singleton posted as well. What happens is that, ZCT checks if the game is over as it prints out the PV, and it was setting the game_result variable incorrectly if the game ended in the PV, and then sending the result...

I was surprised that there were problems in XBoard mode, when I thought it was all debugged. I think the above work around should solve everything though.

I will bet that it wont solve the problem that it still wont load in chessbase as a UCI engine :cry:

Hi George,

The problem with loading in Chessbase comes about because ZCT is joint uci/winboard protocol and when it first loads it is actually neither, it's neutral and Chessbase doesn't like it. I compiled a version which has uci as default and it load and runs ok, but the uci support is still buggy with regard to castling. As soon as opponent castles it sends illegal move.
I tried it the other way using winboard as default + wb2uci but it didn't work either. I'm sure Zach will this problem will be fixed in due course.

regards,
Jim.

If you dont mind, Jim- when the version is, let's say "unbuggy"- because i cant think of a better word- please alert me to the zip that doesnt have the castling problem and so forth that you have that will load as UCI> But no use me fooling with it till all that is straightened out. Im sure you have my email address- if not- geotsp8@aol.com Keep me informed if you dont mind. Im looking forward to this engine.

Best,

George
User avatar
Jim Ablett
Posts: 1401
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

Post by Jim Ablett »

Zach Wegner wrote:
Jim Ablett wrote: Hi George,

The problem with loading in Chessbase comes about because ZCT is joint uci/winboard protocol and when it first loads it is actually neither, it's neutral and Chessbase doesn't like it. I compiled a version which has uci as default and it load and runs ok, but the uci support is still buggy with regard to castling. As soon as opponent castles it sends illegal move.
I tried it the other way using winboard as default + wb2uci but it didn't work either. I'm sure Zach will this problem will be fixed in due course.

regards,
Jim.
Hello everyone,

I think I have all the problems fixed now. The castling bug had a strange source--line 101 in input.c was comparing with '3' instead of '1', which meant that any move to the first two ranks was rejected. How funny...

The XBoard problems were related to the check_result stuff. That function was a pain, but it should be easier to handle now (doesn't rely on being at game level).

So I think UCI and XBoard should work reasonably well now, though I still haven't ever played a full game in UCI.

I'm not sure how I'm going to get ZCT working as a pure UCI engine, because I think the problem is that it prints out some basic information before it ever gets "uci" as input. I'll think about it, maybe change it after I'm sure that that's the problem.

The new release is 0.3.2443 to prevent confusion.

Thanks everyone...
Hi Zach,

There is a problem in 'cmd.c' . I see you made some changes here, but it causes the windows build to crash when run >

Code: Select all

char *strsep(char **string, const char *delim)
{
	char *str;
	char *token;
	char *d;
	char c;
	char t;

	if (string == NULL)
		return NULL;
	token = str = *string;
	while (TRUE)
	{
		// Take the next char in the string and see if it matches something in delim. 
		c = *str++;
		d = delim;
		do
		{
			// look at the next char in delim 
			if ((t = *d++) == c)
			{
				if (c == '\0')
					str = NULL;
				else
					*(str - 1) = '\0';
				*string = str;
				return token;
			}
		} while (t != '\0');
	}
}
Old one doesn't cause a crash >

Code: Select all

char *strsep(char **stringp, const char *delim)
{
    register char *s;
    register const char *spanp;
    register int c, sc;
    char *tok;

    if ((s = *stringp) == NULL)
    	return (NULL);
	for (tok = s;;) {
    	c = *s++;
        spanp = delim;
        do {
        	if ((sc = *spanp++) == c) {
            	if (c == 0)
                    s = NULL;
                else
                    s[-1] = 0;
                *stringp = s;
                return (tok);
         	}
        } while (sc != 0);
    }
}
Jim.
User avatar
Jim Ablett
Posts: 1401
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

Post by Jim Ablett »

Latest windows builds are up on my homepage. (uci only chessbase exes included)

Winboard mode working ok - no problems found so far.
Uci mode much better. but some problems I observed during testing.

1. Occasionally engine choses to play opponents move instead of it's own.
2. Some time control problems. Over 40 moves engine started playing moves instantly.

These are the changes made to get ZCT to work with ChessBase.

1. Added Adam's uci id fix.

Code: Select all

void cmd_uci(void)
{
	protocol = UCI;
	notation = COORDINATE;
	initialize_cmds();
	print("id name ZCT%s\n", ZCT_VERSION);
	print("id author Zach Wegner\n");      // added Adam's uci id fix for ChessBase - JA
	print("uciok\n");
	
}
2. Forced ZCT to play in uci mode.

Code: Select all

	while (TRUE)
	{
		protocol = UCI; // force to play in uci mode - JA
                generate_root_moves();
		check_result(TRUE);
		if (protocol != ANALYSIS && protocol != ANALYSIS_X && protocol != DEBUG)
			update_clocks();
		if (ping)
		{
			if (protocol == XBOARD)
				print("pong %i\n", ping);
			else
				print("readyok\n");
			ping = 0;
		}
		if ((engine_state == DEBUGGING || protocol == ANALYSIS || board.side_tm == zct_side) && !game_over)
		{
Jim.