Commit graph

2 commits

Author SHA1 Message Date
Olivier Teulière
87e1d4795b Sorting the search results happens to be quite slow, often much slower than the search itself.
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.
2009-01-22 18:30:22 +00:00
Olivier Teulière
25304bd978 test/*: Added non-regression tests, based on the text interface.
'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
2005-04-16 15:47:59 +00:00