That's a different issue. We were only talking about ordering captures. My ordering goes like this:Daniel Anulliero wrote:In Isa , I do the move ordering like this :You can see the promotions are ahead , then the hash move , then MVV / LVA with pieces values , no index (wrong?)Code: Select all
int move_ordering(int type, int dep, int arr) { int val = 0; if(type == PROMO_DAME) val = 4000000; else if(type >= PROMO_CAVALIER && type < PROMO_DAME) val = (2000000 + valeur_piece[type]); if(probe_move_ordering(dep, arr, prof)) val += 1000000; if(type == CAPTURE) val = (3000000 + (valeur_piece[piece[arr]] - valeur_piece[piece[dep]])); else { if(killer1[prof].from == dep && killer1[prof].dest == arr) val += 2000000; else if(killer2[prof].from == dep && killer2[prof].dest == arr) val += 1500000; else val += history[dep][arr]; } return val; }
Then killer 1 and 2
Then history value
I use high values because the max value of history is 999999
So , with my scheme , q x q = 3000000 and pxr = 3000400
Ok I'm certainly doing something wrong
(1) hash move
.. generate only captures ..
(2) captures in MVV/LVA order where SEE says they don't lose material (those are searched later)
(3) killer moves (2 from current ply, 2 from two plies back)
(4) counter moves (2)
(5) paired moves (a heuristic from early 80's, don't recall who proposed it, but basically this is a killer move that is only applicable when a specific move was played two plies back. IE Ng5/Nf7 where Ng5 enables Nf7...
.. generate non-captures ..
(6) if remaining depth >= 6 plies, I search 1/2 of the remaining moves based on history ordering
(7) rest of moves
I added counter and paired moves specifically because of LMR, as this puts a few good moves early in the list where they get reduced less.