← All Posts

Rules Hammer: An AI Assistant for Warhammer 40K Rules

Visit Project ↗

Where Gaming Meets AI

If you've ever played Warhammer 40,000, you know the rules can be... complex. Multiple rulebooks, faction-specific codexes, FAQs, errata, and edition changes create a web of rules that even veteran players struggle to navigate mid-game. I wanted to fix that.

Rules Hammer is a conversational AI assistant that helps Warhammer 40K players quickly find and understand game rules through natural language questions.

How It Works

Ask Rules Hammer a question like 'How does cover work in 10th edition?' or 'What are the special rules for Space Marines Intercessors?' and it returns a clear, well-formatted answer. Responses are rendered in markdown for readability, and the system supports faction-specific filtering across 20+ factions so you can scope your queries to what's relevant.

The conversational interface means follow-up questions work naturally. Ask about a rule, then ask for clarification or an edge case, and the assistant maintains context.

The Technical Stack

Rules Hammer is built on Ruby on Rails with Hotwire for real-time communication. Responses stream to the browser via ActionCable, so you see answers appearing in real time rather than waiting for a full response. The frontend uses Stimulus controllers for interactive elements and D3.js for any data visualizations.

User accounts store conversation history, so you can reference past rules lookups during your next game session.

Solving a Real Problem

The Warhammer community is passionate and growing, but the complexity of the rules is a genuine barrier to entry. Rules Hammer makes the game more accessible by giving both new and experienced players a fast way to resolve rules questions without flipping through hundreds of pages.

Building AI for Niche Communities

This project reinforced something I believe strongly: AI is most powerful when it's applied to specific domains where expert knowledge is scattered and hard to access. A general-purpose chatbot can sort of answer Warhammer questions, but a purpose-built assistant that understands the game's structure and terminology does it far better.