For movesorting my Move object has an int score to which I sort on.
E.g. hash-hit gets the infinite value there.
Now I have several values to sort on:
* victim score (piece value of a piece that gets captured, max 975)
* attacker score (piece value of attacker, max 975)
* promotion value (975 is highest)
* PSQ_to - PSQ_from (fits in 6 bits)
* history table (max 511)
What would be a good method for combining these values?
I tried:
Code: Select all
psq + (hbt << 6) + ((queen - attacker) << 15) + ((victim + promotion) << 25)
This works reasonably well:
Code: Select all
psq + (hbt << 8) + ((queen - attacker) << 8) + ((victim + promotion) << 18)
but I was hoping to find something better.