ai newsSa., 31. Okt.
EilmeldungWhat happens when AI starts self-replicating?

And Then There Were AI

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built And Then There Were AI is an AI-powered murder mystery game where you investigate supernatural suspects, collect evidence, and decide who committed the crime before time runs out. I interpr

dev.toSamstag 13:30 · 31.10.2 Min. Lesezeit
Bild: dev.to

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

And Then There Were AI is an AI-powered murder mystery game where you investigate supernatural suspects, collect evidence, and decide who committed the crime before time runs out.

I interpreted “Ghost in the Machine” as both a literal ghost story and a chance to put AI characters at the heart of the mystery. Each suspect has a personality, alibi, motive, secrets, and specific evidence that can make them confess. The game spans three cases: a storm-battered manor, a stranded express train, and an orbital biosphere.

GitHub repository: ankan2526/AndThenThereWereAI

The project uses FastAPI for the game API and Streamlit for the player interface. Mystery levels and their clues, rooms, and suspects are defined in JSON files.

The backend is built with FastAPI, and the game interface uses Streamlit. For in-character dialogue, I used Meta’s Llama 3.3 70B open-weight model through the Groq API. The game sends the model the current mystery, suspect profile, suspicion level, and evidence presented, then uses its response to continue the interrogation.

The model doesn’t decide the mystery rules on its own: the game tracks clues, turns, suspicion, confession requirements, and suspect dependencies. If no Groq API key is configured, a deterministic simulator keeps the game playable without a model call. The test suite checks core mechanics, including red herrings and a case where one suspect’s confession depends on another’s.

Open-weight models make it possible to build AI experiences around models that can be examined, compared, and potentially run through different providers. For this project, Llama provides flexible, character-driven dialogue, while the game’s core rules remain testable and work without a hosted model.

That separation matters: the mystery can still be played if the model service is unavailable, and the dialogue layer can evolve without replacing the underlying game mechanics.

The ghosts are not just there to reveal clues. They have their own stories, and the detective has to earn each confession. I wanted every piece of evidence to feel like it might change the conversation—and every wasted turn to bring midnight a little closer.

Quelle: dev.to (dev.to). Original öffnen