UCI wrapper?
Moderators: hgm, Rebel, chrisw
-
- Posts: 140
- Joined: Wed Jun 03, 2020 6:46 am
- Full name: Kurt Lanc
UCI wrapper?
I want to start a UCI engine with parameters set to certain values, e.g. read from a "profile file". I don't want to leave this to a GUI. The reason is that I'm using several different systems and it's annoying integrating all the options again and again and again. Is there anything like that? Maybe one could pipe options on start via a bash script? I could also imagine writing a Python wrapper for this but I would like to save some time. Anyone any ideas? I'm on macOS/Linux.
-
- Posts: 2488
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: UCI wrapper?
One of the reasons why UCI took off back then was the INI file hell that Winboard engines suffered from. The usual use case is that the user has one system and several engines, and then it's pretty bad to fudge around with all of them.
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 140
- Joined: Wed Jun 03, 2020 6:46 am
- Full name: Kurt Lanc
Re: UCI wrapper?
Sure, but I mean this scenario certainly exists, just think of fixing an engine state for research and verifiability. I could definitely write a Python wrapper using python-chess but it will take a few days of work. So, I'm wondering whether anyone has done this already or has another—maybe simpler—solution.
-
- Posts: 50
- Joined: Thu Oct 15, 2020 10:19 am
- Full name: ghostway
Re: UCI wrapper?
I write an mcts python-c chess engine. so I have written a uci wrapper for it. there are parameters like a book, network type and more. I can give you the code or if you want to I can modify it for you. its in python. and a bash or batch code is really a thing of a day of work. (or you can make the script run the python one)
-
- Posts: 2488
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: UCI wrapper?
I'm using c-chess-cli for engine testing, so no GUI at all. I write up the program call including the engine config (via CLI arguments) one time, store that in a text file, and copy/paste it into the terminal as command. Works under Linux and macOS: https://github.com/lucasart/c-chess-cli/
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 50
- Joined: Thu Oct 15, 2020 10:19 am
- Full name: ghostway
Re: UCI wrapper?
oh cutechess-cli is a good idea! and with unix-like system its also easy to setup. not like windowsRas wrote: ↑Fri Nov 13, 2020 9:32 amI'm using c-chess-cli for engine testing, so no GUI at all. I write up the program call including the engine config (via CLI arguments) one time, store that in a text file, and copy/paste it into the terminal as command. Works under Linux and macOS: https://github.com/lucasart/c-chess-cli/
-
- Posts: 2488
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: UCI wrapper?
Yeah, cutechess-cli is also popular, though I like c-chess-cli because it doesn't have dependencies.
Exactly. Both cutechess-cli and c-chess-cli wrap the engine options and forward them to the engine.and with unix-like system its also easy to setup. not like windows
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 27808
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: UCI wrapper?
Isn't this exactly what Polyglot does? When called without arguments it would read the engine filename, and the settings for all te parameters from a polyglot.ini file in the current directory, and start the engine with those parameters.KLc wrote: ↑Fri Nov 13, 2020 7:45 am I want to start a UCI engine with parameters set to certain values, e.g. read from a "profile file". I don't want to leave this to a GUI. The reason is that I'm using several different systems and it's annoying integrating all the options again and again and again. Is there anything like that? Maybe one could pipe options on start via a bash script? I could also imagine writing a Python wrapper for this but I would like to save some time. Anyone any ideas? I'm on macOS/Linux.
-
- Posts: 140
- Joined: Wed Jun 03, 2020 6:46 am
- Full name: Kurt Lanc
Re: UCI wrapper?
Thanks for the replies. 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.
I'm not sure about Polyglot. This is an xboard/winboard wrapper to UCI if I understand correctly. But I already have UCI engines. I just want to conveniently supply them with the options.
I'm not sure about Polyglot. This is an xboard/winboard wrapper to UCI if I understand correctly. But I already have UCI engines. I just want to conveniently supply them with the options.
-
- Posts: 27808
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: UCI wrapper?
Polyglot is a wrapper for UCI engines, which can either make them look like an XBoard engine or a UCI engine with altered default settings and an opening book.