From f57d8d2affb6630891a982b83077b9e485769c25 Mon Sep 17 00:00:00 2001 From: jdunn596 <82658083+jdunn596@users.noreply.github.com> Date: Tue, 6 Jan 2026 04:23:53 -0500 Subject: [PATCH 1/4] change important check hints --- Hints.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Hints.py b/Hints.py index 179259321b..33d6dfe146 100644 --- a/Hints.py +++ b/Hints.py @@ -1158,8 +1158,15 @@ def get_junk_hint(spoiler: Spoiler, world: World, checked: dict[HintArea | str, def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintArea | str, set[CheckedKind]]) -> HintReturn: top_level_locations = [] empty_dungeons = [dungeon for dungeon in world.precompleted_dungeons if world.precompleted_dungeons[dungeon]] + for location in world.get_filled_locations(): hint_area = HintArea.at(location) + shuffled_locations_in_region = filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, world.get_filled_locations()) + + # Don't hint areas with all locations already hinted + if shuffled_locations_in_region and all(map(lambda loc: is_checked([loc], checked), shuffled_locations_in_region)): + continue + if ( hint_area not in top_level_locations and hint_area not in checked @@ -1168,11 +1175,16 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintA and not location.locked # prevent areas with unshuffled checks from being hinted ): top_level_locations.append(hint_area) + if not top_level_locations: return None + hint_area = random.choice(top_level_locations) item_count = 0 + for location in world.get_filled_locations(): + shuffled_locations_in_region = list(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, world.get_filled_locations())) + if HintArea.at(location) == hint_area: if (location.item.majoritem # exclude locked items @@ -1193,6 +1205,9 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintA or world.settings.shuffle_ganon_bosskey == 'dungeons' or world.settings.shuffle_ganon_bosskey == 'tokens'))): item_count = item_count + 1 + if location in shuffled_locations_in_region and len(shuffled_locations_in_region) == 1: + mark_checked(checked, location.name) + mark_checked(checked, hint_area, CheckedKind.IMPORTANT_CHECK) if item_count == 0: From abd915925d0251df210f5947969562cc408c43e3 Mon Sep 17 00:00:00 2001 From: jdunn596 <82658083+jdunn596@users.noreply.github.com> Date: Wed, 7 Jan 2026 09:46:55 -0500 Subject: [PATCH 2/4] fix slowdown in gen time --- Hints.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Hints.py b/Hints.py index 33d6dfe146..c1ef701a8c 100644 --- a/Hints.py +++ b/Hints.py @@ -1161,11 +1161,6 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintA for location in world.get_filled_locations(): hint_area = HintArea.at(location) - shuffled_locations_in_region = filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, world.get_filled_locations()) - - # Don't hint areas with all locations already hinted - if shuffled_locations_in_region and all(map(lambda loc: is_checked([loc], checked), shuffled_locations_in_region)): - continue if ( hint_area not in top_level_locations @@ -1174,6 +1169,11 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintA and hint_area.dungeon_name not in empty_dungeons # prevent pre-completed dungeons from being hinted and not location.locked # prevent areas with unshuffled checks from being hinted ): + shuffled_locations_in_region = list(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, world.get_filled_locations())) + + # Don't hint areas with all locations already hinted + if shuffled_locations_in_region and all(map(lambda loc: is_checked([loc], checked), shuffled_locations_in_region)): + continue top_level_locations.append(hint_area) if not top_level_locations: @@ -1183,9 +1183,10 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintA item_count = 0 for location in world.get_filled_locations(): - shuffled_locations_in_region = list(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, world.get_filled_locations())) if HintArea.at(location) == hint_area: + shuffled_locations_in_region = list(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, world.get_filled_locations())) + if (location.item.majoritem # exclude locked items and not location.locked From 01a0c6b9cd9694d346491f2c3d00c94850719111 Mon Sep 17 00:00:00 2001 From: jdunn596 <82658083+jdunn596@users.noreply.github.com> Date: Wed, 7 Jan 2026 17:24:52 -0500 Subject: [PATCH 3/4] convert to set and only build location list once --- Hints.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Hints.py b/Hints.py index c1ef701a8c..d5a4009414 100644 --- a/Hints.py +++ b/Hints.py @@ -1158,8 +1158,9 @@ def get_junk_hint(spoiler: Spoiler, world: World, checked: dict[HintArea | str, def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintArea | str, set[CheckedKind]]) -> HintReturn: top_level_locations = [] empty_dungeons = [dungeon for dungeon in world.precompleted_dungeons if world.precompleted_dungeons[dungeon]] + locations = {location for location in world.get_filled_locations()} - for location in world.get_filled_locations(): + for location in locations: hint_area = HintArea.at(location) if ( @@ -1169,7 +1170,7 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintA and hint_area.dungeon_name not in empty_dungeons # prevent pre-completed dungeons from being hinted and not location.locked # prevent areas with unshuffled checks from being hinted ): - shuffled_locations_in_region = list(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, world.get_filled_locations())) + shuffled_locations_in_region = set(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, locations)) # Don't hint areas with all locations already hinted if shuffled_locations_in_region and all(map(lambda loc: is_checked([loc], checked), shuffled_locations_in_region)): @@ -1182,10 +1183,9 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintA hint_area = random.choice(top_level_locations) item_count = 0 - for location in world.get_filled_locations(): - + for location in locations: if HintArea.at(location) == hint_area: - shuffled_locations_in_region = list(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, world.get_filled_locations())) + shuffled_locations_in_region = set(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, locations)) if (location.item.majoritem # exclude locked items From 60b9d9dae0e12992b3728f56f74dfb3ff84944f9 Mon Sep 17 00:00:00 2001 From: jdunn596 <82658083+jdunn596@users.noreply.github.com> Date: Thu, 8 Jan 2026 07:12:20 -0500 Subject: [PATCH 4/4] nvm lists makes more sense --- Hints.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Hints.py b/Hints.py index d5a4009414..8eb3cb1940 100644 --- a/Hints.py +++ b/Hints.py @@ -1158,7 +1158,7 @@ def get_junk_hint(spoiler: Spoiler, world: World, checked: dict[HintArea | str, def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintArea | str, set[CheckedKind]]) -> HintReturn: top_level_locations = [] empty_dungeons = [dungeon for dungeon in world.precompleted_dungeons if world.precompleted_dungeons[dungeon]] - locations = {location for location in world.get_filled_locations()} + locations = [location for location in world.get_filled_locations()] for location in locations: hint_area = HintArea.at(location) @@ -1170,7 +1170,7 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintA and hint_area.dungeon_name not in empty_dungeons # prevent pre-completed dungeons from being hinted and not location.locked # prevent areas with unshuffled checks from being hinted ): - shuffled_locations_in_region = set(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, locations)) + shuffled_locations_in_region = list(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, locations)) # Don't hint areas with all locations already hinted if shuffled_locations_in_region and all(map(lambda loc: is_checked([loc], checked), shuffled_locations_in_region)): @@ -1185,7 +1185,7 @@ def get_important_check_hint(spoiler: Spoiler, world: World, checked: dict[HintA for location in locations: if HintArea.at(location) == hint_area: - shuffled_locations_in_region = set(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, locations)) + shuffled_locations_in_region = list(filter(lambda loc: HintArea.at(loc) == hint_area and not loc.locked, locations)) if (location.item.majoritem # exclude locked items