Root move ordering and LMR

Code, algorithms, languages, construction...
Post Reply
kickstone
Posts: 20
Joined: Fri Feb 26, 2016 7:27 am

Root move ordering and LMR

Post by kickstone » Wed Aug 03, 2016 5:05 pm

Thinking about my root move ordering now that its time to implement late move reductions. I currently use node counts (from both alphaBeta and qSearch) from the previous iteration to order the root moves. In addition i bump any move that was best at a previous iteration to the top of the list (in case of PV oscillation) weighted by depth. My first question is, are you applying LMR to root nodes as if it were any other node? Do you reduce fewer moves perhaps?

And If i apply it at root nodes, what i cant wrap my head around is how that influences my root move ordering. I mean, i'm reducing late moves which reduces their node counts and therefore unless they can beat alpha and be re-searched to full depth, they will stay at the end of the list. Is that fine or do I need to change how I order my root moves when implementing LMR?

hyatt
Posts: 1242
Joined: Thu Jun 10, 2010 2:13 am
Real Name: Bob Hyatt (Robert M. Hyatt)
Location: University of Alabama at Birmingham
Contact:

Re: Root move ordering and LMR

Post by hyatt » Thu Aug 04, 2016 12:04 am

When you add LMR that won't work so well for ordering. I did this from the middle 70's until 4-5 years ago. What I do now is a q-search on each root move to get at least a starting value for each move. I sort on this, and then leave the move list alone except when a move fails high, where I immediately move it to the top. This keeps moves that have recently been best right at the front of the list where they belong...

kickstone
Posts: 20
Joined: Fri Feb 26, 2016 7:27 am

Re: Root move ordering and LMR

Post by kickstone » Thu Aug 04, 2016 6:35 am

That seems to give me a slight speedup. I did a fast, full width, 2 ply search + qSearch on each root move to get an exact (albeit shallow) score to do an initial sort. Then i give a root move a bonus for beating alpha before sorting again before the next iteration.

Post Reply