Narrowing search results

Sort:
Avatar of u2_718281828459045

Is there a way to make an engine narrow its search to a set of moves defined by the user? For in a given position if you just wanna see which of a certain 2 moves is better, can you just tell the engine to analyze those 2 moves? I doubt this is possible in a GUI but perhaps it's possible in command-line?

This would significantly increase the speed of that analysis, because the engine wouldn't have to spend any time evaluating all the moves you're not interested in. By skipping a bunch of moves it would go deeper faster.

If it's not possible, I suppose I could tweak an open-source engine and add such a function.

Avatar of HGMuller

Hi 'e', Wink

I think the conventional way to do this is simply play the moves you are interested in, in analysis mode, and see what the engine has to say about the resulting positions. You woud have to indicate the moves you are interested in in some way, and playing them on the board seems as efficient a method as you could ever hope for...

It seems that UCI supports a 'searchmoves' command that is supposed to do exactly what you want. But I could not find it in the official UCI specs from 2005, so I have no idea what the exact syntax is. It might be part of the UCI3 protocol extension used by Rybka, but I am not sure formal specs of that were ever released. UCI engines are very awkward to use from the command-line, though, because you would have to reenter the position each time you change it.

Avatar of u2_718281828459045

Thanks! That's exactly what I was looking for. I'm able to do it in commandline using the "searchmoves" command. Typing is no problem, once the initial position is set up, you can type in a single move (you don't have to retype the whole position/game from the start).

I see there's also an alternative I haven't tried yet that can be used in the GUI, multi-PV. Similar concept, worth a try but probably not as effective as searchmoves.

Avatar of HGMuller

With multi-PV the GUI decides what moves are search. But as it chooses the best N moves, this is often what you want. (Only when you want to know why a certain move is bad, it won't do.)

I still don't understand why you prefer command line over simply doing the moves in the GUI, and then take them back when you have seen enough. Working with a GUI is usually much more convenient, especially if you want to save the results. E.g. when I am analyzing a game, and in a certain position I wonder why a certain move was not played, I just perform that move as a variation, so that the engine will produce a principal variation starting from the position after that move. I can then select that PV to be added to the variation I just started, and revert to the original game, having the variation added to the PGN. As this ends me up in the same position as from which I played the alternative move, I can then immediately try another move from there, perhaps adding it as a second variation on the game move, etc. That way everything of importance gets nicely recorded in the PGN of the game.

Avatar of u2_718281828459045

It's for when I have the best move narrowed down to say 2, and want both moves to be evaluated in depth. Sure I could do one move, let the engine think for a while, write down its score, then take back and do the other move and let it think again. But that would require me to be there to tell it when to switch moves. Whereas with searchmoves I can go do something else and when I return it will have analyzed both moves to a high depth. (It's not very often that I'll find it necessary to do this but it's a nice tool to have.)

Avatar of HGMuller

OK, I see. But if you are interested in the best two move (which seems likely), setting multiPV to two would do that to. With searchMoves you will always run the risk that one of the move you specified turns out to be a blunder at some large, but still far from final depth, and that nearly half the analysis time is wasted on it. With multiPV it would simply switch to another set of moves in such a case.

Avatar of Guest7379798996
Please Sign Up to comment.

If you need help, please contact our Help and Support team.