Core¶
The core.py module provides a user-friendly entry point to the JAXAtari environment framework. Similar to the interface of OCAtari, it abstracts away low-level configuration details so you can get started quickly with just a few lines of code.
Here’s a minimal example:
from jaxatari import JAXtari
env = JAXtari("pong")
state = env.get_init_state()
state = env.step_state_only(state, action=0)
- jaxatari.core.make(game_name: str, mode: int = 0, difficulty: int = 0, mods_config: list | None = None, mods: list | None = None, allow_conflicts: bool = False) JaxEnvironment[source]¶
Creates and returns a JaxAtari game environment instance. This is the main entry point for creating environments.
If ‘mods’ is provided, this function applies the full two-stage modding pipeline: 1. Pre-scans for constant overrides. 2. Instantiates the base env with modded constants. 3. Applies the internal ‘JaxAtariModController’. 4. Wraps the env with the ‘JaxAtariModWrapper’.
- Parameters:
game_name – Name of the game to load (e.g., “pong”).
mode – Game mode.
difficulty – Game difficulty.
mods – List of modifications to apply (default: None).
allow_conflicts – Whether to allow conflicting mods (default: False).
- Returns:
An instance of the specified game environment.