diff options
| author | thecharlesblake | 2018-01-04 15:48:13 +0000 |
|---|---|---|
| committer | thecharlesblake | 2018-01-04 15:48:13 +0000 |
| commit | 04b1f729350195beeada3864f8a24ea1ad088ebc (patch) | |
| tree | ef341142791dd0d833b42570eadde2da0f030bd4 | |
| parent | Add legal move gen for reserve (diff) | |
| download | metasol-04b1f729350195beeada3864f8a24ea1ad088ebc.tar.gz metasol-04b1f729350195beeada3864f8a24ea1ad088ebc.zip | |
Add flower garden to benchmark script
| -rw-r--r-- | benchmark.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/benchmark.py b/benchmark.py index 02b9c38..93bd388 100644 --- a/benchmark.py +++ b/benchmark.py @@ -77,6 +77,16 @@ class FortunesFavorRulesGen(SolitaireRulesGen): self.baseJson["tableau piles"]["count"] = math.ceil(12*level/13) self.baseJson["stock size"] = level * 4 - 4 - self.baseJson["tableau piles"]["count"] +class FlowerGardenRulesGen(SolitaireRulesGen): + + def __init__(self): + super().__init__("flower-garden") + + def alterFieldsToChange(self, level): + self.baseJson["max rank"] = level + self.baseJson["tableau piles"]["count"] = math.ceil(6*level/13) + self.baseJson["reserve size"] = math.ceil(16*level/13) + def cleanup(): os.remove(tempRulesFilename) run("pkill solvitaire", shell=True) @@ -88,7 +98,8 @@ for rulesGen in [SpanishPatienceRulesGen(), FreeCellRulesGen(), BlackHoleRulesGen(), BakersDozenRulesGen(), - FortunesFavorRulesGen()]: + FortunesFavorRulesGen(), + FlowerGardenRulesGen()]: # Loops through the levels for level in range(1, 13): @@ -121,7 +132,7 @@ for rulesGen in [SpanishPatienceRulesGen(), run("pkill solvitaire", shell=True) if timeouts > timeoutsLimit: - break; + break if timeouts > timeoutsLimit: print("Could not solve " + rulesGen.name + " at level " + str(level) |
