Using Linux To Test Engines

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Cheney
Posts: 104
Joined: Thu Sep 27, 2012 2:24 am

Using Linux To Test Engines

Post by Cheney »

Hi,

I would like to try to get back into working on my chess engine and I was thinking about using Linux to test it out against other engines (needless to write, my engine is Windows based and I have little Linux experience).

I use cutechess-cli in windows and am somewhat familiar with it. I did get it to install/run in linux. I do have Wine installed along with a few other chess engines, all seem to work under Wine. What I wonder about, and need to ask for help with, is how to get cutechess-cli to execute these windows engines?

I did try a bash script that started wine <engine.exe>, which works on its own, but does not work when referenced by cutechess-cli.

Can someone provide a nudge in the correct direction? Maybe this idea of using Linux to test windows engines is not ideal?

Thank you :)
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Using Linux To Test Engines

Post by jdart »

You don't need a batch script. Best bet is to make yourself an engines.json file and put the command to start the engine into that. So the "command" part of the engine config would be something like "wine engine.exe".

Of course if the engines you are matching have Linux executables (quite a few do) you wouldn't need to run them under Wine.

--Jon
User avatar
xr_a_y
Posts: 1871
Joined: Sat Nov 25, 2017 2:28 pm
Location: France

Re: Using Linux To Test Engines

Post by xr_a_y »

I more or less always use linux for developing and testing. Many engines have linux executable, so no need for wine. Just use native linux cutechess and linux engines.
JohnWoe
Posts: 491
Joined: Sat Mar 02, 2013 11:31 pm

Re: Using Linux To Test Engines

Post by JohnWoe »

Just like python engine "python engine.py" -> "wine engine.exe"

But I would compile those engines in Linux so they run native. Instead using some bridge between.
Cheney
Posts: 104
Joined: Thu Sep 27, 2012 2:24 am

Re: Using Linux To Test Engines

Post by Cheney »

Thanks everyone :)

The Json file, now I understand what that is for :) and it worked, thanks Jon! The catch, so far, is my engine does not handle the clock correctly now. Weird, as when I just run it straight from the terminal cli (wine myengine.exe) and play it that way, no issues, it only has the issue when cutechess launches it. It cuts, let's say, 6 seconds to under a second.

I have always thought about making the code portable; I did try at one time but had some issues. I know the best bet is to make it portable so it runs on both windows and Linux. I think I'll revisit this.

I have had some difficulty finding engines in the past to run on Windows. I always chose ones that were around the same elo as my engine (~2100 to ~2200), but, the engines I did choose I do not recall seeing Linux binaries. I'll have to look for a link to use to locate Linux engines. I know I could look at GitHub for open source but I also know I have had issues figuring out compiling those in linux once downloaded (obviously, I need to ramp up my Linux skills).

Thanks again for all the helpful advise and guidance :)
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Using Linux To Test Engines

Post by jdart »

Several Linux-compatible engines including Crafty, Arasan, Stockfish have a variable strength level. So you could adjust those to the rating range you need.

--Jon