skillfed

kaggle-environments

Kaggle Environments

kaggle-environments v1.32.6 141.1K downloads/30d#11,254 on PyPI446
License unclear Active released

What it is and what it does

Kaggle Environments is a framework for defining and running multi-agent game simulations. It emphasizes episode evaluation—running complete games between agents—rather than agent training. The library provides a simple interface to create environments (like Connect X and Tic Tac Toe), define agent functions that take observations and return actions, and run episodes to completion, collecting step-by-step results and rewards.

Agents can be written as Python functions, loaded from source code or files, or selected from built-in defaults like "random". The framework supports configurable timeouts, debug modes to catch agent errors, and rendering of game replays. It integrates with Open AI Gym for training workflows and includes utilities for running the same agents across multiple episodes to gather statistics.

Use it for:

  • Evaluate trained RL agents against each other or built-in baselines in competitive games.
  • Run tournament-style competitions between multiple agent implementations.
  • Generate episode data for analysis, visualization, or dataset creation.
  • Debug agent behavior by running games with verbose logging and error reporting.
  • Benchmark different agent strategies across configurable game parameters.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Kaggle Environments provides a framework for creating and running multi-agent game simulations, where agents compete or cooperate in configurable environments like Connect X and Tic Tac Toe.

Yes, if you need to run and evaluate multi-agent game simulations. The package is actively maintained, has low install friction, and provides a clean API for episode evaluation. However, verify the license terms first since they are not clearly stated in the package metadata. The 19 runtime dependencies (including JAX, transformers, and Flask) add complexity; ensure they align with your environment constraints.

Install

kaggle-environments on PyPI

pip

pip install kaggle-environments

uv

uv add kaggle-environments

poetry

poetry add kaggle-environments

Installing kaggle-environments

Before you install

Low friction: pure Python wheel with no compiled dependencies. Actively maintained with a recent release (7 days ago) and 446 GitHub stars. Requires Python 3.11 or later.

License in practice

License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before use in proprietary or commercial projects.

Quickstart

from kaggle_environments import make

env = make("tictactoe")
def my_agent(obs):
  return [c for c in range(len(obs.board)) if obs.board[c] == 0][0]

env.run([my_agent, "random"])

Requires Python 3.11 or later.

Verify before relying

  • Whether the unclear license permits commercial or proprietary use without restrictions.
  • Performance characteristics when running many episodes or with large environment configurations.
  • Stability and compatibility of the 19 runtime dependencies (Flask, JAX, transformers, etc.) across different versions.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 19 — Flask, gymnasium, gymnax, jax, jsonschema, litellm, numpy, open_spiel, pettingzoo, pokerkit, pydantic, pygame, pyjson5, termcolor, requests, shimmy, transformers, tenacity, google-auth
Maintenance actively maintained — 7 days since the last release
Last repo commit
First released
Downloads 141,054/month — #11,254 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: kaggle_environments-1.32.6-py3-none-any.whl

Tags

multi-agent game simulationcompetitive game environmentsagent evaluation frameworkturn-based game engineRL environment for gamesagent vs agent competitiongame episode evaluation
game-simulationmulti-agentrl-evaluation

More Artificial Intelligence packages

Further reading