engine options not settable

137 views
Skip to first unread message

Lutz

unread,
Apr 8, 2019, 2:09:56 PM4/8/19
to PicoChess
Hi,

in the past past I have learned that there is an easy way to set options like hash size (quote AI):

"Basically if you place a [DEFAULT] section in the Engine.uci file with your required parameters in front of the Levels, then these are used in all levels.
My ‘a-stockf.uci’ now looks like this:

[DEFAULT]
Hash = 250
Threads = 3
..."

or you created a file "engines.uci" in the same folder with for example

[uci-option]
Hash = 256
Threads = 4


But both ways are no longer working for me in picochess 0.9I.
If I start picochess and then a-stockf (by typing "./a-stockf" in '/opt/picochess/engines/armv7l') and test it with
"go movetime 20000"
(e.g. computing for 20s) then there is obviously only 1 thread and very few hash (probably only 16MB) used.


Is there a way to switch it again to more threads and hash right from the start?

I really appreciate any help
Lutz

Al

unread,
Apr 8, 2019, 2:38:51 PM4/8/19
to PicoChess
Hi Lutz,

The enginename.uci option still works within picochess, however if you start the engine manually via ./enginename the uci options need to be entered:

i.e:

./a-stockf
uci
setoption name Threads value 4
setoption name Hash value 192
setoption name SyzygyPath value /opt/picochess/tablebases/syzygy
go infinite etc

Only picochess takes notice of the uci file

Am out at the moment, ask if you want more detail.

Al

Henri Spijkerman

unread,
Apr 9, 2019, 1:46:38 PM4/9/19
to PicoChess
I'm confused about the options of engines in 'engines.ini'. Many engines have a lot of options that can be activated or altered, yet I have doubts if they work at all.
I've tested the amount of hashtables in SF8 with 0, 4 and 16 mb, but saw not the slightest difference. I activated tablebases for a couple of engines but have no clue how to find out if it is working at all. In the posts above there is talk about a file 'engines.uci'. Does that have to with tweaking the engine instead?

Any help would be great!
Henri


Al

unread,
Apr 9, 2019, 2:24:37 PM4/9/19
to PicoChess
Hi Henri,

I’m out at the moment but here’s what I know:

engines.uci used to control all engine options, it doesn’t any more.
engines.ini only shows the options available for each engine.

The only way you can now control the engine options is in the ‘enginename.uci’ file, i.e a-stockf.uci

The uci options need to be in this file. Easy if the engine has levels, if it doesn’t then other ways are possible.

I will explain more tomorrow when I’m home.

Hopefully this helps,

Al.

Scally

unread,
Apr 10, 2019, 6:48:27 AM4/10/19
to PicoChess
Hi Henri,

When ./sudo python3 ./build/engines.py is run in /opt/picochess any engines that support levels will have an associated .uci file built and file ./opt/picochess/engines/armv7l/engines.ini is also built. All available uci options are listed in this file, but you can’t activate them from here. You can only turn on the required options in the associated enginename.uci file also found in /opt/picochess/engines/armv7l

This is easy if the uci file already exists as in those engines with levels, but not so easy for those engines that don’t support levels.

First let’s look at those where a uci file already exists. Taking stockfish as an example, files a-stockf and a-stockf.uci can be found in /opt/picochess/engines/armv7l. a-stockf is the engine binary and a-stockf.uci contains the uci commands to control levels 0-20 for stockfish. Left as is, stockfish will run with the default settings, using 1 core and as I found out is not good at time control in short games.

Here’s the default uci file:

[Level@00]
Skill Level = 0

[Level@01]
Skill Level = 1

[Level@02]
Skill Level = 2

[Level@03]
Skill Level = 3

Down to level 20...

[Level@20
Skill Level = 20

Here’s my a-stockfish.uci:

[DEFAULT]
Hash = 192
Threads = 3
SyzygyPath = /opt/picochess/tablebases/syzygy
Slow Mover = 33
Move Overhead = 2000

[Level@00]
Skill Level = 0

[Level@01]
Skill Level = 1

[Level@02]
Skill Level = 2

[Level@03]
Skill Level = 3

Down to level 20 ...

[Level@20]
Skill Level = 20
Threads = 4

As you can see, the engine uses 3 Threads (cores) on all levels except level 20 which uses 4 cores. All levels use the other parameters, which prevent the engine losing on time, allocate 192 mb hash & use the Picochess endgame tablebases.

Now let’s add some parameters to an engine without levels. Taking lc0v0210 as an example, I manually built a uci file:

Al@PicoChess:/opt/picochess/engines/armv7l $ cat lc0v0210.uci
[DEFAULT]
SyzygyPath = /opt/picochess/tablebases/syzygy
MinibatchSize = 1
MaxPrefetch = 00
SmartPruningFactor = 5
Slowmover = 1.2
MoveOverheadMs = 1000
MaxCollisionVisits = 1

[1 Core]
Threads = 1

[2 Cores]
Threads = 2

[3 Cores]
Threads = 3

[4 Cores]
Threads = 4

So as you can see with the [DEFAULT] at the top, all sorts of uci parameters can be activated or values changed. Here the parameters help with Lc0 running on a low CPU.
If I left just these commands here, picochess would freeze, it expects some sort of levels so I introduced the cores as the levels, so you can play Lc0 with 1-4 cores. These are selectable in the menus or with the spare black queen on the 5th rank.

All the supported uci parameters for each engine can be seen by browsing the ‘/opt/picochess/engines/armv7l/engines.ini’ file.

I hope this helps,

Al.

Marco Baiocco

unread,
Apr 10, 2019, 11:09:52 AM4/10/19
to pico...@googlegroups.com
Hi Al,

I am away for work right now, I can't check myself. Is this parametrization embedded in the LC0 engine that you have distributed in the other thread? I am not sure if I ever saw a lc0v0210.uci  file... 

Thanks!
Marco Baiocco


--
You received this message because you are subscribed to the Google Groups "PicoChess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Henri Spijkerman

unread,
Apr 10, 2019, 11:22:19 AM4/10/19
to PicoChess
I'm learning a lot this way, thanks Al! I already fumbled about a bit with the amount of hashtables, and the function of the uci-files is becoming clear to me. I saw them before but did not know that they were actually txt-files....

About new uci files, can that be done simply by creating a uci-file (sudo nano) with the name of the engine and the uci-extension and adding the parameters? And am I correct that the parameters of an engine in engines.ini are just the possibilities to use in the uci-files and there is no need to touch them at all?

Greetings,
Henri

Scally

unread,
Apr 10, 2019, 11:40:41 AM4/10/19
to PicoChess
Hi Marco,

Yes, I was using Lc0 as an example, you can add this engine by following my instructions on ‘Lczero to Picochess’ thread.

Hi Henry,

Yes, you can add the file via sudo nano etc...
Yes, as I said earlier today, the engines.ini file shows the parameters that can be used for each engine, leave these alone. As you said just add the required parameters in the uci file, but they must start with [DEFAULT] and must have something selectable, levels, threads, or any parameter like hash size (if they are supported)

i.e.

[Small Hash]
Hash = 32

[Medium Hash]
Hash = 64

[Large Hash]
Hash = 128

Maximum 11 characters.


Cheers,

Al.

Marco Baiocco

unread,
Apr 10, 2019, 2:40:04 PM4/10/19
to pico...@googlegroups.com
Hi Al,

No no, I meant: in the prepackaged installment of Lc0, did you include the lco.uci init file?
But now I got back home and discovered it myself. :-)

Marco Baiocco


Mail priva di virus. www.avast.com

Reply all
Reply to author
Forward
0 new messages