Site Revisions Underway Some Features May Not Work

The G.A.N.

Building a GPT-Powered Text Fighting and Betting Simulator

Case Study

The G.A.N. (Generative Adversarial Network) is a fully autonomous, text-based fighting simulation and betting app — powered by GPT-4o and populated by 34 custom fighters from my Choose Your Fighter universe. Users place virtual bets, watch brutal AI-driven battles unfold in real-time, and walk away (hopefully) with stacks of fictional cash. Every fight is unpredictable, brutal, and full of personality.

Timeline and Development Process

First Concept Build

Early June 2024

Expanded Fighter System + Betting Engine

Summer 2024

Current Working Build

October 2024

Ongoing Game Integration

Present Day

Goals

  • Prototype a fully autonomous GPT-powered fighting system that feels chaotic, personal, and dynamic.
  • Develop a clean, retro-styled arcade UI that mirrors old-school fighting games and sportsbooks.
  • Explore dynamic odds-making, real-time combat narration, and smart special move systems inside a lean web app.
  • Lay the groundwork for future real-time multiplayer or crypto-based extensions.

What I Built

Fighter Selection

Choose any two fighters from 34 hand-crafted personalities — from vampire aristocrats to hardcore street punks — each drawn from the broader Choose Your Fighter lore.

AI Odds Judge

Click "Analyze Matchup," and GPT-4o acts as a smart odds-maker — analyzing fighter strengths, weaknesses, and random elements to create realistic betting lines.

Custom Betting Engine

Users place virtual bets based on the odds, with payouts dynamically adjusting based on underdog or favorite status. Just like real sportsbooks, underdog wins pay out big — favorites pay less.

Autonomous GPT-Powered Combat

Each fighter is powered by modular GPT-4o contexts, ensuring they stay fully in character. Combat unfolds with move-by-move narration: kicks, punches, grapples, critical hits, weapon attacks — all generated dynamically based on each fighter's style and backstory.

Fight Logs and UI Sync

The battle is logged turn-by-turn in a retro-styled fight feed, while health bars, meters, and status readouts update dynamically with each new move. It feels like an old CRT fighting game — but powered by AI under the hood.

Real-Time Token Monitoring

Behind the scenes, a robust console logging system tracks every GPT API call, records token usage for each fighter, and totals session cost — allowing efficient tuning, cost control, and optimization as the system scales up to larger tournaments.

The Tech Behind the Gloves

  • Modular GPT Integration: Fighters and judges operate under isolated system contexts, keeping roleplay sharp while minimizing token usage.
  • Move and Damage Engine: GPT generates both attack moves and critical impact judgment dynamically via separate API calls.
  • Smart Odds and Payout Engine: Fight analysis and betting odds are generated independently of actual fight outcomes to preserve unpredictability and fairness.
  • Dynamic Health and UI Updates: JavaScript handles seamless real-time updating of health bars, special meters, betting outcomes, and fight logs.
  • Expandable Fighter Templates: Adding new fighters is as easy as dropping into a JSON array — no rewriting needed.
  • Real-Time Tokenization Monitoring: A robust console log system tracks token usage for each GPT API call — allowing fine-tuning of efficiency, monitoring cost impact, and ensuring scalable AI interactions across full tournament brackets.

Technologies Used

  • HTML + CSS: Retro-inspired cyberpunk fight UI with glow effects, responsive layout, and minimal load time.
  • JavaScript: Core gameplay logic, GPT API interaction, odds calculation, betting engine, UI updates.
  • OpenAI API (GPT-4o): Character brains, odds analysis, combat move generation, damage judging, and narration.

Why It Rocks

  • Every fight is fully emergent — no two battles ever play the same.
  • It blends game design, sports betting, AI creativity, and lore into a single, wild system.
  • The fighters stay perfectly in-character thanks to modular system design and prompt engineering.
  • The system is modular and expandable: new fighters, abilities, modes, and even multiplayer could easily be added down the line.

Personal Reflection

Building The GAN taught me how to combine narrative design, gameplay systems, modular GPT architecture, and real-time UX flow — all while balancing complexity and creativity.

"It's like jamming Street Fighter, Vegas sportsbooks, and GPT-4o into a busted CRT monitor... and calling it a game."

More than just a simulator, The GAN feels alive — a chaotic, brutal, often hilarious collision of everything I love: gaming, AI, character design, and storytelling.

What's Next

  • Expand fighter roster with dynamic stat-tracking and skill trees.
  • Develop a tournament bracket system with multiple concurrent fights.
  • Introduce persistent character progression, wins, losses, injuries, and title histories.
  • Explore multiplayer or on-chain betting mechanics (crypto integration).
  • Continue evolving The GAN as the "fight engine" backbone for broader Choose Your Fighter gameplay projects.