{"id":35887426,"url":"https://github.com/electronistu/Project_Infinity","last_synced_at":"2026-01-15T06:00:47.333Z","repository":{"id":305068485,"uuid":"1021799984","full_name":"electronistu/Project_Infinity","owner":"electronistu","description":"A blueprint for next-gen AI. Project Infinity uses a token-efficient, Codified Agent Protocol to create specialized, secure, and imaginative agents by grounding LLMs in a verifiable knowledge graph.","archived":false,"fork":false,"pushed_at":"2025-09-30T17:04:53.000Z","size":290,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-30T17:40:29.213Z","etag":null,"topics":["ai-gamemaster","dnd","dnd5e","dungeon-and-dragons","game-development","game-engine","generative-ai","interactive-fiction","large-language-models","llms","numpy","procedual-generation","procedural-content-generation","pydantic","python","rpg-game","text-based-rpg","world-generation","yaml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electronistu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-18T01:20:51.000Z","updated_at":"2025-09-30T17:04:57.000Z","dependencies_parsed_at":"2025-07-18T06:49:09.055Z","dependency_job_id":"adb36b9e-9bde-417b-97e5-2c93a7b0b1a7","html_url":"https://github.com/electronistu/Project_Infinity","commit_stats":null,"previous_names":["electronistu/project_infinity"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/electronistu/Project_Infinity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electronistu%2FProject_Infinity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electronistu%2FProject_Infinity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electronistu%2FProject_Infinity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electronistu%2FProject_Infinity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electronistu","download_url":"https://codeload.github.com/electronistu/Project_Infinity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electronistu%2FProject_Infinity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28444124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T05:05:00.929Z","status":"ssl_error","status_checked_at":"2026-01-15T05:04:58.515Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-gamemaster","dnd","dnd5e","dungeon-and-dragons","game-development","game-engine","generative-ai","interactive-fiction","large-language-models","llms","numpy","procedual-generation","procedural-content-generation","pydantic","python","rpg-game","text-based-rpg","world-generation","yaml"],"created_at":"2026-01-08T22:00:39.537Z","updated_at":"2026-01-15T06:00:47.306Z","avatar_url":"https://github.com/electronistu.png","language":"Python","funding_links":[],"categories":["Agent Categories"],"sub_categories":["\u003ca name=\"Unclassified\"\u003e\u003c/a\u003eUnclassified"],"readme":"# Project Infinity: A Dynamic, Text-Based RPG World Engine\n\nProject Infinity is a sophisticated, procedural world-generation engine and AI agent architecture. It demonstrates a novel solution to several critical challenges in modern AI, including state management, factual consistency, and the creation of highly efficient, specialized agents. The latest version introduces a radically improved agent protocol that enables more dynamic, emergent storytelling and achieves a new level of LLM-agnostic portability.\n\n## A Case Study in Next-Generation AI Architecture\n\nThis project serves as a proof-of-concept for building highly capable, consistent, and secure AI agents. By integrating a procedural generation engine with a knowledge-grounded Large Language Model (LLM), Project Infinity successfully overcomes several critical challenges in the field.\n\n### Key Innovations\n\n*   **Knowledge-Grounded Generative System (Graph RAG):**\n    At its core, Project Infinity utilizes a Graph RAG architecture. A \"World Forge\" engine first generates a comprehensive knowledge graph (`The Key`) that serves as a \"single source of truth\" for the AI. This graph is not just a list of entities, but a deeply interconnected world model of lore, politics, and geography. Grounding the agent in this graph solves the core problem of model hallucination.\n\n*   **Codified Agent Protocol:**\n    The project's primary innovation is its method for agent specialization. The `GameMaster.md` file (`The Lock`) is not a natural language prompt, but a highly structured, token-efficient protocol. Written as a YAML-based schema, it defines the agent's core logic, operational states, and behavioral directives in a format optimized for LLM-to-LLM communication. Crucially, the protocol now includes priming meta-instructions, making it robustly compatible across different foundational models (including Gemini, ChatGPT, and Mistral), ensuring the agent behaves consistently in any environment.\n\n*   **Proprietary Narrative Engine (L.I.C. Matrix):**\n    Beyond simple factual retrieval, the agent's storytelling is governed by the **L.I.C. (Logic, Imagination, Coincidence) Matrix**. This proprietary framework acts as an \"imagination driver,\" guiding the AI to weave facts from the knowledge graph with emergent story elements in a way that feels meaningful, creative, and alive.\n\n### Broader Implications\n\nWhile demonstrated within a complex gaming simulation, the architecture of Project Infinity serves as a powerful blueprint for a new class of enterprise-grade AI agents. The project's success in achieving stateful consistency and intrinsic security via its codified protocol presents a viable path forward for developing specialized AI that is not only highly capable but also reliable and safe for critical applications.\n\n---\n\n## Technology Stack\n\n*   **Backend:** Python 3\n*   **Data Validation:** Pydantic\n*   **Configuration:** PyYAML\n*   **Procedural Generation:** NumPy, noise\n\n## The \"Lock \u0026 Key\" System\n\nThe engine's core design principle is the separation of the agent's rules from the world's data.\n\n*   **The Lock (`GameMaster.md`):** This file is the **Codified Agent Protocol** (3.7 KiB). It is a YAML-based schema that instructs a general LLM on how to interpret world data, manage game mechanics, and execute its core logic. The protocol is LLM-agnostic, ensuring consistent agent behavior across different foundational models.\n\n*   **The Key (`output/\u003ccharacter_name\u003e_weave.wwf`):** This is the **Knowledge Graph**. It is a pre-generated world-state file that contains the core, static data of a unique world. The latest version uses a schema-driven, positional array format that reduces the file size from 27.7 KiB to a final, hyper-efficient 10.3 KiB.\n\n## Getting Started\n\n### 1. Prerequisites\n\n*   Python 3.8+\n*   `git`\n\n### 2. Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/electronistu/Project_Infinity\ncd project_infinity\n\n# Create and activate a Python virtual environment\npython3 -m venv venv\nsource venv/bin/activate\n\n# Install the required dependencies\npip install -r requirements.txt\n```\n\n### 3. World Generation (Optional)\n\nTo forge your own unique world, run the main script:\n\n```bash\npython3 main.py\n```\n\nThis will launch the interactive character creator. Follow the prompts to build your character, after which the Forge will generate your world. The output will be saved as a new `.wwf` file in the `output/` directory, named after your character.\n\nFor development, you can bypass the interactive prompts using the `--debug` flag:\n\n```bash\npython3 main.py --debug\n```\n\n## How to Play\n\nThis project includes a pre-generated world file, `output/electronistu_weave.wwf`, so you can start playing immediately.\n\n### Compatible Platforms\n\nThe protocol is designed to be LLM-agnostic and has been successfully tested on the following platforms. For best results, use the latest available models and set the **Temperature** to `0` for maximum consistency.\n\n*   **Google:** Gemini 2.5 Pro (via AI Studio, Gemini CLI, etc.)\n*   **OpenAI:** ChatGPT-5\n*   **Mistral AI:** chat.mistral.ai\n\n### The \"Lock \u0026 Key\" Process:\n\n1.  **Load the \"Lock\":** Start your session by providing the contents of the `GameMaster.md` file to your chosen AI platform.\n\n2.  **Await Confirmation:** The AI should respond with the words: `Awaiting Key...`\n\n3.  **Provide the \"Key\":** Paste the entire contents of the generated `.wwf` file (e.g. `output/electronistu_weave.wwf`).\n\n4.  **Begin Your Adventure:** The Game Master will parse the world and begin your unique, text-based adventure.\n\n### Emergent Agent Personas\n\nA fascinating outcome of this project is observing the distinct \"personalities\" that emerge when the same `GameMaster.md` protocol is executed by different foundational models. While the core rules and logic remain identical, the *flavor* of the Game Master changes, revealing the unique architectural biases of each LLM.\n\n*   **Gemini as \"The Cinematic Narrator\":** Gemini tends to produce a highly immersive, story-focused experience. Its output is often cinematic, with descriptive prose that sets a rich scene and immediately draws the player into a narrative, much like the opening of a film.\n\n*   **ChatGPT as \"The Interactive Guide\":** ChatGPT often adopts the role of a classic Game Master. It presents the world in a slightly more gamified manner, clearly outlining choices (often with numbered lists) and explicitly referencing game concepts, creating an experience reminiscent of a classic gamebook.\n\n*   **Mistral as \"The World Simulator\":** Mistral acts like a data-rich world simulator. Its output is incredibly structured, often presenting the player with a detailed dashboard of the current world state, including emergent quests, notable NPCs with stats, and environmental details. This empowers the player with a wealth of information, encouraging tactical and strategic decision-making.\n\nThis demonstrates that even with a rigid, codified protocol, the underlying model's \"imagination\" still shapes the final experience, making the choice of LLM a creative decision in itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectronistu%2FProject_Infinity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectronistu%2FProject_Infinity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectronistu%2FProject_Infinity/lists"}