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.1.1

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.1.1
File Size Uploaded Provenance Actions
gpclib-0.1.1.tar.gz 7.5 kB With provenance Details for gpclib-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 18.4 kB

Release files / gpclib-0.1.1.tar.gz

Download URL gpclib-0.1.1.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a832c2c3bf3f2f311b6729db2ba8d1bf0586b124ab85588d31aaa028142d0159
BLAKE2b-256 checksum
How to use checksums
c0ced9287d5deb8554621d3227de84e90ccd0605bdf10b551da8639941702237
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

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

Download URL gpclib-0.1.1-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c52d6c72bf90de6179a05cb703d605d7f249052d57c9e2617dae8d7cd3101d5
BLAKE2b-256 checksum
How to use checksums
b77dc21ad8e93b02c115dfd304448b0306c4be052ed562da339c96c53e409875
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Security for gpclib 0.1.1

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.1.1.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 19, 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