Interesting... this has more or less the same effect as a static history-table or a piece-square table for move ordering.BertTuyt wrote:Although I did not implement move sorting in Dwarf, there is an implicit move ordening.
For both white as black I use (at least for the man moves) a BITSCANFORWARD to occupy the movelist.
When one thinks about it, this is absolutely asymmetrical.
The black moves in the back of the black position are so on the top of the move list, for white the front moves.
So I tested what the effect was in using a forward (F) and reverse (R) scan.
All at ply 25 for the (famous) Woldouby.So max a factor 2 difference.Code: Select all
White Black Nodes F F 150.967.354 R F 342.237.097 R R 345.962.328 F R 160.613.611
In very quiet positions I would expect that it is safe to populate the movelist first with (defending) moves at the back of the position.
So White R and Black F, but here (for whatever reason) most optimal seems to be F F and F R.
Remaining questions, what is the effect for the initial position, and is there an (significant) effect when move sorting (history) is used.....
Bert
I've been thinking about this as well, resetting the MSB takes more time that is why I didn't try it yet, and it is unclear if there is a measurable effect when you have killers and history in place.
Move sorting depends very much upon the position you're looking at, e.g. at the initial position killers hardly do anything and at the Woldouby they do a terrific job (maybe because the position is more tactical).
Today I tried several different ways to sort the root moves, nothing that I tried improved the current move ordering, maybe because I have no real evaluation function besides material yet, I filled the evaluation table with small random values and that clearly has an effect on the branching factor but the results from the sort algorithms I tried remain about the same as with material only.
I guess I have to add speculative pruning and LMR to get a few additional plies, in practice (if done in the right way) this may help somewhat.
In practice the KISS (keep it simple stupid) principle often works best, this is why I'm very reluctant to use stuff from the C++ libraries, there is so much redundant junk in there, lately I also developed the bad habit to use a lot of OOP, most of the time this works against you though.
Joost