my name is Natale and (after a lot of years, again) I decided it was time to try develop a new engine from scratch.
After reading suggestions on this forum and wikis on internet, I actually created the (not so) basic structure:
- PVS
- Q-search
- ID
- IID
- TT
- Killers
- Basic Move Order
- Eval with material only
All the stuff (after fixing A LOT of bugs) seems to work properly, actually tested with mate positions only (as I don't have evaluation at all), but I have a question I cannot find an answer to:
In mate tests it often fails high at root (when can it fail high? it should have seen a mate already, right?), but the research gives back the original score. As an example I post some iteration of this basic KNB-K endgame:
Code: Select all
FEN: 8/8/3K4/8/8/3N4/8/3B3k w - -
--------------------------------------------------------------------------------
time depth move nps score line
--------------------------------------------------------------------------------
...
previous iterations omitted...
...
--------------------------------------------------------------------------------
00:00:01.431 14 Bd1-c2 7.4M +6.00 1. Bd1-c2 Kh1-g1
2. Bc2-b1 Kg1-f1
3. Bb1-a2 Kf1-g1
4. Ba2-b3 Kg1-f1
5. Bb3-d1 Kf1-g1
6. Bd1-c2 Kg1-f1
7. Bc2-b1 Kf1-g1
00:00:01.524 14 Kd6-e5 6.9M +6.50 >
00:00:01.720 14 Kd6-e5 7.6M +6.00 1. Kd6-e5 Kh1-g2
2. Ke5-f4 Kg2-h2
3. Kf4-g5 Kh2-g1
4. Bd1-f3 Kg1-h2
5. Bf3-e2 Kh2-g1
6. Be2-d1 Kg1-f1
7. Bd1-c2 Kf1-g1
...
iterations 15-16-17-18 omitted...
...
--------------------------------------------------------------------------------
00:02:47.444 19 Kd6-e5 8.8M +6.50 >
00:03:24.178 19 Kd6-e5!! 9.5M +MATE11 1. Kd6-e5 Kh1-h2
2. Ke5-f4 Kh2-h3
3. Bd1-e2 Kh3-h4
4. Nd3-e1 Kh4-h3
5. Be2-g4+ Kh3-h2
6. Kf4-f3 Kh2-g1
7. Bg4-h3 Kg1-h2
8. Kf3-g4 Kh2-g1
9. Kg4-g3 Kg1-h1
10. Bh3-g2+ Kh1-g1
11. Ne1-f3#
Best regards,
Natl.