Guetti wrote:Gerd Isenberg wrote:Guetti wrote:I'm wondering whether there is an advantage of this method except speed? i.e. Does one need to access the movelist of ply x-1 at ply x?
It might be interesting to know, whether the move about to make, was already tried two plies before, but obviously failed to cut. Probably considering some "connections" of the two moves played instead with this move about to make. Another late pruning measure?
Hm, don't some kind of heuristics usually take care of that?
which?
Guetti wrote:Or can I just keep a local movelist in the search for every ply?
Since we have ...-cut-all-cut-all... and rarely more than maxmoves/2 at all- and pv-nodes, we'll have some gaps or "defragmentation" of pages and cachelines with two dimensional maxply * maxmovesPerPly arrays. IIRC Dieter Buerssner used local arrays on the stack.
Sorry, now you lost me. Can you explain this to a complete beginner like me?

I mean a two dimensional array
MOVE movelistByPly[MAX_PLIES][256]
So 256 moves per ply preallocated, let say 4 bytes per move - 1KByte per ply. 4KByte pages are virtually mapped into physical memory and caches, each page takes one entry inside the TLB.
At cut nodes you'll likely generate no moves at all - or maybe only a few winning captures or killers. Otherwise at all-nodes you'll need to generate let say 30..40 moves in general, but you'll need to pre-allocate the array for worst case.
Thus, inside a 4K page, likely about 80 moves (4 plies) are stored - instead of 1024. Which is worse because you'll need more pages. Another issue might be (hardware) pre-fetching of cachelines.
In general, keeping things together improves cache and memory utilization and performance.