advice • 9 min read

The Mathematical Logic of the FLAMES Relationship Game: From Paper to Code

By Jig D • Published on July 2026

A nostalgic and algorithmic dive into the FLAMES letter-cancellation game. How modular arithmetic and character frequencies turn childhood curiosity into predictive fun.

The Nostalgic Pen-and-Paper Phenomenon

Before dating apps and algorithmic matchmaking, students across classrooms globally calculated romantic destiny on lined paper using a simple, brilliant letter cancellation game: FLAMES (Friends, Lovers, Affection, Marriage, Enemies, Siblings).

How the FLAMES Algorithm Works Step-by-Step

The mathematical mechanics of FLAMES rely on string filtering and modular cycle arithmetic:

  1. Character Normalization: Convert both names to lowercase and strip all spaces and punctuation.
  2. Letter Cancellation: For every identical letter present in both names, cancel one instance from each.
  3. Count the Remainder: Sum the remaining un-cancelled letters from both names. This integer becomes the count index N.
  4. Modular Elimination: Count through the 6-letter word "F-L-A-M-E-S". When you reach index N, eliminate that letter. Continue counting cyclically through the remaining letters until a single final letter remains.
Try It Digitally: Test our automated FLAMES Game Calculator right here on Love Calculator for instant calculations!