Trying to understand Retrograde analysis (EGTB generation)

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Trying to understand Retrograde analysis (EGTB generation)

Post by hgm »

Your question is a bit ambiguous. The time I quoted was for generating a single 4-men EGT (in particular KBNK). All pawnless 4-men EGT can be generated in a similar way, which should take a similar time. But for generating all of them would of course take a multiple of that time, depending on how many different piece types there are. For 'on-the-fly' generation one would typically know the one or the few that are needed.

The 'PrettyFast' algorithm works with bitmaps of 1 bit per position, where 64 contiguous bits correspond to 64 locations of the losing King, and thus can be seen as a bitboard for the latter. The retrograde propagation works by logical operations between such 'King bundles', treating 64 positions at a time.

The JavaScript 3-men generator based on escape counting typically takes 100msec as well (it prints its time usage under the DTM table), but for a 3-men. Of course JavaScript isn't really the fastest of languages. There you can select the piece (it always uses orthodox Kings), or even put in a piece of your own design.