MistralHack is an experimental RPG built for the Mistral AI Hackathon. It pushes the boundaries of real-time AI integration by allowing players to rewrite the game's source code through voice commands while playing.
In the world of MistralHack, you are a "Brawler" in a reality controlled by The Architect (powered by Mistral AI). Reality is not fixed but is a script. By using your "Mana", you can whisper instructions to the Architect to shift physics, reveal hidden paths, or cast powerful spells.
- Speak: Hold Spacebar to record your intent (e.g., "Make me move twice as fast" or "Reveal the hidden path").
- Translate: ElevenLabs scribe_v2 transcribes your voice with high accuracy.
- Rewrite: Mistral (devstral-medium-latest) receives your intent and the current game logic, then generates a live patch.
- Narrate: ElevenLabs eleven_turbo_v2_5 narrates the changes made by the Architect.
- Deploy: The engine hot-reloads the
game_logic.pymodule instantly without interrupting your movement.
Powered by Mistral's coding models, the game can handle complex logic shifts. Whether you want to change your class (Mage, Scout, Tank), alter gravity, or spawn new entities, the Architect handles the refactoring in microseconds.
- The Architect: A constant presence that comments on your changes via ElevenLabs TTS.
- Dynamic NPCs: Characters like the Elder and Guard have unique voices and quest-specific dialogue.
- Quest System: Complete the "Architect's Sight" quest and "Reflex Calibration" mini-game to unlock the final confrontation.
Lillith is protected by a logic barrier. Once weakened by the Sigils of Truth, she enters a pursuit phase where she aggressively hunts the player. Players must use voice-casted spells (Lightning, Fire, Ice) to defeat her.
- Python 3.10+
- A working microphone
- API Keys for:
# Clone the repository
git clone https://github.com/ikathuria/MistralHack.git
cd MistralHack
# Use the provided .venv or create one
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtCreate a .env file in the root directory:
MISTRAL_API_KEY=your_mistral_key
ELEVENLABS_API_KEY=your_elevenlabs_keypython engine.py- Arrow Keys: Move your character.
- Spacebar (Start/Stop): Toggle voice recording. Speak your intent to the Architect.
- E Key: Interact with NPCs and items.
- R Key: Reset the game (after Win/Lose).
💡 Pro-Tip: Your Mana is your most precious resource. Don't waste it on small changes; save it for the final showdown with Lillith.
engine.py: The core loop and hot-reloading orchestrator.app/coder.py: The interface to Mistral AI for code generation.app/narrator.py: Voice recording (STT) and narration (TTS).game/game_logic.py: The "living" source code that gets modified by AI.game/constants.py: AGlobalRegistrythat preserves game state across logic reloads.
- Date: Feb 28th - March 1st, 2026
- Submission: Mistral AI Hackathon 2026.
- Focus: Demonstrating the power of Mistral's coding models and ElevenLabs voice models in interactive, low-latency environments.
- Primary AI Models:
devstral-medium-latest,scribe_v2,eleven_turbo_v2_5. - Demo Video: Link to Demo Video
Created with ❤️ by Ishani Kathuria.
