bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No command line?


From: Chris Wilson
Subject: Re: No command line?
Date: Mon, 1 Mar 2021 18:12:01 -0800

Thanks to everyone for the information. Ok, I put the following lines into a file called matches01.txt:

---
set cache 1048576
set cube use on

set analysis movefilter 1  0  4 12 0.32
set analysis movefilter 2  0  4 12 0.32
set analysis movefilter 2  1  -1 0 0
set analysis movefilter 3  0  4 12 0.32
set analysis movefilter 3  1  -1 0 0
set analysis movefilter 3  2  0 4 0.08
set analysis movefilter 4  0  4 12 0.32
set analysis movefilter 4  1  -1 0 0
set analysis movefilter 4  2  0 4 0.08
set analysis movefilter 4  3  -1 0 0

set analysis cubedecision eval plies 4
set analysis chequerplay eval plies 4

set analysis luckanalysis plies 2
set analysis luckanalysis prune on

import mat 'G:\NewMatches\scoper10.mat'
analyze match
save match 'G:\NewMatches\Analyzed\scoper10.sgf'
relational add match
---

I then executed the command gnubg-cli.exe -c matches01.txt and I received an 'Invalid argument' error. (I'm on Windows 10) I removed the quotes from around the paths and the error went away. (The quotes were a requirement 15 years ago)  With respect to the "set analysis" parameters, are you saying to place them into a separate file and then issue a "load commands <parameters file>" from within the script?

BTW, what do I issue to set the threads to half the cores?

Chris

On Mon, Mar 1, 2021 at 2:26 PM Philippe Michel <philippe.michel7@free.fr> wrote:
On Mon, Mar 01, 2021 at 09:23:49PM +0100, Jim Segrave wrote:

> And I then run gnubg:
>
> /usr/local/bin/gnubg -t -c /tmp/4413280.cmd
>
> This works exactly as it should

On Windows the equivalent of gnubg -t is gnubg-cli.exe and the -c option
works juste the same :
%homepath%\AppData\Local\gnubg\gnubg-cli.exe -c cmdfile.cmd
or something similar.

> My advice for setting options like the luckanalysis ones would be to
> save your current .gnubg/gnubgautorc.rc file and replace it one with the
> settings you want here, then put the original back when you're done.
> Unfortunately, there's no command line option to specify the
> configuration file to use.

The gnubgautorc file is huge and full of irrelevant parameters. It would
probably be simpler to start the analysis command files with a "load
commands <parameters file>", the parameters file containing the kind of
commands Chris shows at the beginnig of his script.

FWIW, for 4 ply analysis I use:

set cube use on

set analysis movefilter 1  0  4 12 0.32
set analysis movefilter 2  0  4 12 0.32
set analysis movefilter 2  1  -1 0 0
set analysis movefilter 3  0  4 12 0.32
set analysis movefilter 3  1  -1 0 0
set analysis movefilter 3  2  0 4 0.08
set analysis movefilter 4  0  4 12 0.32
set analysis movefilter 4  1  -1 0 0
set analysis movefilter 4  2  0 4 0.08
set analysis movefilter 4  3  -1 0 0

set analysis cubedecision eval plies 4
set analysis chequerplay eval plies 4

set analysis luckanalysis plies 2
set analysis luckanalysis prune on


> On 3/1/21 2:55 PM, Chris Wilson wrote:
> > Years ago I would batch analyze my matches. I wrote a program that
> > created entries in the following format (minus the dashes):
> >
> > ---
> > set cache 65536
> > set Priority Idle
> > set analysis luckanalysis plies 2
> > set analysis luckanalysis reduced 2
> > set analysis luckanalysis cubeful on
> >
> > import mat 'G:\NewMatches\scoper10.mat'
> > analyze match
> > save match 'G:\NewMatches\Analyzed\scoper10.sgf'
> > relational add match

reduced is not used any more but everything else should still work.
Maybe set cache larger since current computers have plenty of memory, or
rely on the default value set from the GUI. Maybe set threads to some
value lower than the number of cores of your machine (half of them ?) if
you run that while doing something else.

> > I would like to accomplish the same task at
> > 4-ply as well as automate rollouts on some matches.

"Automating rollouts on a match" is tricky. There are commands to mark
moves or cube decsions to be rolled out later. That's fine from the GUI
or to roll out a list of positions with command files like:

set matchid cAm1ABAAGAAA
set board f/sAACDsdgsKAA
hint
cmark move set rollout 1 2
analyse rollout move
save position pos.sgf

or

set matchid cAmgABAAGAAA
set board //YAAEDtthsAAA
hint
cmark cube set rollout
analyse rollout cube
export position text pos.txt

But there is no easy way to select them automatically in a whole match.
A way to do this would be to analyse it at, say, 3 ply, and have commands
like:

cmark move set rollout analysed plies 3
cmark cube set rollout analysed plies 3
analyze rollout match

to roll out the errors and the decisions close enough for the move
filters to select them for 3 ply analysis.

alas, the first two don't exist... It may be possible to do this with
the python interface, or to add the above commands to gnubg.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]