Skip to content

elandy/LLMAlchemy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLMAlchemy

A generative crafting game where players combine basic elements to discover new concepts. Every combination is computed in real-time using a local LLM (Ollama), making each playthrough unique and non-deterministic.

Screenshot


Gameplay

Start with four base elements:

  • Fire
  • Water
  • Earth
  • Wind

Drag two elements together to combine them. The system generates:

  • A new concept (e.g. Fire + Water → Steam)
  • A short explanation
  • A representative color
  • A persistent entry in your discovery graph

Core Features

🔥 LLM-driven crafting

All combinations are generated using a local model via Ollama.

🌐 Discovery graph

Every discovered element becomes a node in a directed graph of derivations.

🔄 Persistent game session

The game session is persisted in the browser and can be reset at any time.

🧪 Concurrent reactions

Multiple combinations can run in parallel, each resolving independently.

🎮 Drag-and-drop gameplay

Elements can be moved freely in a workspace and combined spatially.

🧠 Dynamic knowledge system

The game builds an emergent “world tree” based on user exploration.


Architecture

Frontend

  • React
  • dnd-kit (drag & drop system)
  • React Flow (discovery graph visualization)
  • TypeScript

Backend

  • FastAPI
  • Pydantic AI
  • Ollama (LLM inference)

Data Model

Each element contains:

  • id: unique identifier
  • element: display name
  • color: visual representation
  • explanation: generated description
  • parents: source elements used in creation

Planned changes

Fixes and improvements

  • Better error handling for the combine function

New features

  • Persistent game session (serverside)
  • Persistent cache for combined elements, so once someone discovers an element, everyone else gets the same result
  • Score system
  • Challenges: get a random element's name and receive massive points for discovering it
  • Leaderboards

About

A generative crafting game where players combine elemental concepts to discover new entities. Each combination is powered by a local LLM (Ollama), producing dynamic results, explanations, and visual properties. The game builds a persistent discovery graph that evolves as the player explores the space of possible combinations.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors