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

Lingo: Various generation optimizations #2479

Merged
merged 20 commits into from
Nov 25, 2023

Conversation

hatkirby
Copy link
Collaborator

@hatkirby hatkirby commented Nov 19, 2023

What is this fixing or adding?

Almost all of the events have been eradicated, which significantly improves both generation speed and playthrough calculation.

Previously, checking for access to a location involved checking for access to each panel in the location, as well as recursively checking for access to any panels required by those panels. This potentially performed the same check multiple times. The access requirements for locations are now calculated and flattened in generate_early, so that the access function can directly check for the required rooms, doors, and colors.

These flattened access requirements are also used for Entrance checking, and register_indirect_condition is used to make sure that can_reach(Region) is safe to use.

The Mastery and Level 2 rules now just run a bunch of access rules and count the number of them that succeed, instead of relying on event items.

Finally: the Level 2 panel hunt is now enabled even when Level 2 is not the victory condition, as I feel that generation is fast enough now for that to be acceptable.

How was this tested?

pytest.

If this makes graphical changes, please attach screenshots.

worlds/lingo/player_logic.py Outdated Show resolved Hide resolved
worlds/lingo/rules.py Outdated Show resolved Hide resolved
worlds/lingo/rules.py Outdated Show resolved Hide resolved
worlds/lingo/player_logic.py Outdated Show resolved Hide resolved
worlds/lingo/rules.py Outdated Show resolved Hide resolved
@ScootyPuffJr1 ScootyPuffJr1 added the is: refactor/cleanup Improvements to code/output readability or organizization. label Nov 20, 2023
This change accidentally broke how ANOTHER TRY works in panelsanity. It needs to stay unavailable until the panel hunt is completed, just like LEVEL 2. This commit fixes that.
It is still disabled by default (for generation optimisation), but you can set the level 2 requirement higher than 1 in order to enable it.
This is a significant speedup for vanilla doors, and a minor speedup for simple/complex doors.
@Berserker66 Berserker66 merged commit 6dccf36 into ArchipelagoMW:main Nov 25, 2023
12 checks passed
@hatkirby hatkirby deleted the reduced-reqs branch November 25, 2023 14:08
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
Almost all of the events have been eradicated, which significantly improves both generation speed and playthrough calculation.

Previously, checking for access to a location involved checking for access to each panel in the location, as well as recursively checking for access to any panels required by those panels. This potentially performed the same check multiple times. The access requirements for locations are now calculated and flattened in generate_early, so that the access function can directly check for the required rooms, doors, and colors.

These flattened access requirements are also used for Entrance checking, and register_indirect_condition is used to make sure that can_reach(Region) is safe to use.

The Mastery and Level 2 rules now just run a bunch of access rules and count the number of them that succeed, instead of relying on event items.

Finally: the Level 2 panel hunt is now enabled even when Level 2 is not the victory condition, as I feel that generation is fast enough now for that to be acceptable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: refactor/cleanup Improvements to code/output readability or organizization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants