PV for console output problem

Code, algorithms, languages, construction...

PV for console output problem

Postby thevinenator » Fri Nov 25, 2016 10:37 pm

I'm working on displaying the PV after each iterative ply.
to do so, I walk the moves from the PV onto a a temporary board with the following stopping actions:

a TT entry was not found for the position
a TT entry was found but it wasn't an EXACT type
the move from the PV wasn't valid for the given position (more of a dumb programmer check)

this seems to work ok until i tried it on the Fine 70 position.
8/k7/3p4/p2P1p2/P2P1P2/8/8/K7 w - - 0 1

when the iterative loops it gets down to ply 25 or so, the moves returned from the TT after 8 or 9 moves in put it into an endless loop, meaning the move from position (b) points back to position (a) which points to position (b), which eventually overwrote some buffers. my first instinct was that i had a problem with my repetition code, which there was, but once repaired, the problem still persists.

any ideas what is causing this?

i can temporarily keep it from running away by limiting the amount of PV moves I display to a fixed number, but me thinks there is something else wrong, perhaps with the way i'm storing results in the TT.
"An Engine's strength flows from the Search. But beware, pruning, extensions, reductions; the dark side of the Search are they. Once you start down the dark path, it will dominate and consume you, as it has to so many developers before.” -- Yoda
thevinenator
 
Posts: 65
Joined: Tue Jun 02, 2015 11:02 pm

Re: PV for console output problem

Postby H.G.Muller » Sun Nov 27, 2016 11:12 pm

This seems to be normal; I often saw that in my engine Joker too. This also reconstructs the PV from the TT after the search.
H.G.Muller
 
Posts: 167
Joined: Sun Jul 14, 2013 10:00 am

Re: PV for console output problem

Postby thevinenator » Mon Nov 28, 2016 3:46 am

I found a solution.
I dumped the PV from the TT idea and used Bruce Moreland's method described here:

https://chessprogramming.wikispaces.com ... +variation

no more errors!
"An Engine's strength flows from the Search. But beware, pruning, extensions, reductions; the dark side of the Search are they. Once you start down the dark path, it will dominate and consume you, as it has to so many developers before.” -- Yoda
thevinenator
 
Posts: 65
Joined: Tue Jun 02, 2015 11:02 pm

Re: PV for console output problem

Postby H.G.Muller » Mon Nov 28, 2016 11:18 am

In my recent engine I also switched to collecting PV durig search. The disadvantage of this method is that you often find shortened PVs because the PV ran into a hash cutoff. Crafty now uses a method that also solves that, which is storing the entire PV of all PV nodes in the TT, so that a TT hit can retrieve the tail of the PV even when it does cause a cutoff.
H.G.Muller
 
Posts: 167
Joined: Sun Jul 14, 2013 10:00 am


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron