andrewfan wrote:Is your quicksort recursive? I used to use Shellsort but found "Best in remaining" slightly faster for my code.
The effective move sorting order during search is:
1. Move that is in the PV hash table
2. Move that is in the normal hash table
3. Killer moves
4. Captures with promotions
5. Captures without promotions
6. Moves that has history values
7. Moves that has no history values
I only generate moves when none of the moves gotten in 1 to 3 causes a cutoff.
The move generator generate captures in the least capturing piece value order so pawn captures are before knight captures, etc - this is a kind of presorted list. Similar things happens for promotions - queen first.
Other moves are ordered by the difference of the piece square table scores for each moving pieces.
Check evasions have a different move generator.
Confused? So am I. I think I've gone off topic .
Andrew.
Hello Andrew,
I am not really sure whether or not the qsort is recursive (I am using the C standard qsort()) but I would guess it is iterative. I too use selection sort, and my moves are ordered as follows:
1. Hash move
2. Threat move
3. Counter move
4. Winning captures
5. Killers
6. Even captures
7. Quiet moves
8. Losing captures
4 as well as 6-8 are also ordered using piece-square tables.
Regards,
Zach