You should take cutoffs if thisScore >= upperBound (or <= loweBound), not just > or <. This might ause you to mess many cutoffs. It is difficult to judge how bad this is; it depends on the finess of your evaluation.
*wiping tears* that was it. It's what I have being looking for for the last two weeks. Thank you very much. Now it can do 7-ply full width on that same position in 44 seconds.
BTW you might wanna change your code to the negamax variation. It's a lot more compact and (for most of us) more readable.
I will probably change it after I become more familiar with chess programming. This is my first try in chess programming, that is why I try to keep everything more apparently logical (to me). Thanks for the suggestion though.
BTW, what is a normal proportion between quiescence nodes and normal nodes? Right now my engine spends something like 70-80% in the quiescent search, and I'm worried that it's rather on the high side.
Or is it just that when more hashing, futility prunning and similar stuff is added, then relatively more time is spend on searching captures? (befoire a rewriter I had a version where the ratio was about 50%).
Ah yes, I see the code is doubled. It is much more efficient to move this part of the code above the movegeneration and the hashtableprobe.
Hmm, that makes sense. Thanks for the suggestion.
BTW, what is a normal proportion between quiescence nodes and normal nodes? Right now my engine spends something like 70-80% in the quiescent search, and I'm worried that it's rather on the high side.
Sorry I have no idea what the ratio should be either. As you can see I am a beginner in chess programming, too. My engine spends something like 90% in Qsearch on the 7th ply or so.
You can reduce this number a lot by :
- not making captures that can not put you at the alpha/beta score (futility pruning)
- stoping the search at the first capture with negative see.
Of course you do less QS too if you have some futility pruning in the main search (frontier, pre-frontier,razoring).