Skip to main content

Procedural Game Engine powered by IntentShield and LogicShield (BSL 1.1)

Project description

# Sovereign Engine

The Zero-Trust Procedural Game Engine. Built securely on the IntentShield and LogicShield architectures.

Sovereign Engine allows game developers to seamlessly integrate LLMs (Large Language Models) into their games to generate procedural dialogue, dynamic quests, and complex NPC interactions while absolutely guaranteeing that the AI's output mathematically adheres to your game's rules.

Installation

pip install sovereign-engine

Features

  • Deterministic Validation: The LogicShield backend forces the LLM to output perfect JSON.
  • Action Gatekeeper: A deeply integrated, ultra-fast IntentShield system intercepts the AI's intended actions.
  • Local First: Runs purely on your local graphics card natively via Ollama out of the box.
  • B2B Cloud Scaling: Seamlessly route thousands of requests per second to the SovereignShield enterprise Cloud API.

Quick Start (Local Setup)

Sovereign Engine connects directly to Local Ollama by default.

from sovereign_engine.engine import ProceduralDialogueEngine

# Defaults to localhost:11434 with llama3.1:8b
engine = ProceduralDialogueEngine()

scene = engine.generate_node(
    player_state={"level": 5, "inventory": ["Iron Sword"]},
    recent_history=["You enter a dark cavern and hear a low growl."],
    player_action="I walk forward."
)

Changing the Local Ollama Model

If you want to use a different model installed on your machine:

engine = ProceduralDialogueEngine(ollama_model="mistral:latest")

Connecting to SovereignShield SaaS (Cloud Routing)

If you don't want to run the engine locally on player hardware, you can instantly proxy all logic up to the centralized enterprise API layer:

engine = ProceduralDialogueEngine(
    cloud_proxy_url="https://engine-api-467902938909.us-central1.run.app/v1/engine/generate",
    api_key="your-commercial-license-key"
)

Customizing Rules (LogicShield) & Actions (IntentShield)

Expand the engines mathematical mechanics to fit your custom game:

from sovereign_engine.logicshield.rules import Rule

my_rules = [
    Rule.less_than("gold_dropped", "max_loot")
]

engine = ProceduralDialogueEngine(
    ollama_model="llama3.1:8b",
    custom_actions=["STEAL", "CRAFT", "PERSUADE"], 
    custom_rules=my_rules
)

License

Released under the Business Source License 1.1 (BSL 1.1). Non-production and personal use is completely free.
For commercial licensing or production API integration, contact: contact@sovereign-shield.net

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

sovereign_engine-1.0.8.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

sovereign_engine-1.0.8-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file sovereign_engine-1.0.8.tar.gz.

File metadata

  • Download URL: sovereign_engine-1.0.8.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for sovereign_engine-1.0.8.tar.gz
Algorithm Hash digest
SHA256 d10c37b51b3c0b9c7fcca0fd707577a8cbf52e1aa8496c7395d47a2acfe508b2
MD5 3e080654470bd54ff535787b47ea44d8
BLAKE2b-256 705b8b4f1aa11b93fc7dcfb8012a35d3597dff3655a7b40e90b87741188bbb1d

See more details on using hashes here.

File details

Details for the file sovereign_engine-1.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for sovereign_engine-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 99ffb19b7a8da3b508eeeef9c3847612d1cf75b047d26db2eecedbb6354e7ed9
MD5 c4829012e0e4e1fd727477462730239a
BLAKE2b-256 5e4512bb87854308786c5755c995f37a7e75453baf791e598fe56420b6ba12cb

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