Mysteryem 8fd021e757 Core: Speed up CollectionState sweeping (#3812)
* Sweep events per-player to reduce sweep iterations

By finding all accessible locations per player and then collecting the
items from those locations, if any collected items belong to a different
player, then that player may be able to access more locations the next
time all of their accessible locations are found. This reduces the
number of iterations necessary to sweep through and collect from all
accessible locations.

* Also sweep per-player in MultiWorld.can_beat_game

* Deduplicate code by using sweep_for_events in can_beat_game

sweep_for_events has been modified to be able to return a generator and
to be able to change the set of locations that are filtered out. This
way, the same code can be used by both functions.

* Skip checking locations by assuming each world only logically depends on itself

While this assumption almost always holds true, worlds are allowed to
logically depend on other worlds, so the sweep always double checks at
the end by checking the locations of every world before finishing.

* Fix missed update to CollectionState.collect implementation

Collecting items with prevent_sweep=True (previously event=True) no
longer always returns True, so the return value should now be checked.

* Comment and variable name consistency/clarity

accessible/inaccessible -> reachable/unreachable
final sweep iteration -> extra sweep iteration
maybe_final_sweep -> checking_if_finished

* Apply suggestions from code review

Use Iterator in return type hint instead of Iterable to help indicate that the returned value can only be iterated once.

Be consistent in return statements. Because sweep_for_events can return a value now, the conditional branch that has no intended return value should explicitly return None.

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>

* Update terminology from 'event' to 'advancement'

* Add typing overloads for sweep_for_advancements

This makes it so type-checkers and IDEs can see which calls return
`None` and which calls return `Iterator` so that it doesn't complain
about returning an `Iterator` from `sweep_for_events` or about iterating
through `None` in `can_beat_game`.

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>

* Update comment for why discard the player after finding their locations

A lack of clarity was brought up in review.

* Update for removed typing import

---------

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
2025-07-26 14:59:35 +02:00
2025-07-23 23:27:50 +02:00
2025-06-16 12:31:16 +02:00
2025-06-16 12:31:16 +02:00
2023-11-25 08:46:00 -06:00
2025-01-01 02:02:18 +01:00
2025-07-23 23:27:50 +02:00
2025-05-04 15:59:41 +02:00
2025-07-15 21:04:06 +02:00

Archipelago Discord Shield | Install

Archipelago provides a generic framework for developing multiworld capability for game randomizers. In all cases, presently, Archipelago is also the randomizer itself.

Currently, the following games are supported:

  • The Legend of Zelda: A Link to the Past
  • Factorio
  • Subnautica
  • Risk of Rain 2
  • The Legend of Zelda: Ocarina of Time
  • Timespinner
  • Super Metroid
  • Secret of Evermore
  • Final Fantasy
  • VVVVVV
  • Raft
  • Super Mario 64
  • Meritous
  • Super Metroid/Link to the Past combo randomizer (SMZ3)
  • ChecksFinder
  • ArchipIDLE
  • Hollow Knight
  • The Witness
  • Sonic Adventure 2: Battle
  • Starcraft 2
  • Donkey Kong Country 3
  • Dark Souls 3
  • Super Mario World
  • Pokémon Red and Blue
  • Hylics 2
  • Overcooked! 2
  • Zillion
  • Lufia II Ancient Cave
  • Blasphemous
  • Wargroove
  • Stardew Valley
  • The Legend of Zelda
  • The Messenger
  • Kingdom Hearts 2
  • The Legend of Zelda: Link's Awakening DX
  • Adventure
  • DLC Quest
  • Noita
  • Undertale
  • Bumper Stickers
  • Mega Man Battle Network 3: Blue Version
  • Muse Dash
  • DOOM 1993
  • Terraria
  • Lingo
  • Pokémon Emerald
  • DOOM II
  • Shivers
  • Heretic
  • Landstalker: The Treasures of King Nole
  • Final Fantasy Mystic Quest
  • TUNIC
  • Kirby's Dream Land 3
  • Celeste 64
  • Castlevania 64
  • A Short Hike
  • Yoshi's Island
  • Mario & Luigi: Superstar Saga
  • Bomb Rush Cyberfunk
  • Aquaria
  • Yu-Gi-Oh! Ultimate Masters: World Championship Tournament 2006
  • A Hat in Time
  • Old School Runescape
  • Kingdom Hearts 1
  • Mega Man 2
  • Yacht Dice
  • Faxanadu
  • Saving Princess
  • Castlevania: Circle of the Moon
  • Inscryption
  • Civilization VI
  • The Legend of Zelda: The Wind Waker
  • Jak and Daxter: The Precursor Legacy
  • Super Mario Land 2: 6 Golden Coins
  • shapez
  • Paint

For setup and instructions check out our tutorials page. Downloads can be found at Releases, including compiled windows binaries.

History

Archipelago is built upon a strong legacy of brilliant hobbyists. We want to honor that legacy by showing it here. The repositories which Archipelago is built upon, inspired by, or otherwise owes its gratitude to are:

We recognize that there is a strong community of incredibly smart people that have come before us and helped pave the path. Just because one person's name may be in a repository title does not mean that only one person made that project happen. We can't hope to perfectly cover every single contribution that lead up to Archipelago, but we hope to honor them fairly.

Path to the Archipelago

Archipelago was directly forked from bonta0's multiworld_31 branch of ALttPEntranceRandomizer (this project has a long legacy of its own, please check it out linked above) on January 12, 2020. The repository was then named to MultiWorld-Utilities to better encompass its intended function. As Archipelago matured, then known as "Berserker's MultiWorld" by some, we found it necessary to transform our repository into a root level repository (as opposed to a 'forked repo') and change the name (which came later) to better reflect our project.

Running Archipelago

For most people, all you need to do is head over to the releases page, then download and run the appropriate installer, or AppImage for Linux-based systems.

If you are a developer or are running on a platform with no compiled releases available, please see our doc on running Archipelago from source.

This project makes use of multiple other projects. We wouldn't be here without these other repositories and the contributions of their developers, past and present.

Contributing

To contribute to Archipelago, including the WebHost, core program, or by adding a new game, see our Contributing guidelines.

FAQ

For Frequently asked questions, please see the website's FAQ Page.

Code of Conduct

Please refer to our code of conduct.

Description
Archipelago Multi-Game Randomizer and Server
Readme MIT 74 MiB
Languages
Python 96.9%
Lua 0.9%
HTML 0.9%
Assembly 0.4%
CSS 0.2%
Other 0.4%