likeawizard / polyglot-composer

A library to compose polyglot opening books from PGN game collections
GNU General Public License v3.0
5 stars 0 forks source link

Dynamic filters #29

Open likeawizard opened 1 year ago

likeawizard commented 1 year ago

Currently all filters are hardcoded in pgn/filter.go

There are two types of filters:

  1. PreFilter these are values than can disqualify a game on a singe tag value - low Elo, short time control etc...
  2. PostFilter these are filters that can only be evaluated based on multiple tag values. i.e. Elo difference

Currently there are no PostFilter and PostFilters might hurt the performance a little - since the whole PGN tag section needs be read to make a decision.

Create a filter that can be dynamically loaded and parsed directly from the command line flag, that can be loaded from a yml/json/toml file. When not present it defaults to hardcoded values that are equivalent to no filter