The output from the position is as expected (see info on how I print the M2 thing below) and it makes the mate in 1:
Yes I print them in my GUI. The scores are saved in the iterative deepening as shown before, then I print everything in the end.
If the score is less than -1e7 I put it as -M and put the depth-1 after the number. This is not exactly correct, but the issue is still the same. It should not save the mate score as the best score for depth 3, it should save the score corresponding to the given PV-line, which should be -3.40. Why is it outputting -1e9 instead from the negamax function?
eligolf wrote: ↑Thu Jan 07, 2021 9:04 am
The output from the position is as expected (see info on how I print the M2 thing below) and it makes the mate in 1:
Yes I print them in my GUI. The scores are saved in the iterative deepening as shown before, then I print everything in the end.
If the score is less than -1e7 I put it as -M and put the depth-1 after the number. This is not exactly correct, but the issue is still the same. It should not save the mate score as the best score for depth 3, it should save the score corresponding to the given PV-line, which should be -3.40. Why is it outputting -1e9 instead from the negamax function?
Could you just print the score in centipawn? Let's see the score as iteration depth increases.
Absolutely, it it hard to read but it is 9:s all the way to the left.
The score isn't changing even at larger depths, it seems as if it gets stuck on some value. But somehow it ignores that during negamax and returns another move ordering (in my original case)
eligolf wrote: ↑Thu Jan 07, 2021 9:35 am
Absolutely, it it hard to read but it is 9:s all the way to the left.
The score isn't changing even at larger depths, it seems as if it gets stuck on some value. But somehow it ignores that during negamax and returns another move ordering (in my original case)
The score is correct. The scores from depth 2 to 5 are consistent and it is mate in 1 move. There is no problem with your engine. It is the problem of the GUI failing to convert properly the cp score into mate score.
In this case yes, but look at my original case where it gives the mate score at depth 3 just because a mate EXISTS at depth 3. But black can play other moves, and rightly does, and then the score output from negamax should be something else than the matescore right? Or am I misunderstanding something?
eligolf wrote: ↑Thu Jan 07, 2021 9:43 am
In this case yes, but look at my original case where it gives the mate score at depth 3 just because a mate EXISTS at depth 3. But black can play other moves, and rightly does, and then the score output from negamax should be something else than the matescore right? Or am I misunderstanding something?
Try it then let's see the cp score.
[d]3r1k1b/5p2/4np2/3R1N2/3P1NPP/2K1PP2/8/8 b - - 0 1
There is mate which it finds in a few of the branches, but it is like that score remains as the best score throughout after it has found it, which is strange.
The quiescence search returns only values in the range of around -360 to 360 after printing them all, which seems reasonable.
Thank you for taking the time btw, I have looked at this a few days myself without any progress Appreciate any new input.
What is the meaning of the second parameter of is_square_attacked()? The color of the potential attacker? If so, you should check the call in negamax().
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)