Script to find quiet positions

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

glav
Posts: 92
Joined: Sun Apr 07, 2019 1:10 am
Full name: Giovanni Lavorgna

Script to find quiet positions

Post by glav »

Hi. I need a tool to find quiescent positions, i.e., those that can be easily evaluated without worrying about recaptures, checks and so forth. Ideally, the program should take as input a file with epd positions and output olny those that are quiet. Is there such a tool?
Thanks in advance.
User avatar
pohl4711
Posts: 2924
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Script to find quiet positions

Post by pohl4711 »

pgn-extract is (always) the answer:

--quiescent:
Used only in conjunction with --plylimit, this argument is used to defer termination of the output until the position has been quiescent for the given number of ply. Stability is defined as the absence of captures, checks and promotion. For instance:
pgn-extract --plylimit 20 --quiescent 3 file.pgn
will output games up to 20 ply but only if there have been no captures, checks or promotion moves for the past 3 ply. If this condition is not met then moves will continue to be output until that condition is satisfied, or the end of the game is reached.


https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/