Skip to main content

A pythonic Very Small Size Soccer (VSSS) simulation environment for reinforcement learning research.

Project description

pSim

PyPI version License: GPLv3 Python versions Documentation

pSim Logo

pSim: Very Small Size Soccer Simulation Environment

Comprehensive simulation platform for autonomous robotic soccer development


Welcome to pSim

pSim is a comprehensive, pythonic simulation environment specifically designed for the Very Small Size Soccer (VSSS) competition. It provides researchers, students, and developers with powerful tools to develop, test, and validate autonomous robotic soccer strategies and algorithms.

Whether you're working on traditional control algorithms, reinforcement learning, or multi-agent coordination, pSim offers the flexibility and performance you need.


Quick Start

Installation

pSim uses uv for fast, reliable package management. See the installation guide for complete setup instructions including uv installation.

# Quick install with uv
uv venv --python 3.12
uv pip install pSim[all] --upgrade
# Or, after venv only install a specific dependency
uv pip install pSim[gym]   # For Gymnasium support
uv pip install pSim[zoo]   # For PettingZoo support
uv pip install pSim[all]   # For both Gymnasium and PettingZoo

First Simulation

from pSim import SimpleVSSSEnv
import numpy as np

# Create your first simulation with custom robot counts
env = SimpleVSSSEnv(
    render_mode="human",
    scenario="formation",
    num_agent_robots=2,      # Number of controllable robots
    num_adversary_robots=3   # Number of opponent robots
)
obs, info = env.reset()

# Run simulation steps with random actions
for step in range(1000):
    # Generate random actions for all agent robots [v, w] (velocity, angular velocity)
    action = np.random.uniform(-1, 1, (env.num_agent_robots, 2))
    obs, reward, terminated, truncated, info = env.step(action)
    if terminated or truncated:
        obs, info = env.reset()

env.close()

Environment Types

pSim provides three main environment types, each designed for different use cases:

  • SimpleVSSSEnv: For traditional control and testing.
Single robot simulation

Single robot simulation environment

Full team match simulation

Full team match with complete team

  • VSSSGymEnv: For reinforcement learning with Gymnasium compatibility.
Single robot simulation

Single robot reinforcement learning

Full team match simulation

Single robot in competition

  • VSSSPettingZooEnv: For multi-agent reinforcement learning with PettingZoo compatibility.
Feature 1

Cooperative Two Agents

Feature 2

Competitive Three Agents

Feature 3

Three vs Three Roles

Feature 4

Competitive Two Agents

Features

Traditional Control

  • PID controllers, MPC, and other traditional methods
  • Path planning and trajectory optimization
  • Formation control and cooperative behaviors

Reinforcement Learning

  • Compatible with Stable Baselines 3, Ray RLlib, and other RL libraries
  • Customizable reward functions and observation spaces
  • Curriculum learning through scenario configuration

Research & Education

  • Multi-agent coordination studies
  • Emergent behavior analysis
  • Algorithm benchmarking and comparison

Competition Preparation

  • Strategy development and testing
  • Opponent modeling and adaptation
  • Performance analysis and optimization

Realistic Physics

Box2D-powered physics simulation with customizable parameters for accurate robot and ball dynamics.

Human-Machine Interface

  • Keyboard Controls: Full keyboard input with intuitive mappings
  • Joystick Support: Universal controller compatibility
  • Robot Switching: Dynamic selection between controllable robots
  • Team Management: Control different teams independently
  • Ball Control Mode: Direct ball manipulation

Getting Help


Contributing

We welcome contributions! Please see our Contributing Guide for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psim-0.2.4.tar.gz (7.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

psim-0.2.4-py3-none-any.whl (8.0 MB view details)

Uploaded Python 3

File details

Details for the file psim-0.2.4.tar.gz.

File metadata

  • Download URL: psim-0.2.4.tar.gz
  • Upload date:
  • Size: 7.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for psim-0.2.4.tar.gz
Algorithm Hash digest
SHA256 efc56ee4f8466456bda872128c384702dd7f718501f375d79d9a80ca0d54fbb9
MD5 bd7db30e11f37956c38bb8fb1e1f8b9e
BLAKE2b-256 3fab6087280e06451759e12d7c1c1e44286aad63baddec2d87ece39c63b60c3a

See more details on using hashes here.

File details

Details for the file psim-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: psim-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 8.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for psim-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 08d53cddd05abee36b267f751222b1a4d141def843ef90e6847cb03d8730e3b7
MD5 58b332b3abdd81689aa171eb4e40a9d5
BLAKE2b-256 dd39583a29de257290aa7fddace67da8974580fc2b72569135e314f80efb304e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page