Python Reference

Stratega python bindings

load_config(path)

Loads game config

create_runner(gameConfig)

Create game runner

create_arena(gameConfig)

Create game aren

generate_agents(gameConfig)

Generate agents

set_default_logger(logPath)

Set default logger

load_levels_from_yaml(fileMapsPath, config)

Load Levels definitions from YAML

ActionType

Contains the definition of an action.

ActionFlag

Used to define how the SGA::ForwardModel::executeAction() will execute this action.

ActionInfo

Contains the last tick this action was executed and the action type ID.

Action

Contains the main information of an action as the action type id that is linked to an ActionType

EntityType

None, Position, Tile, EntityType, Entity, Technology, ContinuousAction, Object, SlotObject

Entity

None, Position, Tile, EntityType, Entity, Technology, ContinuousAction, Object, SlotObject

TileType

Contains all the information of a tile type.

Tile

Contains the instanted object of a Tile information.

BoardTiles

Contains a 2D grid of tiles.

Player

Contains all the implementation of a player.

GameType

Enum that contains all the basic game types

GameDescription

Represents a grouping of action and entity types into categories

EntityCategory

Represents a grouping of entity types into categories.

ActionCategory

Represents a grouping of action types into categories.

Parameter

Contains all the information of a parameter such as the default, min and max value.

ActionSourceType

Used to know who is the source of an action, it can be a entity or a player.

TargetTypeEnum

Target type: None, Position, Tile, EntityType, Entity, Technology, ContinuousAction, Object, SlotObject

TargetType

Target type: None, Position, Tile, EntityType, Entity, Technology, ContinuousAction, Object, SlotObject

SamplingMethod

Contais the definition of the sampling method used to sample the targets.

Condition

An abstract class used to check a condition in a gamestate

Effect

An abstract class used to modify the gamestate

ActionTargetEnum

Used by Action to reference any possible type of target available in Stratega.

ActionTarget

Used by Action to reference any possible type of target available in Stratega.

EntityPlacement

Contains the information of a entity placement

LevelDefinition

Contains the definition of a level, this include the string and the default entity placaments.

TechnologyTreeCollection

Contains a list of technology trees, indexed by a unique ID.

TechnologyTreeType

Contains the definition of a technology tree type.

TechnologyTreeNode

Contains definition of a specific technology.

GameRunner

An abstract class that provides a simplified interface to play games with a given SGA::GameConfig.

GameConfig

Contains the current configuration of a game.

GameInfo

Contains all the type information used by the game.

Arena

The Arena provides an easy way to test the performance between different Agents in different environments.

GameObserver

An interface for observing events in a game.

MinimizeDistanceHeuristic

Heuristic that focus in minimizing the distance with the enemy.

ActionAssignment

A collection of action-assignments to entities and players in a game.

GameState

Contains the game data without any logic, offering access to the current board, a list of player and their units.

EntityForwardModel

Is the driving component of Stratega, with a provided gamestate it can generate a new set of available actions thanks to the

TBSForwardModel

Is the default SGA::ForwardModel for TBS games, it contains specific methods.

RTSForwardModel

Is the default SGA::ForwardModel for RTS games, it contains specific methods.

OnTickEffect

Set of effects executed every tick

OnEntitySpawnEffect

Set of effects executed every entity is spawned

Path

Contains all the points of the path and the current point index.

Agent

Abstract class from which all agents should inherit.

Timer

Is an object that interacts with the game and responds to player input or other entities.