Inspiration

We began with the No Free Lunch theorem, which says that every insight comes at a cost and no information is truly free. After one of us dozed off while reading a logic proof, we started to imagine what it would be like if the proof pushed back. Inspired by our love for Inscryption, we decided to turn the scientific method into a tense and quirky game.

What it does

The game uses a 9x9 board where gold is hidden based on a secret boolean formula using five hidden maps (AND, OR, XOR), for example, (M1 XOR M3) OR M5. On each turn, you can drill a cell for points or use your turn to build a full guess with logic machines. If you figure out the formula, you win right away. The twist is that all information is public, so any clue you uncover is also available to your opponent. You play against The Assayer, an AI opponent whose taunts are written by GPT but always based on an exact solver, so it can talk trash but never lies aboWe adopted a Codex-first approach: the design system, rules, and skills are stored in the repository as agent-readable memory (AGENTS.md, .agents/), enabling Codex to maintain stylistic consistency across multiple development sessions. The game's development was guided by hand-drawn sketches provided as references.heThe game utilizes a dedicated engine and an exact solver. Boards are represented as bitboards ($b\in{0,1}^{81}$), and the solver systematically enumerates all configurations consistent with publicly available evidence. Eighteen tests ensure the invariant that the underlying truth is always preserved.anThe AI opponent operates with integrity: a Convex action invokes GPT-4o-mini solely to articulate facts that have already been established by the solver. While the model selects the phrasing, the underlying logic ensures factual accuracy, preventing any fabrication within the game.ItThe technology stack includes React, Tailwind, and shadcn, with Convex facilitating real-time online play, all deployed via GitHub Pages.e online play, on GitHub PTo ensure that the exact solver presents a winnable challenge, we introduced a fallible “Night Shift” difficulty mode, allowing skilled human players the opportunity to succeed.cuWe encountered issues with a tilted 3D board that failed to register user interactions due to nested preserve-3d hit-testing. This was resolved by reconstructing the board as a single flat transform with visually rendered depth.t transform with painted depth.

To maintain security, the OpenAI API key is never exposed to the browser or included in version control. All API calls are handled server-side within Convex, ensuring the key remains confined to the backend.

Accomplishments that we’re proud of

We developed an AI opponent that is demonstrably honest, supported by a genuine solver for every interaction, ensuring that a game centered on the scientific method maintains its integrity. The final product includes an introduction, multiple endings, two difficulty levels, online play, sound, and a narrative twist that redefines the overall experience.

What we learned

We found that grounding AI responses in symbolic computation is more effective than relying solely on prompt engineering. The most convincing AI character is one that is structurally incapable of providing false information, as its statements are derived from a symbolic engine that computes the truth in advance. Additionally, we learned that providing only coarse HOT/WARM/COLD feedback (approximately 1.6 bits) is a deliberate security measure; offering numeric feedback would reveal $\log_2 82 \approx 6.4$ bits, which could be exploited by a solver.

What’s next for No Free Lunch

Future plans include implementing a daily puzzle seed with a shared formula and Wordle-style sharing, similar to features found on LinkedIn. Additional goals involve developing a classroom mode that explicitly highlights Boolean logic, enabling spectator replays, and updating the narrator to the latest GPT model for enhanced improvisational capabilities, for even sharper improvisation.

  • I noticed that because my voice was too loud, it covered the background music and the interactive sounds. Please do give it a try! We have great sound feedback.

Built With

Share this project:

Updates