Inspiration

The debate around AI capabilities is everywhere — but it's mostly theoretical. We wanted to make it tangible. Can a human beat Gemini at chess? Can a person draw something more compelling than Imagen? Can you out-word an AI at Wordle? VERSUS was built to turn that question into a live, competitive experience anyone can participate in, and to let the data speak for itself through a global, real-time scoreboard.

What it does

VERSUS is a Human vs. AI battle platform featuring six distinct arenas: Tic-Tac-Toe, Chess, Wordle, Art, Music, and Singing. In each game, a human competes directly against a Gemini AI model. Logical games (Tic-Tac-Toe, Chess, Wordle) are decided algorithmically, while creative games (Art, Music, Singing) are sent to a community vote where neither submission is labeled — voters pick the better one blind. Every result feeds into a live global tally, letting you watch the running score of Humanity vs. AI in real time. Users can create accounts, earn badges for achievements, track their personal stats, and climb a global leaderboard.

How we built it

  • Frontend: Next.js 14 (App Router), TypeScript, Tailwind CSS, Framer Motion
  • Backend & Database: Supabase (PostgreSQL, Auth, Realtime, Storage) with custom SQL triggers for automated stat aggregation
  • AI: Google Gemini 2.5 Flash/Pro via the @google/generative-ai SDK for game logic, prompt generation, and creative tasks; Google Imagen 4 for AI art generation; ElevenLabs Music Generation + Voice Isolation
  • Game Logic: chess.js + react-chessboard for chess; custom canvas-based drawing tools with flood fill, ink brush, and smooth curve rendering for art; Web Audio API for music synthesis
  • Infrastructure: Deployed on Vultr VPS (Ubuntu 24.04) with Nginx, PM2, and Let's Encrypt SSL

Challenges we ran into

The hardest problem was making each game genuinely fair. For logical games, we had to carefully craft prompts that gave Gemini exactly the same information a human has — no more, no less. For Wordle, this meant building a dynamic constraint summary (equivalent to the human's keyboard view) and enabling extended thinking on harder models. For Chess, we implemented a retry loop for illegal moves with legal move enumeration as a fallback.

Getting Gemini to produce structured, parseable output reliably was another significant hurdle. Models would sometimes return truncated JSON or add narrative fluff. We resolved this by setting responseMimeType: "application/json", tuning thinkingBudget, and implementing per-game retry logic.

Accomplishments that we're proud of

  • A blind community voting system for creative games that hides which submission is human vs. AI until after the vote is cast
  • A real-time global tally that updates live across all sessions via Supabase Realtime subscriptions
  • A dynamic theme system with five distinct visual themes including a WCAG-accessible high-contrast mode

What we learned

Building competitive AI games taught us a lot about prompt engineering under constraints — the gap between "Gemini can play chess" and "Gemini plays chess fairly in a competitive product" is significant. We also gained deep experience with Supabase's trigger and RLS system, Next.js App Router data patterns, and the surprisingly complex world of HTML5 Canvas drawing tools.

What's next for Versus

We want to expand to more game categories targeting different cognitive domains like logic puzzles, math problems, trivia, and coding challenges. We'd also like to integrate additional AI providers (OpenAI, Claude, Grok) so VERSUS becomes a cross-model benchmark, not just a Gemini showcase. Longer term, a tournament bracket mode and time-limited live events ("Beat Gemini this weekend") would make the competitive angle even more compelling.

Built With

Share this project:

Updates