Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OoT Time Optimization #2401

Merged
merged 14 commits into from
Oct 30, 2023
Merged

Conversation

espeon65536
Copy link
Collaborator

  • Entrance randomizer no longer grows with multiworld
  • Improved ER success rate again by prioritizing Temple of Time even more
  • Prefill is faster, has slightly reduced failure rate when map/compass are in dungeon but previous items in any_dungeon (which consumed all available locations), no longer removes items from the main itempool; itemlinked prefill items removed to accomodate improvements
  • Now triggers only one recache after generate_basic instead of one per oot world
  • Avoids recaches during create_regions
  • All ER temp entrances have unique names (so the entrance cache does not break)

Split itempool into main and prefill pools
Modify only prefill pool
Faster state creation
Eventually we want to remove the full recache and just delete them from the cache directly, but I will save that for after ArchipelagoMW#2366
and not the other way around.
Prevents new entrance cache from breaking
@@ -1271,9 +1301,17 @@ def get_region(self, region_name):
self._regions_cache[region_name] = ret
return ret

@functools.cache
def get_entrances(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.multiworld.get_entrances(self.player) gives you all entrances for that player, already cached and already filtered.


def get_shuffled_entrances(self, type=None, only_primary=False):
return [entrance for entrance in self.get_shufflable_entrances(type=type, only_primary=only_primary) if
entrance.shuffled]

@functools.cache
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functools.cache is not available on Python 3.8

@espeon65536 espeon65536 marked this pull request as draft October 29, 2023 22:53
@espeon65536 espeon65536 marked this pull request as ready for review October 30, 2023 01:07
@Berserker66 Berserker66 merged commit db978aa into ArchipelagoMW:main Oct 30, 2023
12 checks passed
FlySniper pushed a commit to FlySniper/Archipelago that referenced this pull request Nov 14, 2023
- Entrance randomizer no longer grows with multiworld
- Improved ER success rate again by prioritizing Temple of Time even more
- Prefill is faster, has slightly reduced failure rate when map/compass are in dungeon but previous items in any_dungeon (which consumed all available locations), no longer removes items from the main itempool; itemlinked prefill items removed to accomodate improvements
- Now triggers only one recache after `generate_basic` instead of one per oot world
- Avoids recaches during `create_regions`
- All ER temp entrances have unique names (so the entrance cache does not break)
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
- Entrance randomizer no longer grows with multiworld
- Improved ER success rate again by prioritizing Temple of Time even more
- Prefill is faster, has slightly reduced failure rate when map/compass are in dungeon but previous items in any_dungeon (which consumed all available locations), no longer removes items from the main itempool; itemlinked prefill items removed to accomodate improvements
- Now triggers only one recache after `generate_basic` instead of one per oot world
- Avoids recaches during `create_regions`
- All ER temp entrances have unique names (so the entrance cache does not break)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants