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

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

Built distribution (wheel)

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

Total release size: 18.4 kB

Release files / gpclib-0.1.2.tar.gz

Download URL gpclib-0.1.2.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
83f303efd7fc06fcc56ab2ac2b7895cfaeb86823841c17e9e16e9a96d000a0a6
BLAKE2b-256 checksum
How to use checksums
dfd670fb8d701e542556bbb689c2e5dbbb3c979c380b33e4852e2380fce805cb
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 21, 2026.

Transparency log

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

Download URL gpclib-0.1.2-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
785e2b44fcdd7aa444f8a872611f66c564946ca1db68c222a24f7ddae49a490a
BLAKE2b-256 checksum
How to use checksums
b842cb15e7b24ee95d3cc551776ba7f626c426f4e2b77b486d54481526ed648c
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 21, 2026.

Transparency log

Security for gpclib 0.1.2

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.2.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 21, 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