But we don't need to sort them all the time, and in general we don't even need to keep all the rounds.
This commit greatly improves the search performance by filtering the results in 3 different ways, depending on the context:
- A limit to the number of results can be given (useful for the training mode). The kept results are the best ones, not the first ones found by the search.
- When only the best round is needed (when the AI is playing with level 100, or when preparing the rack for an explosive game), we don't need to keep rounds with a lower score
- When the AI has a level lower than 100, it is still possible to skip many rounds
The search limit in training mode is configurable (defaulting to 100) and can be deactivated.
'regression.pl' is the script that runs the regression, and 'drivers' contains
the list of scenario files to be played.
By default, the complete regerssion is played, but you can play specific
scenarios by adding them to the command-line.
Example: ./regression.pl training_bag freegame_change