Code to evaluate a large PGN database