Skip to content

acm-cmu/awap-game-engine-2026-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Carnegie Cookoff

Init

Create a venv

Mac/Linux

    python3 -m venv .venv
    source .venv/bin/activate

Windows

    python -m venv .venv
    .\.venv\Scripts\Activate.ps1

Install dependencies

    pip install --upgrade pip
    pip install -r requirements.txt

Run

To run for results:

    python src/game.py --red bots/duo_noodle_bot.py --blue bots/duo_noodle_bot.py --map maps/map1.txt

To run with local pygame renderer:

    python src/game.py --red bots/duo_noodle_bot.py --blue bots/duo_noodle_bot.py --map maps/map1.txt --render

To save replay file:

    python src/game.py --red bots/duo_noodle_bot.py --blue bots/duo_noodle_bot.py --map maps/map1.txt --replay replay_path.json

Bot API Document

API Google Doc

Repo Structure

  • src/game.py

    • Main entry point to the engine
  • src/game_state.py

  • src/robot_controller.py

    • The API that participants use to control the bots
    • Key rules:
      • each bot gets 1 move + 1 action per turn
      • actions must target within Chebyshev distance 1
      • need correct targets
  • src/game_constants.py

  • src/map_processor.py

  • src/map.py

  • src/tiles.py

  • src/item.py

  • src/render.py

    • Pygame renderer helpers to visualize both maps, bots, items, and the HUD (turn, money, active orders).
  • bots/*.py

    • Each bot file must define the following:
      class BotPlayer:
          def __init__(self, map_copy): ...
          def play_turn(self, controller): ...
  • maps/*.txt

    • sample maps

Map File Format

Tiles Legend

Char Tile
. Floor
# Wall
C Counter
K Cooker
S Sink
T SinkTable
R Trash
U Submit
$ Shop
B Box
b Bot spawn (both teams)

Example

See maps/maps1.txt file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages