From e8cf884b7e412807b406d97fe1fd51c76e3f12c5 Mon Sep 17 00:00:00 2001 From: LLCoolDave Date: Sun, 4 Jun 2017 16:15:59 +0200 Subject: [PATCH] Set correct cutoff threshold for vt22 algorithm. Collect required location names for statistical analysis from playthrough calculation. --- BaseClasses.py | 1 + Main.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/BaseClasses.py b/BaseClasses.py index f1aee3d3..0cad42af 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -23,6 +23,7 @@ class World(object): self._location_cache = {} self._item_cache = {} self.spoiler = '' + self.required_locations = [] self.place_dungeon_items = place_dungeon_items # configurable in future self.agahnim_fix_required = False self.swamp_patch_required = False diff --git a/Main.py b/Main.py index 69ab8c4d..4e273e37 100644 --- a/Main.py +++ b/Main.py @@ -63,7 +63,7 @@ def main(args, seed=None): elif args.algorithm == 'vt21': distribute_items_cutoff(world, 1) elif args.algorithm == 'vt22': - distribute_items_cutoff(world, 0.33) + distribute_items_cutoff(world, 0.66) elif args.algorithm == 'freshness': distribute_items_staleness(world) @@ -431,6 +431,7 @@ def copy_world(world): def create_playthrough(world): # create a copy as we will modify it + old_world = world world = copy_world(world) # in treasure hunt and pedestal goals, ganon is invincible @@ -486,6 +487,9 @@ def create_playthrough(world): # we are now down to just the required progress items in collection_spheres in a minimum number of spheres. As a cleanup, we right trim empty spheres (can happen if we have multiple triforces) collection_spheres = [sphere for sphere in collection_spheres if sphere] + # store the required locations for statistical analysis + old_world.required_locations = [location.name for sphere in collection_spheres for location in sphere] + # we can finally output our playthrough return 'Playthrough:\n' + ''.join(['%s: {\n%s}\n' % (i + 1, ''.join([' %s: %s\n' % (location, location.item) for location in sphere])) for i, sphere in enumerate(collection_spheres)]) + '\n'