Skip to content

Commit 262fd3f

Browse files
committed
Take effective starting items into account for hint reachability
1 parent 03b7479 commit 262fd3f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Hints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def can_reach_hint(worlds: list[World], hint_location: Location, location: Locat
307307

308308
old_item = location.item
309309
location.item = None
310-
search = Search.max_explore([world.state for world in worlds])
310+
search = Search.max_explore([world.state for world in worlds], collect_pseudo_starting_items=True)
311311
location.item = old_item
312312

313313
return (search.spot_access(hint_location)

Search.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@ def collect(self, item: Item) -> None:
8484
self.state_list[item.world.id].collect(item)
8585

8686
@classmethod
87-
def max_explore(cls, state_list: Iterable[State], itempool: Optional[Iterable[Item]] = None) -> Search:
87+
def max_explore(cls, state_list: Iterable[State], itempool: Optional[Iterable[Item]] = None, *, collect_pseudo_starting_items: bool = False) -> Search:
8888
p = cls(state_list)
8989
if itempool:
9090
p.collect_all(itempool)
91+
if collect_pseudo_starting_items:
92+
p.collect_pseudo_starting_items()
9193
p.collect_locations()
9294
return p
9395

0 commit comments

Comments
 (0)