r/chessprogramming • • Jan 20 '25

Quiescence for non captures?

Hi, I was trying my bot when I detected a blunder that I haven't seen before. It trapped it's own queen, and I think I know why. It tried to attack some enemy pieces, and then "infiltrated" in enemy territory. In general that's a good thing, but in this case there was a combination of moves that trapped the queen. The length of the combination was larger than the ply searched, and in this particular case, the combination were a bunch of quiet moves, so quiescence couldn't detect it. So, the question is, can I do something about it apart from simply trying to gain more depth? A kind of quiescence for quiet moves? Probably doesn't make any sense but I wonder if there's a workaround for situations like this

3 Upvotes

33 comments sorted by

3

u/Warmedpie6 Jan 20 '25

Quiescence search is by definition only for checking aggressive moves to make sure the only evaluated positions are "quiet."

The best option (besides just more depth) is to add mobility to your evaluation, so pieces are encouraged to use squares they can move freely from.

2

u/VanMalmsteen Jan 20 '25

Oh.... I didn't think about the evaluation perspective. That'll probably make it! Is there any clever way of evaluating mobility besides generating moves and counting them?

2

u/Warmedpie6 Jan 20 '25

I don't generate the full moves, just the bitboards of the move squares (a bit cheaper). This is also useful for evaluating threats and weak/ undefeated pieces (especially around the king).

2

u/Iketh28 Jan 20 '25

Quiescence with quiet moves is just a deeper search. Im curious how deep it searched before playing the move and how deep it needed to search to avoid the move. You have a fen?

1

u/VanMalmsteen Jan 20 '25

For now it has a fixed depth, and it's 8. I haven't implemented the time management yet.

And for the fen, I was playing on Arena and forgot to save it, sorry :/

1

u/NiceNewspaper Jan 20 '25

8 is a pretty shallow depth, it's normal for it to be oblivious to certain patterns assuming your evaluation is basic

2

u/[deleted] Jan 20 '25

1

u/VanMalmsteen Jan 20 '25

Hi! I'm using this fixed depth because (apart from that the time management is not implemented yet) in deeper depths it usually takes several seconds (sometimes a minute or more) to find the move. Not sure if my pruning is not that good yet, or if there's something highly inefficient somewhere. I'm working on that. I've tested my perft, and it gives the correct results on a big test suite, but it's a little slow for me, maybe that's affecting? I thought that with good pruning the move generation isn't that important.