Looking for a PGN utility to remove chess960/frc games

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

Moderators: hgm, Rebel, chrisw

Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Looking for a PGN utility to remove chess960/frc games

Post by Dann Corbit »

I am looking for a tool (already written) that will remove all the FRC/Chess960 games from a PGN file.
Does such a thing exist?
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Norm Pollock
Posts: 1056
Joined: Thu Mar 09, 2006 4:15 pm
Location: Long Island, NY, USA

Re: Looking for a PGN utility to remove chess960/frc games

Post by Norm Pollock »

The tool "fenRemove" in 40H-PGN tool box

http://komodochess.com/pub/40H-pgn-utilities/

Here is the readme:

Code: Select all

=========================(18) fenRemove ============================

"fenRemove" removes games containing a "FEN" tag except when the 
"FEN" position is the standard opening position.

The output file is "out6.pgn". Removed games are in "exclude6.pgn".

The "FEN" of the standard opening position:

  rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

Use "tagFix" to remove "FEN" & "SetUp" tags for the standard opening
position.

Syntax:   fenRemove filename.pgn 

Example:  fenRemove alpha.pgn

Output:   out6.pgn, exclude6.pgn

Comments:

     1. "fenRemove" removes almost all "Chess960" ("Fischer Random 
        Chess") games. The only games it does not remove are the
        games where the "FEN" position is the standard opening 
        position, a 1 out of 960 possibility.
Updated links for 40H Tools and Databases
http://40Hchess.epizy.com
http://nk-qy.info/40h
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Looking for a PGN utility to remove chess960/frc games

Post by Dann Corbit »

Sir,
If you have not been nominated for Knighthood, that is a dreadful oversight.
I believe that the name Norman itself has Heraldic roots.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Deberger
Posts: 91
Joined: Sat Nov 02, 2019 6:42 pm
Full name: ɹǝƃɹǝqǝᗡ ǝɔnɹꓭ

Re: Looking for a PGN utility to remove chess960/frc games

Post by Deberger »

pgn-extract seems most logical.

Extract games which match the start position and do not have the Variant tag.
User avatar
Ozymandias
Posts: 1532
Joined: Sun Oct 25, 2009 2:30 am

Re: Looking for a PGN utility to remove chess960/frc games

Post by Ozymandias »

You don't even need the Variant tag:

Code: Select all

pgn-extract -s -C -N -V -tstartpos.txt -oclean.pgn database.pgn
where startpos.txt is:

Code: Select all

FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
I prefer this over fenRemove, because oftentimes, I first need to clean the DB anyway and pgn-extract takes care of both tasks, in one go.
Jonathan003
Posts: 239
Joined: Fri Jul 06, 2018 4:23 pm
Full name: Jonathan Cremers

Re: Looking for a PGN utility to remove chess960/frc games

Post by Jonathan003 »

You can also do it with SCID. You first have to make a new database in SCID format and inport the pgn database, than when finished you can export the database to a pgn database. Scid 4.7 is very fast and can handle very big databases. I use the windows version but there is also a linux version.

Here is a interesting video tutorial that describe how to do it in Scid Vs PC, but you can do the same with Scid 4.7

It's described at minute 22