UCI wrapper?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

KLc
Posts: 140
Joined: Wed Jun 03, 2020 6:46 am
Full name: Kurt Lanc

Re: UCI wrapper?

Post by KLc »

Dammit, polyglot is indeed exactly what I was looking for! I always thought it's just a winboard adapter. Thank you very much!

I got the Polyglot sources from https://github.com/flok99/polyglot.
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: UCI wrapper?

Post by Ras »

KLc wrote: Fri Nov 13, 2020 2:47 pmI just want to conveniently supply them with the options.
For that kind of test, I have a text file with all the options line by line. I just copy/paste that into the terminal window where the engine is started. Useful e.g. for quick tests to see whether a certain change makes search faster or not.
Rasmus Althoff
https://www.ct800.net
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: UCI wrapper?

Post by hgm »

You could also take the Polyglot 2.x sources from my git repository ('learn' branch): http://hgm.nubati.net/cgi-bin/gitweb.cg ... eads/learn .
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: UCI wrapper?

Post by lucasart »

KLc wrote: Fri Nov 13, 2020 2:47 pm I had a look at cutechess-cli and c-chess-cli. They basically do what I want but they require two engines and are designed to start a match. That's not what I want. I just want one engine and this should wait for input—like if I would just start the engine from the command line.
Of course, these tools are not meant to be interactive. If you want to *interact* with an engine, you need a GUI. But if you are indeed programming a new engine, you should not start with a GUI. You should start by using the command line, and interacting manually (typing UCI commands) with your engine. This forces you to understand what you are doing, without mixing things up with intermediary layers.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
OfekShochat
Posts: 50
Joined: Thu Oct 15, 2020 10:19 am
Full name: ghostway

Re: UCI wrapper?

Post by OfekShochat »

isnt that just default parameters? if it is, you can just set them (probably they arent because you know)
KLc
Posts: 140
Joined: Wed Jun 03, 2020 6:46 am
Full name: Kurt Lanc

Re: UCI wrapper?

Post by KLc »

hgm wrote: Fri Nov 13, 2020 4:53 pm You could also take the Polyglot 2.x sources from my git repository ('learn' branch): http://hgm.nubati.net/cgi-bin/gitweb.cg ... eads/learn .
Thanks. Is this also on Github so that I can fork this? I noticed an issue with EngineName. This is not set at all. I think the code in main.c in lines 468 to 475 doesn't make sense. Maybe I misunderstand something but I changed from

Code: Select all

option_set_default(Option,"EngineName",Uci->name);

        // get engine name from engine if not supplied in config file or on
        // the command line

    if (my_string_equal(option_get_string(Option,"EngineName"),"<empty>")) {
        option_set(Option,"EngineName",Uci->name);
    }
to

Code: Select all

if (my_string_equal(option_get_string(Option,"EngineName"),"<empty>")) {
			option_set_default(Option,"EngineName",Uci->name);
			option_set(Option,"EngineName",Uci->name);
		} else {
			my_string_set(&Uci->name,option_get_string(Option,"EngineName"));
		}
and now this seems to work. I also have some troubles when using EnginePath. I'll look into this.
KLc
Posts: 140
Joined: Wed Jun 03, 2020 6:46 am
Full name: Kurt Lanc

Re: UCI wrapper?

Post by KLc »

lucasart wrote: Sat Nov 14, 2020 3:18 am Of course, these tools are not meant to be interactive. If you want to *interact* with an engine, you need a GUI. But if you are indeed programming a new engine, you should not start with a GUI. You should start by using the command line, and interacting manually (typing UCI commands) with your engine. This forces you to understand what you are doing, without mixing things up with intermediary layers.
No, I want to play them myself (dumbed down) and also use them for analysis with other programs and scripts, and I always want the same engine configuration. Polyglot is exactly what I needed.
OfekShochat
Posts: 50
Joined: Thu Oct 15, 2020 10:19 am
Full name: ghostway

Re: UCI wrapper?

Post by OfekShochat »

only saying. cutechess-cli wasnt the option I intended for. it is libcutechess