π¨π³ δΈζ Β· πΊπΈ English
β β¦ β
# Cultivation World Simulator An AI-driven cultivation world simulator that aims to create a truly living, immersive xianxia world. ## Overview Cultivation World Simulator combines traditional game-rule systems with large language models. By first establishing a complete ruleset for the cultivation world, it creates an autonomous, vibrant, immersive virtual world with emergent stories. Core idea: **Build a credible rule-based world model first, then plug in AI to bring it to life.** ### Tech Stack - **Frontend Rendering**: pygame (Web support in the future) - **Simulation Engine**: custom event-driven simulator - **World Model**: rule-based deterministic systems - **AI Integration**: LLM-generated actions, decisions, micro-stories ## Background I have been a long-time reader of xianxia novels, from classics to modern works. As a game AI practitioner, I believe todayβs LLM capabilities are sufficient to support a xianxia-style world simulation. However, LLM-only NPC decision/dialogue is not enough. A credible rule system must ground the world as the βworld modelβ, and then AI makes it vivid. I aim to create a pure, joyful, direct, living sense of immersion. Not a mere marketing demo, nor purely academic like βStanford Townβ, but a world that players can actually feel and inhabit. If you like this project, consider starring it~ You can also watch intro videos for this project on my [Bilibili account](https://space.bilibili.com/527346837).  ## Development Progress ### ποΈ Foundation - β World map basics - β Diverse terrain types (plain, mountain, forest, desert, water, etc.) - β Time system - β Frontend UI - β Simulation framework - β Project documentation - β Config system - β Standalone release (packaged exe) - β Menu bar & Save & Load ### π Long-term Systems - [ ] Web frontend support - [ ] ECS parallel toolkit - [ ] Player-customizable prompts - [ ] Novelization/imagery/video for history and events - [ ] Player-controlled character ### πΊοΈ World System - β Basic tile mechanics - β Normal, cultivate, city, sect regions - β Same-tile NPC interactions - β Qi distribution and yields - β World event - [ ] Dynamic worldview, map, history, sect, and notable figure generation ### π€ Character System - β Core attributes - β Cultivation realms - β Spiritual roots - β Basic movement actions - β Trait & Personality - β Breakthrough system - β Relationships - β Interaction range - β Effect system: buffs/debuffs - β Techniques - β Combat equipment & auxiliary equipment - β Short/Long term memory - [ ] Character compatibility - [ ] Epithets/nicknames - [ ] Skill learning system: - [ ] Learnable skills - [ ] Life professions (alchemy, formations, planting, forging, etc.) - [ ] Mortals - [ ] Prodigies (stronger abilities and AI) ### ποΈ Organizations - [ ] Sect system - β Settings, techniques, healing, base, styles - β Special sect actions: Hehuan Sect (dual cultivation), Hundred Beasts Sect (beast taming) - [ ] Sect will AI, sect tasks - β Sect tiers - [ ] Clans - [ ] Court/Empire (TBD) - [ ] Inter-organization relations ### β‘ Action System - β Basic movement - β Action execution framework - β Defined actions (rule-complete) - β Long-duration actions and settlement - β Multi-month actions (cultivate, breakthrough, play, etc.) - β Auto-settlement upon completion - β Multiplayer actions: initiator + responder flow - β LLM actions that affect relationships - β Systematic action registration and runtime logic - [ ] Richer actions ### π Event System - [ ] World-scale events: - [ ] Auctions - [ ] Secret realm exploration - [ ] Martial tournaments - [ ] Heaven-earth Qi fluctuations - [ ] Sudden events - [ ] Treasure/cave emergence - [ ] Natural events: - [ ] Natural disasters - [ ] Beast tides ### βοΈ Combat - β Advantages and counters - β Win-rate estimation system ### π Items - β Basic items and spirit stones - [ ] Trading mechanics - [ ] Economy system ### πΏ Ecology - β Animals and plants - β Hunting, gathering, materials - [ ] Beasts/monsters ### π€ AI Enhancements - β LLM interface integration - β Character AI (rules AI + LLM AI) - β Coroutine decision making, async, multithreaded speedups - β Long-term planning and goal-driven behavior - β Reactive responses to external stimuli - β LLM-driven NPC dialogue, thinking, interaction - β LLM-generated micro-stories - β Use different models (max/flash) per task needs - β Micro-theaters - β Battle micro-theaters - β Dialogue micro-theaters - β Multiple writing styles - [ ] NPC observation space design - [ ] One-off choices (e.g., switch techniques or not) ### ποΈ World Lore - [ ] Lore framework - [ ] Worldbuilding - [ ] Ancient history generation ### Specials - β Fortuitous encounters - β Tribulations & Heart devils - [ ] Paths/Daos - [ ] Possession & Rebirth - [ ] Formations - [ ] Opportunities - [ ] Flexible world rules - [ ] Divination & Omens - [ ] Male-female traits inversion ## Usage ### Run Steps 1. Clone the repo: ```bash git clone https://github.com/your-username/cultivation-world-simulator.git cd cultivation-world-simulator ``` 2. Install dependencies: ```bash pip install -r requirements.txt ``` 3. Configure LLM: Edit `static/config.yml`: ```yaml llm: model_name: "qwen-plus" # or another model supported by LiteLLM key: "your-api-key-here" # your API key base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1" ``` For supported models, refer to [litellm documentation](https://docs.litellm.ai/docs/providers) 4. Run the simulator: ```bash python -m src.run.run ``` ## Contributors - Aku, for world design & discussion ## License This project is licensed as specified in the [LICENSE](LICENSE) file. ## Contact If you have any questions or suggestions, feel free to open an Issue or Pull Request. You're also welcome to leave a message on my [Bilibili account](https://space.bilibili.com/527346837)!