DEV Community

Dhinesh Babu G
Dhinesh Babu G

Posted on

GHOST.exe: I Built an AI Horror Game Where Evidence Matters More Than AI

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

👻 GHOST.exe — The Machine That Remembers

The system says it shut down. The logs say otherwise. Something remembers.

What if an abandoned computer system remembered something that never happened?

What if its records contradicted each other, and an AI investigator tried to explain the mystery?

Would you trust the machine?

I built GHOST.exe, an offline-first, AI-assisted horror investigation game, for Hacktoberfest 2026 Week 4: Ghost in the Machine.

What I Built

GHOST.exe turns a fictional abandoned computer system into an interactive mystery. Players investigate corrupted records, timestamps, memory fragments, and conflicting evidence to uncover what might have happened.

The central mystery begins with two conflicting records: a shutdown notice at 02:14 and another record indicating activity at 02:19.

Did the shutdown complete? Was the system still running? Or is something missing from the evidence?

Players discover artifacts, make investigation choices, and develop theories. The mystery unfolds through evidence rather than a simple chatbot conversation.

🧠 An AI Investigator That Cannot Decide the Truth

My biggest challenge was ensuring that the AI did not invent facts or confidently claim more than the evidence established.

An earlier version could overstate conclusions and reference clues the player had not discovered. That undermined the investigation: a mystery stops being meaningful if the AI can simply make up its answer.

I redesigned the investigator around one principle:

The AI can help interpret the mystery, but the evidence engine controls what the game can claim.

The improved design:

  • Gives the investigator only artifacts the player has discovered.
  • Maintains canonical facts, hypotheses, contradictions, and unresolved questions in the deterministic evidence engine.
  • Validates model-returned identifiers against the expected evidence classifications.
  • Rejects unsupported references and classifications.
  • Builds the displayed report from canonical source data instead of displaying unrestricted model-generated prose.
  • Preserves uncertainty when records conflict.

Structured output alone doesn't guarantee truth. A model can produce valid-looking data and still make unsupported claims. GHOST.exe separates model interpretation from the trusted evidence used to construct its report.

Demo

🎬 Watch GHOST.exe in action:

The demo shows my actual project in action.

🔗 GitHub repository: https://github.com/dhinesh-babu-7/GHOST.exe

Code

The project is open source:

👉 https://github.com/dhinesh-babu-7/GHOST.exe

The repository includes:

  • app.py — Streamlit application and interface
  • engine/ — investigation logic and evidence handling
  • ai/local_model.py — local AI integration and report validation
  • data/ — fictional story and artifact data
  • tests/ — automated regression tests
  • assets/ — project audio asset

The latest reported test run passed 23 tests, including regression coverage for unsupported facts, hidden artifact references, and incorrect contradiction classifications.

How I Built It

I built GHOST.exe using:

  • Python for the core application and investigation logic
  • Streamlit for the interactive interface
  • SQLite for persistent investigation state
  • Ollama for optional local language-model inference
  • Qwen2.5:3B as the local model I used during development
  • pytest for automated testing

The game is designed to remain playable without the local AI model, so the core investigation does not depend entirely on AI availability.

The architecture

The evidence engine owns the canonical classifications. The local model helps interpret the discovered evidence, but its response must satisfy validation rules before a report is displayed.

This separation makes it possible to have an AI-assisted mystery without letting generated prose silently rewrite the game's facts.

I also added regression tests for cases where the investigator might refer to hidden artifacts, make unsupported claims, or misclassify contradictions.

The result is not a claim that AI can never be wrong. It is a design that limits which generated outputs are allowed to influence the player's understanding of the mystery.

Why Does Open Innovation Matter?

Open innovation allowed me to build an AI-powered experience without making a proprietary cloud AI API the foundation of the project.

Open-source tools gave me the freedom to experiment with local inference, inspect the application architecture, and decide how the model interacts with the evidence engine.

Using a local model also made offline-first operation possible. The core mystery can still be investigated when the model is unavailable.

Just as importantly, an open repository lets other developers inspect the implementation, run the tests, challenge my design decisions, and suggest improvements.

For me, open innovation is not only about using free tools. It is about making the work accessible so that others can learn from it, question it, and build on it.

My Agent Session

I used an AI coding assistant during development to help debug the application, investigate test failures, and improve the evidence-grounding design.

I have not included a public DevRelay agent-session link in this submission. This section can be updated if I publish a shareable session.

The Spirit of It

The unsettling part of GHOST.exe isn't simply that a machine might be haunted.

It's that the machine can produce records that look convincing even when those records don't agree.

That idea influenced both the story and the engineering. I wanted the investigator to help the player explore possibilities without pretending that uncertainty had disappeared.

A contradiction is not automatically proof of a cover-up. A timestamp is not a complete explanation. And a confident AI answer is not necessarily a correct one.

Sometimes, the most disturbing answer is the one the evidence cannot yet establish.

The machine remembers. The records disagree. The investigation isn't over.

Prize Categories

This project is submitted for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine.

I will select and list any applicable partner prize categories according to the official challenge rules before publishing the final submission.


Thanks for checking out GHOST.exe! 👻

I'd love feedback on the evidence-grounding approach, the local-first architecture, and ideas for making the investigation more unsettling while keeping its logic consistent.

🔗 GitHub: https://github.com/dhinesh-babu-7/GHOST.exe

🎬 Demo: https://youtu.be/Lh93jFLQqG8

Hacktoberfest #OpenSource #AI #Python #Ollama #Streamlit #GhostInTheMachine

Top comments (0)