-
Notifications
You must be signed in to change notification settings - Fork 0
Orchestrator Interaction
Serena Federici edited this page Dec 7, 2025
·
2 revisions
Here is how our planet reacts to the different events sent by the Orchestrator. We aim for maximum efficiency in every interaction.
Note: The code can be found inside the orchestrator module, if not stated otherwise.
Our planet handles Orchestrator messages as follows:
-
Sunray: If the Orchestrator tries to charge an already charged cell, we check our defenses. If the planet has no rockets, we immediately build one to avoid wasting the energy. Otherwise, we simply charge the EnergyCell. In both cases, the corresponding frequency counter is updated. -
Asteroid: if there is an availableRocket, it is immediately sent back. If there is not one but we have a chargedEnergyCell, aRocketis crafted at the moment. Otherwise, the destiny of the planet is sealed... In every case, the corresponding frequence counter is updated. Note: You can find the corresponding code inside theasteroidmodule. -
StartPlanetAI: set the AI as active, and initializes the frequency counters to begin tracking data. -
StopPlanetAI: Shutdowns the AI and resets the counters to zero. While the AI is inactive, the planet ignores all messages and simply returnsNone. -
InternalStateRequest: Sends a dummy copy of the currentPlanetStateback to the Orchestrator for inspection.