Catalog PyPI
Back to packageRELEASE DETAILS

0.1.0

PyPI

aica-gamelib-fork

Fork of the AICA gamelib with Tic-Tac-Toe support only

Published8 Jun 2026
Direct dependencies1
Transitive dependenciesNot calculated

README

Version 0.1.0 documentation

AICA Game Library Fork

This package is a fork of the AICA Game Library for the Game AI Competition Platform of the AI Club Aachen. It contains the shared base interfaces and the Tic-Tac-Toe implementation only. It is designed to be easy to use. Simply instantiate the Agent class and begin!

Installation

You can install the package via pip:

pip install aica-gamelib-fork

Creating an Agent

To create a game AI agent, you need to create a class that inherits from gamelib.GAME.agent.Agent. GAME is replaced by the relevant game. In this fork, the available game is tictactoe. You must implement two methods:

  1. initialize(self, agent_init_data): Setup your agent (e.g., store your player ID).
  2. get_move(self, game_state): Analyze the game state and return a Move object.

Game Concepts

GameState

The GameState object passed to get_move is defined in gamelib.GAME.gamestate.

Move

The Move object returned by get_move is defined in gamelib.GAME.move.

Example in TicTacToe

Here is a simple example of a tictactoe agent that selects the first available cell on the board.

from typing import override

from gamelib.tictactoe import Agent, GameState, Move

class MyTicTacToeAgent(Agent):
    @override
    def initialize(self, agent_init_data: dict) -> None:
        """
        Called once at the start of the game.
        agent_init_data contains 'player_id' (0 or 1).
        """
        self.player_id = agent_init_data["player_id"]

    @override
    def get_move(self, game_state: GameState) -> Move:
        """
        Called every turn. Returns the move you want to make.
        """
        # The board is a flat list of 9 integers
        # -1: Empty, 0: Player 0, 1: Player 1
        for position in range(9):
            if game_state.board[position] == -1:
                return Move(player=self.player_id, position=position)
        
        raise ValueError("No valid moves available.")

if __name__ == "__main__":
    # Instantiate and start the agent (run by the platform)
    agent = MyTicTacToeAgent()
    agent.start()

You can import this example agent right away with:

from gamelib.tictactoe.examples import TicTacToeAgent

Running Your Agent

The agent uses standard input/output (stdin/stdout) to communicate with the game engine, when running on the platform. This is handled automatically as long as your agent is a subclass of gamelib.GAME.agent.Agentand properly started in the __main__ block.

To test locally, you can use the DevRunner provided in the gamelib.GAME.dev_runner module:

from gamelib.tictactoe import DevRunner

runner = DevRunner()
agent1 = TicTacToeAgent()
agent2 = TicTacToeAgent()
runner.add_agent(agent1)
runner.add_agent(agent2)
runner.start()

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.12.3runtime

Distribution files

2 collected
aica_gamelib_fork-0.1.0-py3-none-any.whl

bdist_wheel · 19.53 KB · Python py3

Source file
aica_gamelib_fork-0.1.0.tar.gz

sdist · 67.1 KB · Python source

Source file

Repository

ACCESSIBLE
ai-club-aachen/game-ai-platform

Shared repository data · GitHub

License detected in repository
Not collected
Last push
24 Jul 2026
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

0count
Gauge · observed snapshots24 Oct 2026
10.50
2026-10-24: 0 · observed 2026-10-24T15:31:59.6951383Z
24 Oct24 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2402026-10-24T15:31:59.6951383Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:06 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:12031ea2a095ced492a8e1763be0b52916ec7fedb0bda37fedc802e22d111ef5

Other collected versions

View all collected versions →