GALACTIC GRID

Back to Master Journal IndexVolume II // Entry #08
Volume II: AI Development Workflows & Systems Architecture

Mathematical Grid Balancing: Structuring Data Pools & Slot Economies

Secondary Trait Extrapolation, resolving multi-layer entity roles, and auditing daily grid solvability in our admin builder.

By Chris, Lead Product & UX Architect (with Scott, Lead Data Engineer)

By Chris, Lead Product & UX Architect (with Scott, Lead Data Engineer)

When players open Galactic Grid every morning, they see a clean 3x3 matrix. While traditional grid games rely heavily on generic topical tags, the magic of Galactic Grid comes from title-by-title intersections across the X and Y axes. Pairing one film or television series against another is where the continuity of the lore truly glows brightest.

Categories like droids, planets, or factions are introduced as fun, difficult modifiers to spice up specific daily gauntlets, but the pure title crossovers are where narrative logic takes center stage.

Behind that simple nine-box visual interface sits a complex mathematical puzzle.

Building a daily grid game is not just a matter of picking random titles and pairing them together. If you pair two niche titles or combine a rare modifier with an obscure show, you risk creating a "dead-end cell" where zero valid entities exist in the database. Nothing ruins a daily puzzle faster than a box that cannot be solved.

To make every daily board feel fair, engaging, and solvable, Scott and I had to build a data pipeline that evaluates the relational depth of our database and performs real-time pre-flight audits before any grid is scheduled for production.

The Relational Depth Problem: Going Two Layers Deep

Early in our database testing, we encountered an unexpected data challenge. We knew certain answers were 100% factually correct from watching a show, but our API route kept marking them as invalid answers.

The problem stemmed from how public wikis structure high-level category pages versus character pages.

For example, take a category modifier like Bounty Hunters intersecting with a modern live-action series centered around a famous bounty hunter. If a player entered a generic bounty hunter character who appeared in that series, the answer validated smoothly because the character's dedicated Wookieepedia page explicitly listed the show in its "Appearances" section.

However, if a player typed a broader role or faction entity that should logically fit that square, Wookieepedia's high-level category article for Bounty Hunters did not necessarily list every single spin-off show in its own top-level appearances section.

We could have spent hundreds of manual hours logging into Wookieepedia to edit thousands of appearance sections by hand. Instead, Scott engineered an elegant backend solution: Secondary Trait Extrapolation.

// Multi-Layer Relationship Extrapolation Logic
export interface EntityTraitNode {
canonicalId: string;
canonicalName: string;
directAppearances: string\[]; // Media titles listed directly on page
associatedRoles: string\[]; // e.g., \["bounty\_hunter", "mandalorian"]
}
export function validateExtendedIntersection(
entity: EntityTraitNode,
targetMediaTitle: string,
targetRoleCategory: string
): boolean {
// Direct Check: Does the entity itself directly appear in the media title?
const hasDirectAppearance = entity.directAppearances.some(
(title) => title.toLowerCase() === targetMediaTitle.toLowerCase()
);
// Trait Check: Does the entity possess the category role?
const holdsCategoryRole = entity.associatedRoles.includes(targetRoleCategory);
// Extrapolated Validation: If the character has the role AND appears in the show,
// the category-role query validly resolves for that cell.
return hasDirectAppearance && holdsCategoryRole;
}

By allowing our engine to go two layers deep, linking characters to their intrinsic roles and then mapping those characters to their media appearances, we unlocked thousands of valid crossover intersections across the database.

A cell combining a specific role category and a television series suddenly recognized every character who held that role within that show. It eliminated unfair rejections and made the game board feel intelligent, flexible, and true to the lore.

Category Pools & The Television Lore Expansion

When designing a daily puzzle game, developers often worry about "exhausting the pool", running out of fresh combinations or overusing famous primary characters until players get bored.

We quickly discovered that in a sprawling space opera, the data pool is virtually bottomless.

While original feature films provide tight, iconic data sets bounded by a two-hour runtime, television series expand the slot economy exponentially. A multi-season animated or live-action series contains dozens of hours of screen time, introducing hundreds of secondary characters, specialized droids, distinct planetary locations, and obscure faction ranks.

+-----------------------------------------------------------------------+
| DAILY GRID SLOT ECONOMY |
+-----------------------------------------------------------------------+
| Title x Title Intersections: Pure narrative continuity, testing how |
| characters bridge different sagas, eras, and television series. |
| |
| Category Modifiers: Strategic difficulty spikes using specific |
| droids, planets, starships, or faction roles. |
+-----------------------------------------------------------------------+

Because our database indexes thousands of verified entities from public wiki archives, the number of possible 3x3 matrix permutations is astronomical.

We can rotate core titles and occasional category modifiers across different galactic eras indefinitely without repeating a board layout. And for our most dedicated, hardcore lore players who eventually master the standard daily boards, we have already designed backend mechanics for expanded grid formats and specialized challenge modes down the road.

Pre-Flight Grid Audits: The Admin Grid Builder

Even with a massive database and two-layer trait extrapolation, we never leave daily grid balancing to random chance. You cannot simply press a "randomize" button on a production server and hope the resulting grid is playable.

To guarantee that every scheduled grid is fun and solvable, Scott built a custom internal administration interface for assembling and auditing daily gauntlets.

Our admin grid builder visually mirrors the 3x3 board interface used on the main site. As we select titles and category modifiers along the X and Y axes during board assembly, the backend immediately queries MongoDB across all nine intersections:

Instant Cell Counting: The server executes validation queries against every cell on the draft matrix in real time.

Visual Volume Display: Each cell on the admin builder matrix displays an active counter showing the exact number of valid, matching database entries for that specific square.

Human Quality Review: Before locking a grid into the publication schedule, we inspect the nine cell counts to ensure every intersection has an adequate volume of possible answers—ranging from broad fan favorites to obscure deep cuts.

+-----------------------------------------------------------------------+
| ADMIN GRID BUILDER BOARD |
+-----------------------------------------------------------------------+
| [ Col 1 ] [ Col 2 ] [ Col 3 ] |
| [ Row 1: Title A ] | 14 Answers | 22 Answers | 9 Answers | |
| [ Row 2: Title B ] | 8 Answers | 18 Answers | 12 Answers | |
| [ Row 3: Title C ] | 5 Answers | 11 Answers | 7 Answers | |
+-----------------------------------------------------------------------+

By displaying answer counts right inside the draft grid layout, the admin builder allows us to assemble balanced, highly playable daily boards in seconds.

Key Takeaways for Indie Developers

Structuring data pools and balancing puzzle economies is one of the most rewarding challenges in game development.

Highlight True Intersections: Focus your matrix design on the crossover points that matter most to players, such as direct title-by-title continuity connections.

Dig Deeper Than Surface Links: If direct database relations miss obvious connections, build secondary trait-inheritance logic to map roles and characteristics dynamically.

Build Visual Admin Tooling: Build internal admin tools that mirror your app's frontend layout and display live data metrics so you can inspect puzzle difficulty visually before publishing.

Protect the Player's Trust: A grid game is a contract between the creator and the player. Ensuring that every cell is fair, solvable, and populated with valid data keeps players returning every day.

By pairing multi-layer data extrapolation with visual administrative audits, Scott and I created a daily puzzle engine that is mathematically balanced, endless in variety, and deeply satisfying to solve.