This project has been archived by its maintainers, and is no longer receiving any updates.
open-games-spec
Typed DSL for compositional game theory, built on gds-framework.
What is this?
open-games-spec extends the GDS framework with game-theoretic vocabulary — open games, strategic interactions, and compositional game patterns. It provides:
- 6 atomic game types — Decision, CovariantFunction, ContravariantFunction, FeedbackGame, CorecursiveGame, IdentityGame
- Pattern composition — Sequential, Parallel, Feedback, and Corecursive composition operators
- IR compilation — Flatten game patterns into JSON-serializable intermediate representation
- 13 verification checks — Type matching (T-001..T-006) and structural validation (S-001..S-007)
- 7 Markdown report templates — System overview, verification summary, state machine, interface contracts, and more
- 6 Mermaid diagram generators — Structural, hierarchy, flow topology, architecture views
- CLI —
ogs compile,ogs verify,ogs report
Architecture
gds-framework (pip install gds-framework)
│
│ Domain-neutral composition algebra, typed spaces,
│ state model, verification engine, flat IR compiler.
│
└── open-games-spec (pip install open-games-spec)
│
│ Game-theoretic DSL: OpenGame types, Pattern composition,
│ compile_to_ir(), domain verification, reports, visualization.
│
└── Your application
│
│ Concrete pattern definitions, analysis notebooks,
│ verification runners.
Quick start
pip install open-games-spec
from ogs.dsl.games import Decision, CovariantFunction
from ogs.dsl.composition import Flow
from ogs.dsl.pattern import Pattern
from ogs.dsl.compile import compile_to_ir
from ogs import verify
# Define games
sensor = CovariantFunction(name="Sensor", x="observation", y="signal")
agent = Decision(name="Agent", x="signal", y="action", r="reward", s="experience")
# Compose into a pattern
pattern = Pattern(
name="Simple Decision",
games=[sensor, agent],
flows=[Flow(source="Sensor", target="Agent", label="signal")],
)
# Compile and verify
ir_doc = compile_to_ir(pattern)
report = verify(ir_doc)
print(f"{report.checks_passed}/{report.checks_total} checks passed")
License
Apache-2.0
Credits & Attribution
Development & Implementation
- Primary Author: Rohan Mehta
- Organization: BlockScience
Theoretical Foundation
This codebase is a direct implementation of the research and mathematical frameworks developed by:
- Dr. Jamsheed Shorish (@jshorish) and Dr. Michael Zargham (@mzargham).
- Key Reference: Generalized Dynamical Systems, Part I: Foundations (BlockScience, 2021).
Architectural Inspiration
The design patterns and structural approach of this library are heavily influenced by the prior work of Sean McOwen (@SeanMcOwen), specifically:
Contributors
- Peter Hacker (@phacker3) — Code auditing and review (BlockScience).
Intellectual Lineage
This project exists within the broader ecosystem of:
- cadCAD: For foundational philosophy in Complex Adaptive Dynamics.
Metadata
Release files for open-games-spec 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| open_games_spec-0.1.0.tar.gz | 60.3 kB | Without provenance | Details for open_games_spec-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| open_games_spec-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for open_games_spec-0.1.0-py3-none-any.whl |
Total release size: 119.7 kB
Release files / open_games_spec-0.1.0.tar.gz
| Download URL | open_games_spec-0.1.0.tar.gz |
|---|---|
| Size | 60.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5d588c2abdbdc5b9efe43832472ccd3f10140b8967d86e3e4f740606c628a02
|
|
BLAKE2b-256 checksum How to use checksums |
757f9247011d925412c9b43222f2aecf55a2d045885f5a748e220677c21185e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / open_games_spec-0.1.0-py3-none-any.whl
| Download URL | open_games_spec-0.1.0-py3-none-any.whl |
|---|---|
| Size | 59.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c53501ad171a18523bf8761263002a36a27653ce8d3b4b94d34f6719a149a15
|
|
BLAKE2b-256 checksum How to use checksums |
0cf4cdc9fded87c394edea88e5e68f4bc7eaace7e150b4bafb4e00ecebeced4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for open-games-spec 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.