Skip to content

Framework Structure

GAIGResearch edited this page Jun 4, 2019 · 3 revisions

The framework is structured as follows:

  • core - Package contains core game classes and some *Test.java classes running unit tests on various functionality.
    • Game.java - Contains main game functionality (i.e. running instances of games)
    • GameState.java - Contains all information for a game state, including a ForwardModel object. It's used by the agents to interact with the game.
    • ForwardModel.java - Contains main engine functionality for advancing a state.
    • gameConfig - Package contains game configuration objects which define victory conditions
  • network - Package contains functionality for connecting to the original Python Pommerman framework. (Details)
  • objects - Package contains definitions for all game objects
    • GameObject.java - Defines generic game objects with a given type.
    • Flame.java - Defines flames for the game. Extends on GameObject by adding a time to live variable.
    • Bomb.java - Defines bombs for the game. Has a time to live variable, and a velocity. Handles bomb explosions. It updates its desired position on every game tick based on its velocity.
    • Avatar.java - Defines avatars for the game and all their properties, including playerID (for connection to AI player), kick ability, ammo, bomb blast strength, vision range, win status (win, loss, tie, incomplete), enemies, teammates and team ID. Handles property modifications based on power-up collection.
  • players - Package contains all AI players available. (Details)
  • utils - Package contains utility functions and tools for use within the framework. Highlights:
    • GUI.java - Handles the display of the game and all features in the frame.
    • GameView.java - Handles the display of one game state.
    • EventStatistics.java - Handles the recording of events happening in the game.
    • GameLog.java - Handles game logging including agent actions, random seed, game board size and game mode.
    • LevelGenerator.java - Handles board generation functionality.
    • Types.java - Contains all framework constants and enumerations defining player actions, game win states, tile types, game modes and directions. Includes game parameters, board generation parameters and settings for running with/without visuals and debugging. (Details)
    • Utils.java - Contains various static utility functions.
  • Run.java - Class containing helper functions for running the framework and main class for running jar with command line arguments.
  • Test.java - Main class used to run the framework. (Details)