UCI engines with fixed node count support!

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Dann Corbit, Harvey Williamson

Marc MP

Re: UCI engines with fixed node count support!

Post by Marc MP »

Edsel Apostol wrote:Hi Marc,

It would be great if you could send me the logfile of Twisted after you run that position, or maybe post it here. I don't have a GUI here that supports that so I couldn't test.

I initialize the movelist by the moves received through the "go searchmoves" if the engine received that command so if it worked in the first 13 plies that means it should work in plies above that as the movelist is only initialized in the beginning and it should not change.

I will try to review my code, maybe I overlook something.
Hi Edsel,

This time I asked Twisted to search for only Ba1 and Bf1 (same position). As you can see, Twisted overides the command and select dxe5 then Bh5+ and dxe5 back again:

Code: Select all

; 00:00:00.8  5.   Score: -0,52   depth: 8 dxe5 Nxe4 Qf4+ Kg8 Nxe4 Rxd1+ Bxd1 Bxe4 Qxe4 Rd8 

; 00:00:00.1  5.   Score: -0,21   depth: 9 dxe5 Nxe4 Qf4+ Kg8 Nxe4 Rxd1+ Bxd1 Bxe4 Qxe4 Rd8 Bc2 

; 00:00:00.5  5.   Score: -0,20   depth: 10 dxe5 Nxe4 Qf4+ Kg8 Nxe4 Rxd1+ Bxd1 Bxe4 Qxe4 Rd8 Qg4+ Kh8 g3 

; 00:00:00.5  5.   Score: -0,20   depth: 11 dxe5 Nxe4 Qf4+ Kg8 Nxe4 Rxd1+ Bxd1 Bxe4 Qxe4 Rd8 Qg4+ Kh8 Be2 Rd2 

; 00:00:01.1  5.   Score: -0,24   depth: 12 dxe5 Nxe4 Qf4+ Kg8 Nxe4 Rxd1+ Bxd1 Bxe4 Qxe4 Rd8 Qg4+ Kh8 Bf3 Rd2 Qxb4 

; 00:00:03.5  5.   Score: -0,19   depth: 12 Bh5+ Nxh5 Qxh5+ Kg8 Qxe5 Bd5 exd5 exd5 Re1 Qg7 Qe6+ Qf7 Qb6 Nc4 Nxc4 dxc4 Qxb4 

; 00:00:05.0  5.   Score: -0,34   depth: 13 Bh5+ Nxh5 Qxh5+ Kg8 Qxe5 Bd5 exd5 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analysis completed
Here is logfile.txt
Twisted Logic 20080620 by Edsel Apostol, Philippines
Use Universal Chess Interface commands
Beta Testers: John van Spijker, Audy Arandela, Tobias Lagemann, Michael Donnig

info string Hash is set to value 32
info string Pawn Hash is set to value 16
info string Ponder is set to value false
info string Transposition Table is set to value true
info string Null Move Pruning is set to value true
info string Null Move Verification is set to value true
info string Null Move Fail High is set to value true
info string Internal Iterative Deepening is set to value true
info string Delta Pruning is set to value true
info string Delta Pruning Solid is set to value false
info string Quiescence Check Depth is set to value 5
info string Zero Pruning is set to value true
info string Zero Pruning Base is set to value 3
info string Zero Pruning Threshold is set to value 120
info string Speculation is set to value true
info string Speculation Base is set to value 3
info string Speculation Level is set to value 5
info string Extended Speculation is set to value true
info string Extended Speculation Base is set to value 5
info string Extended Speculation Level is set to value 5
info string King Attacks Aggression Level is set to value 12
uci

id name Twisted Logic 20080620
id author Edsel Apostol, Philippines
option name Hash type spin default 32 min 1 max 4096
option name Pawn Hash type spin default 16 min 1 max 32
option name Ponder type check default false
option name Transposition Table type check default true
option name Null Move Pruning type check default true
option name Null Move Verification type check default true
option name Null Move Fail High type check default true
option name Internal Iterative Deepening type check default true
option name Delta Pruning type check default true
option name Delta Pruning Solid type check default false
option name Quiescence Check Depth type spin default 5 min 1 max 10
option name Zero Pruning type check default true
option name Zero Pruning Base type spin default 3 min 1 max 10
option name Zero Pruning Threshold type spin default 120 min 0 max 500
option name Speculation type check default true
option name Speculation Base type spin default 3 min 1 max 10
option name Speculation Level type spin default 5 min 1 max 15
option name Extended Speculation type check default true
option name Extended Speculation Base type spin default 5 min 1 max 10
option name Extended Speculation Level type spin default 5 min 1 max 15
option name King Attacks Aggression Level type spin default 12 min 0 max 25
uciok
setoption name Hash value 512

info string Hash is set to value 512
setoption name Pawn Hash value 20

info string Pawn Hash is set to value 20
setoption name Transposition Table value true

info string Transposition Table is set to value true
setoption name Null Move Pruning value true

info string Null Move Pruning is set to value true
setoption name Null Move Verification value true

info string Null Move Verification is set to value true
setoption name Null Move Fail High value true

info string Null Move Fail High is set to value true
setoption name Internal Iterative Deepening value true

info string Internal Iterative Deepening is set to value true
setoption name Delta Pruning value true

info string Delta Pruning is set to value true
setoption name Delta Pruning Solid value false

info string Delta Pruning Solid is set to value false
setoption name Quiescence Check Depth value 5

info string Quiescence Check Depth is set to value 5
setoption name Zero Pruning value true

info string Zero Pruning is set to value true
setoption name Zero Pruning Base value 3

info string Zero Pruning Base is set to value 3
setoption name Zero Pruning Threshold value 120

info string Zero Pruning Threshold is set to value 120
setoption name Speculation value true

info string Speculation is set to value true
setoption name Speculation Base value 3

info string Speculation Base is set to value 3
setoption name Speculation Level value 5

info string Speculation Level is set to value 5
setoption name Extended Speculation value true

info string Extended Speculation is set to value true
setoption name Extended Speculation Base value 5

info string Extended Speculation Base is set to value 5
setoption name Extended Speculation Level value 5

info string Extended Speculation Level is set to value 5
setoption name King Attacks Aggression Level value 12

info string King Attacks Aggression Level is set to value 12
isready

readyok
isready

readyok
ucinewgame

setoption name Ponder value true

info string Ponder is set to value true
setoption name MultiPV value 1

isready

readyok
ucinewgame

isready

readyok
position fen r2r2k1/qbp1bppp/p3pn2/n3N3/Pp1PP3/4Q3/1B1NBPPP/2RR2K1 w - - 0 1

isready

readyok
position fen r2r2k1/qbp1bppp/p3pn2/n3N3/Pp1PP3/4Q3/1B1NBPPP/2RR2K1 w - - 0 1 moves c1c7 e7d6 c7f7 d6e5 f7g7 g8g7 e3g5 g7f7

go movetime 180000 searchmoves e2f1 b2a1

info string Fixed time per move: 180000 ms
info string Search status is THINKING
info string Aborting search
bestmove d4e5 ponder f6e4

isready

readyok
position fen r2r2k1/qbp1bppp/p3pn2/n3N3/Pp1PP3/4Q3/1B1NBPPP/2RR2K1 w - - 0 1 moves c1c7 e7d6 c7f7 d6e5 f7g7 g8g7 e3g5 g7f7 f6e4

info string Illegal move: f6e4
go ponder

info string Search status is PONDERING
As you can see Twisted continues to ponder at the end of the 3min. I killed it from the task manager.

EDIT: Lokasoft has a 30-day trial for ChessPartner 5.4 if you are interested: http://www.lokasoft.com/chesspartner.htm
Uri Blass
Posts: 10102
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: UCI engines with fixed node count support!

Post by Uri Blass »

Bill Rogers wrote:Mr. Muller
As I had mentioned some programs will search deeper because of their quiensence searches. I regularly use TSCP and Minimax, to very simple program that are not rated very high as I test a lot of really weak engines.
On both of those programs during a Six Ply setting I have noticed that both will from time to time search as deep as 10 plys do to their quiensence extentins. Most of the time they only go 1 or 2 levels deeper, maybe 3 depending on how active or quiet the position might be.
As to why Joker when ordered or commanded to do a 12 ply search and then doesn't, I can't begin to answer that, in fact this is the first time that I have ever heard of a program ignoring a set perimiter like that. In you case you must be right but as I said I never heard of such a thing before now.
Bill
Most strong programs do pruning and extensions.
tscp does no pruning but tscp is a weak program relatively to other programs.

You certainly cannot compare strength of program by fixed depth search
because speed is part of the game.
and even if you want only to compare evaluation you need to have 2 programs with the same search algorithm for that purpose and usually programs are different.

If you want only to compare evaluation and not search then possible command brute force no extensions can be productive when this command mean that programs are not allowed to make extensions
or prunings.

Of course authors need to support this option in order to use it.
I think that it is still a problem because if you really make fixed depth with no extensions and no pruning and no qsearch then bonus for the side to move is going to change nothing(because the relative score of all positions remain the same) when practically bonus for the side to move may change things if you do extensions.

Uri
Edsel Apostol
Posts: 803
Joined: Mon Jul 17, 2006 5:53 am
Full name: Edsel Apostol

Re: UCI engines with fixed node count support!

Post by Edsel Apostol »

Thanks Marc.

There was indeed a bug and a stupid one on my part. When I rearranged my user interface code on the later versions I didn't notice that I clear the movelist just after it was being initialized.

I have fixed it now and it works. You can post your email here so that I could send you the latest Twisted Logic beta with the bug fix.
Marc MP

Re: UCI engines with fixed node count support!

Post by Marc MP »

Thank you for the quick fix! I pm'ed you my email address.
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: UCI engines with fixed node count support!

Post by hgm »

Bill Rogers wrote:As to why Joker when ordered or commanded to do a 12 ply search and then doesn't, I can't begin to answer that, in fact this is the first time that I have ever heard of a program ignoring a set perimiter like that.
Search depth is a completely meaningless notion for every program that does not do a fixed-depth search. And except the very weakest programs, no program uses fixed-depth search nowadays. Even if we ignore QS, the depth of the various branches in a strong programs varies about a factor 2. Some programs use the depth of the shortest lines as a measure, others that of the longest.

Telling a program to search 12 plies, is the same thing as telling a car driver to drive 20 mph in city traffic. Either he will ignore it, or he will never arive to its destination.