Skip to main content

GPC: A Framework for World-Model-Based Generative Control

PyPI CI Python License: MIT

GPC is a framework for world-model-based Generative Predictive Control.

A GPC controller combines three components:

  • a generative policy that proposes action plans from recent observations,
  • a world model that simulates the future each plan would lead to, and
  • an objective that scores those simulated futures against a goal.

At each replanning step, the controller picks the plan whose predicted future scores best, then executes it in the environment.

Installation

GPC requires Python 3.12 or newer. It is lightweight, with PyTorch as its only substantial dependency, so it drops into existing training and robotics stacks easily.

uv add gpclib    # or: pip install gpclib

Quick start

Implement a Policy, a WorldModel and an Objective, then wire them into a controller:

from gpc import GPCRank

controller = GPCRank(policy, world_model, objective, action_horizon=4, num_samples=32)

controller.reset()
for step in range(100):
    action = controller.act(frames, proprio=proprio, goal=goal)  # [B, A]

See the quickstart for full examples and the API reference for details.

Development

just test       # run the test suite with coverage
just validate   # format check, lint and type check
just docs       # serve the docs locally

See CONTRIBUTING.md for CI checks, testing, tensor shape annotations and documentation guidelines.

Metadata

Release files for gpclib 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gpclib 0.2.0
File Size Uploaded Provenance Actions
gpclib-0.2.0.tar.gz 17.9 kB With provenance Details for gpclib-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gpclib 0.2.0
File Interpreter ABI Platform Actions
gpclib-0.2.0-py3-none-any.whl Python 3 none any Details for gpclib-0.2.0-py3-none-any.whl

Total release size: 42.5 kB

Release files / gpclib-0.2.0.tar.gz

Download URL gpclib-0.2.0.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
feb8b2affdc93a2448c1dc01ec1ca70c7c39560dffa31bcd6b6e88951446975a
BLAKE2b-256 checksum
How to use checksums
86c7e48e7da6290c16ec7de0ce9ca31490635d18e6030541b69b2ca88c81f531
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / gpclib-0.2.0-py3-none-any.whl

Download URL gpclib-0.2.0-py3-none-any.whl
Size 24.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a96c09282cbbda1dedcf8e803a0d53af212e385dc391c97e0bc19e7442c5b5b5
BLAKE2b-256 checksum
How to use checksums
984561f59b194582b91aceb232154f5b6d5d3d2e6216f37119944a7a9ee37c7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Security for gpclib 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gpclib-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page