Counter-Strike Interface

Build AI agents for Counter-Strike 1.6. Real-time game state streaming at 100Hz via Redis with structured observations and action schemas.

Python Redis 100Hz AI/RL Ready GPL-3.0
100Hz
Update Rate
10ms
Latency
CS 1.6
Game Version

Features

📊

Structured Observations

ObsV1 schema with player position, health, armor, weapons, and enemy data.

🎯

Action Interface

ActionV1 schema for movement, aiming, shooting, and all player commands.

Redis Pub/Sub

High-performance inter-process communication at 100Hz for real-time control.

🔍

Geometry Utils

Coordinate transforms, visibility checks, and spatial reasoning helpers.

🐳

Docker Support

Mock server for development without a running Counter-Strike instance.

🏆

Competitive Configs

MR15, knife rounds, overtime - ready for competitive training scenarios.

Architecture

CS 1.6 Server

AMX Mod X Plugin

Redis

Message Broker

Python Agent

Your AI Code

Quick Start

agent.py
from cs_interface import CSInterfaceConfig, CSInterfaceClient

# Connect to the game server
config = CSInterfaceConfig(
    redis_host="localhost",
    session_id="training"
)
client = CSInterfaceClient(config)

# Get current game state
obs = client.get_observation()

# Access player data
print(f"Health: {obs.player.health}")
print(f"Position: {obs.player.position}")
print(f"Enemies visible: {len(obs.enemies)}")

# Send actions
client.send_action({
    "forward": True,
    "attack": True,
    "yaw": 45.0
})