UCI wrapper?

Discussion of chess software programming and technical issues.

Moderators: Harvey Williamson, Dann Corbit, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
KLc
Posts: 14
Joined: Wed Jun 03, 2020 4:46 am
Full name: Kurt Lanc

Re: UCI wrapper?

Post by KLc » Fri Nov 13, 2020 2:02 pm

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: 1620
Joined: Tue Aug 30, 2016 6:19 pm
Full name: Rasmus Althoff
Contact:

Re: UCI wrapper?

Post by Ras » Fri Nov 13, 2020 3:44 pm

KLc wrote:
Fri Nov 13, 2020 1:47 pm
I 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: 25424
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: UCI wrapper?

Post by hgm » Fri Nov 13, 2020 3: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 .
Get rid of the shit: vote for SHID!

User avatar
lucasart
Posts: 3168
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: UCI wrapper?

Post by lucasart » Sat Nov 14, 2020 2:18 am

KLc wrote:
Fri Nov 13, 2020 1: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: 20
Joined: Thu Oct 15, 2020 8:19 am
Full name: Ofek Shochat

Re: UCI wrapper?

Post by OfekShochat » Sat Nov 14, 2020 5:24 am

isnt that just default parameters? if it is, you can just set them (probably they arent because you know)

KLc
Posts: 14
Joined: Wed Jun 03, 2020 4:46 am
Full name: Kurt Lanc

Re: UCI wrapper?

Post by KLc » Sat Nov 14, 2020 7:46 am

hgm wrote:
Fri Nov 13, 2020 3: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: 14
Joined: Wed Jun 03, 2020 4:46 am
Full name: Kurt Lanc

Re: UCI wrapper?

Post by KLc » Sat Nov 14, 2020 7:48 am

lucasart wrote:
Sat Nov 14, 2020 2: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: 20
Joined: Thu Oct 15, 2020 8:19 am
Full name: Ofek Shochat

Re: UCI wrapper?

Post by OfekShochat » Mon Nov 16, 2020 12:02 pm

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

Post Reply