Hi. Most of the programs I've seen use some type of *PLY in their LMR and NULL algorithms , however my program doesn't and I'm having difficulty getting it to think for the right side in LMR.
if my NULL move search looks like this, (where null_red = 2)
maybe I need to go back to a previous version where I checked legality on every line before calling serach(). maybe illegal moves are getting into the search somehow.... but it never makes the move, so its almost as though its pondering or something, but its not allowed to ponder on its own move so...
You have some pretty crazy stuff in there, such as searching by negating the depth. After taking a quick look at Faile's search, this is how I would add your LMR code to it. Take it with a massive grain of salt, since I'm not familiar with how the whole program works:
I like the continue; idea...saves checking legality on every line in the code...im just wondering where to try this, because I can put it in search, which includes the null move and quiesce, or in the search_root section, which actually calls search(). e.g. in search its: score = -search (-beta, -alpha, depth-1+extensions, TRUE); while in root_score its: root_score = -search (-beta, -alpha, depth-1+extensions, TRUE); .... Which is different than other programs where most search the root differently...with a different algorithm. think() calls search_root like this: temp_move = search_root (-INF, INF, i_depth);
So I guess I'll put it in search. And keep the search_root as a full window search without any reductions or PVS. Just seems odd to me, Sjeng free does PVS (no reductions) in root_and search. hmmm.
why the ! in if (!check_legal(&moves[0], i)) continue; ?
I thought that means if the legal move isn't checked...or an illegal move
shouldn't it just be: if (check_legal(&moves[0], i)) continue; ?