Duck Chess

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Duck Chess

Post by hgm »

You could use connect.exe for this: start it as a server for a given engine on one machine, and use it as an engine on another.
rgrosz789
Posts: 121
Joined: Sat Dec 03, 2022 9:28 pm
Full name: Rick Groszkiewicz

Re: Duck Chess

Post by rgrosz789 »

Thank you - I will do some research this weekend.
Retired actuary and software developer. I love chess, coffee, wine and food
rgrosz789
Posts: 121
Joined: Sat Dec 03, 2022 9:28 pm
Full name: Rick Groszkiewicz

Re: Duck Chess

Post by rgrosz789 »

I tried using connect64.exe on my Windows computer to play against a Linux box. Here is what I used for winboard:
"connect-" -fcp "connect64.exe"

But it doesn't like duck chess:
"Variant duck not supported by connect64"
Retired actuary and software developer. I love chess, coffee, wine and food
rgrosz789
Posts: 121
Joined: Sat Dec 03, 2022 9:28 pm
Full name: Rick Groszkiewicz

Re: Duck Chess

Post by rgrosz789 »

On the Linux box, I used this in the terminal at /usr/games:
"connect -ec mayhemduck23 -ed /usr/games"
Retired actuary and software developer. I love chess, coffee, wine and food
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Duck Chess

Post by hgm »

When launching it as engine in WinBoard you would at least have to specify the I.P. address of the computer you want it to connect with. Otherwise it cannot possibly know where you run the engine. For port number and password both instances of connect.exe would use the same default, and if you run on your LAN there is no reason to specify something different for that.

Also here applies that in case of problems you should always try the engine command you use on the command line, and test whether it behaves like the engine (e.g. by typing 'uci' to it, and see what it replies).

Since I believe MayhemDuck to be UCI, you would need to run it through UCI2WB at on one end of the connection. E.g. by using the -fUCI argument on the WinBoard side.
rgrosz789
Posts: 121
Joined: Sat Dec 03, 2022 9:28 pm
Full name: Rick Groszkiewicz

Re: Duck Chess

Post by rgrosz789 »

hgm wrote: Tue Apr 25, 2023 10:01 am Also here applies that in case of problems you should always try the engine command you use on the command line, and test whether it behaves like the engine (e.g. by typing 'uci' to it, and see what it replies).

Since I believe MayhemDuck to be UCI, you would need to run it through UCI2WB at on one end of the connection. E.g. by using the -fUCI argument on the WinBoard side.
I am using multiple PCs on the same local area network. It appears that connect does work ...

I tried typing UCI, but got no response from the connect program in linux. I could not figure out how to exit easily, other than closing the terminal window.

I tried using -fUCI with connect64.exe in WinBoard, but got the same error. The error message appears after I load the windows version of mayhemduck.
Retired actuary and software developer. I love chess, coffee, wine and food
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Duck Chess

Post by hgm »

But did you specify the IP address of the Linux machine that the instance on Windows should connect to?
rgrosz789
Posts: 121
Joined: Sat Dec 03, 2022 9:28 pm
Full name: Rick Groszkiewicz

Re: Duck Chess

Post by rgrosz789 »

I changed the parameters for connect64 to include the IP address of my Windows PC. But now it seems to hang after I start Winboard.

Here is the line to specify connect64 as an engine in winboard.ini:
"connect-UCI" -fUCI -fcp "connect64.exe -p 27015 -pw "Have fun, have WinBoard!" 10.0.0.30"

I created a short youtube video to show how I start connect on the linux PC, then on the Windows PC:
Retired actuary and software developer. I love chess, coffee, wine and food
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Duck Chess

Post by hgm »

Well, for one, the quoting is wrong: you cannot use quotes within quotes without escaping those with a backslash. (Or use a different type of quotes.)

"connect-UCI" -fUCI -fcp "connect64.exe -p 27015 -pw "Have fun, have WinBoard!" 10.0.0.30"

would be interpreted as

"connect-UCI"
-fUCI
-fcp "connect64.exe -p 27015 -pw "
Have
fun,
have
WinBoard!
" 10.0.0.30"

where the engine command ends at -pw, and WinBoard would think everything from 'Have' on would be names of game files. Correct ways to dpecify this engine command would be

"connect-UCI" -fUCI -fcp "connect64.exe -p 27015 -pw \"Have fun, have WinBoard!\" 10.0.0.30"
"connect-UCI" -fUCI -fcp 'connect64.exe -p 27015 -pw "Have fun, have WinBoard!" 10.0.0.30'
"connect-UCI" -fUCI -fcp {connect64.exe -p 27015 -pw "Have fun, have WinBoard!" 10.0.0.30}

From what I understand you run WinBoard with this engine line on the Windows machine, and want to connect it to an engine on your Linux machine. So you would have to specify the IP address of the Linux machine here, not of the Windows machine.
rgrosz789
Posts: 121
Joined: Sat Dec 03, 2022 9:28 pm
Full name: Rick Groszkiewicz

Re: Duck Chess

Post by rgrosz789 »

I verified that the two computers can ping each other across the network.

I corrected the connect64.exe line in WinBoard as you suggested. And I put in the IP address for the linux PC.

I load connect64 and another engine, then change mode to two machines. Winboard shows "Starting second chess program", but no move is ever made by the linux PC.
Retired actuary and software developer. I love chess, coffee, wine and food