🗂️ Table of Content


📄 Introduction


The game.py sets up and runs a game where multiple agents (attackers and defenders) interact based on defined strategies. It manages game initialization, the game loop, agent actions, visualization updates, and logging.

<aside> ⚠️

Warning

Please make sure you have read through

before many any changes.

Still not sure? Please reach out to the League team by submitting an issue in ‣.

</aside>

📤 Imports and Setup



⚙️ Initialization and Configuration

The script begins by initializing several game components and configurations:

  1. Variables:

  2. Game Rule Loading:

    # Load predefined game rules if specified
    if cfg.GAME_RULE is not None:
        load_game_rule(cfg, cfg.GAME_RULE)
    
  3. Game Context and Graph Initialization:

    ctx, G = initialize_game_context(cfg.VISUALIZATION_ENGINE, cfg.GRAPH_PATH, cfg.LOCATION, cfg.RESOLUTION)