DEV Community

Cover image for ๐Ÿ”ฎ Beat the Oracle: A FIFA World Cup 2026 AI Prediction Duel
Hemalatha Nambiradje
Hemalatha Nambiradje

Posted on

๐Ÿ”ฎ Beat the Oracle: A FIFA World Cup 2026 AI Prediction Duel

June Solstice Game Jam Submission

This is a submission for the June Solstice Game Jam

What I Built

Beat the Oracle is a daily FIFA World Cup 2026 prediction game where you go head-to-head against an AI โ€” Google's Gemini 1.5 Flash โ€” to call match scores before kickoff. Out-predict the machine and you win the day's Turing Test. Lose, and the Oracle has outsmarted you... until tomorrow.

Every day you're served the same 5 matches as everyone else: some already played (scored instantly), some upcoming (lock in your call and come back). The Oracle reads each team's recent World Cup form and makes its own prediction with written reasoning โ€” which you only see after you've locked in yours. No peeking, no cheating. Just you versus the machine.

Scoring:

Result Points
Exact scoreline 3 ๐ŸŽฏ "Enigma Cracked!"
Correct result (W/D/L) 1 โœ…
Miss 0 โŒ

Why this fits the June Solstice Game Jam

This jam asked for a game inspired by the solstice or any June celebration โ€” and Beat the Oracle is stitched to June on two threads the challenge itself calls out:

  • The World Cup is June's global celebration. The prompt names it directly: "the electric teamwork and high stakes of the World Cup, bringing the entire planet together in the spirit of play." That's the playground this game lives in โ€” and as a bonus, I built it from ๐Ÿ‡จ๐Ÿ‡ฆ Canada, a 2026 host nation.
  • June is Alan Turing's month. Born June 23rd, Turing is the reason this jam has a "father of computing" prize at all. So I didn't bolt a Turing reference onto a football game โ€” I built a playable Turing Test and gave it a World Cup costume. Turing's 1950 question, "Can machines think?", becomes a question you answer with your gut every single day: can a machine predict football better than you?

And the "daily" loop โ€” new matches each day, your score reset, the machines winning "for today" โ€” leans into the solstice's own theme of cycles and the passage of time. Every day is a fresh test. Every match is a new cipher.

๐Ÿ”— Live demo: hema-nambi.github.io/BeatTheOracle

Code

GitHub logo Hema-Nambi / BeatTheOracle

Daily FIFA World Cup 2026 prediction duel vs Gemini AI. Beat the Oracle to win the Turing Test. Built for DEV.to June Solstice Game Jam 2026.

๐Ÿ”ฎ Beat the Oracle

Can you out-predict Gemini AI at the FIFA World Cup 2026?

A daily prediction duel where you go head-to-head against an AI Oracle โ€” powered by Google Gemini 1.5 Flash โ€” to predict FIFA World Cup 2026 match scores. Beat the Oracle and you win the Turing Test. Lose, and the machines have won... for today.

๐ŸŽฎ Play now โ†’


How It Works

Every day you get 5 matches โ€” a mix of recently played games (score immediately) and upcoming fixtures (save your prediction and come back after kickoff).

The Oracle analyses real World Cup form data and makes its own prediction. You only see its reasoning after you've locked in yours.

Points Condition
๐ŸŽฏ 3 pts Exact scoreline match โ€” "Enigma Cracked!"
โœ… 1 pt Correct result (win / draw / loss)
โŒ 0 pts Miss

Beat the Oracle's total โ†’ ๐Ÿ† Human winsโ€ฆ

How I Built It

The stack โ€” 100% free, zero backend

  • Single HTML file โ€” no framework, no build step, no server
  • ESPN API โ€” free, CORS-friendly, no key required (site.api.espn.com/apis/site/v2/sports/soccer/fifa.world/scoreboard)
  • Gemini 1.5 Flash โ€” the Oracle's brain, running entirely client-side (players bring their own free key from Google AI Studio)
  • Vanilla JS + CSS โ€” glassmorphism UI, a confetti canvas, animated score counters

The whole thing is one file you can open in a browser. That constraint kept the game honest and the architecture transparent โ€” exactly what you want when the judges might read the source.

How the Oracle thinks

This is the heart of the game. The Oracle isn't a random number generator wearing a robot emoji โ€” it reasons from real tournament data. I pull each team's live W/L/D form from ESPN and hand Gemini a structured prompt:

You are the Oracle โ€” an AI sports analyst at the FIFA World Cup 2026.
Recent form:
โ€ข Canada: W W D
โ€ข Morocco: W L W
Predict the exact final score. Respond with JSON: {"home": N, "away": N, "reason": "..."}
Enter fullscreen mode Exit fullscreen mode

Gemini returns a specific scoreline and a sentence of reasoning you get to read and judge. Sometimes it's frighteningly sharp. Sometimes you school it. That tension โ€” is the machine actually smarter than me here? โ€” is the entire game. Without Gemini, this is just a form. With it, you have an opponent.

The daily challenge mechanic

Everyone gets the same 5 matches each day, chosen by a date-seeded PRNG (xorshift32 seeded on the current date). That does three things:

  • Scores are globally comparable โ€” your 7 points means the same as everyone else's
  • Return visits are rewarded โ€” new matches drop daily
  • Finished matches score instantly, while upcoming ones save for later โ€” instant payoff and a reason to come back

The share card

๐Ÿ”ฎ Beat the Oracle โšฝ โ€” Day #5
FIFA World Cup 2026 ๐Ÿ‡จ๐Ÿ‡ฆ
๐ŸŽฏ ๐Ÿ‡จ๐Ÿ‡ฆ๐Ÿ‡ฒ๐Ÿ‡ฆ  You: 2โ€“1 ยท Oracle: 1โ€“0 ๐Ÿ” Enigma Cracked!
โœ… ๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ช๐Ÿ‡ธ  You: 2โ€“1 ยท Oracle: 2โ€“0
๐Ÿ‘ค Me: 7pts  vs  ๐Ÿ”ฎ Oracle: 4pts
๐Ÿ† Human wins the Turing Test!
#BeatTheOracle #WorldCup2026 #JuneSolsticeGameJam
Enter fullscreen mode Exit fullscreen mode

Wordle-style emoji grid, one-click copy, built-in share button. Designed to travel.

Challenges I hit

  • CORS walls. My first data source (football-data.org) blocks browser requests. I swapped the whole pipeline to ESPN's public API โ€” free, fast, and CORS-open.
  • Quota cliff. Gemini 2.0 Flash's free quota was exhausted on launch day. I dropped to 1.5 Flash, which has a more generous free tier and is more than smart enough to be a worthy Oracle.
  • Game-flow confusion. Early testers got lost โ€” "we're both predicting, but the match hasn't happened yet?" The mixed queue fixed it: finished matches for instant gratification, upcoming matches for anticipation.

Prize Category

I'm submitting to both additional categories โ€” and in this game they're the same mechanic seen from two angles.

๐Ÿค– Best Ode to Alan Turing

The entire game is a Turing Test you run yourself, daily. Turing's Imitation Game asked whether you could tell human from machine; Beat the Oracle asks whether human intuition can still out-predict one. The scoring language, the intro screen, and the win states all frame the duel through his legacy:

  • Beat Gemini โ†’ ๐Ÿ† Human wins the Turing Test
  • Gemini beats you โ†’ ๐Ÿค– The Oracle has outsmarted you
  • Nail an exact scoreline โ†’ ๐Ÿ” "Enigma Cracked" โ€” a direct nod to Turing's wartime work breaking the Enigma cipher at Bletchley Park

Every match is a new cipher. Every session is a new test. It's not a tribute added to the game โ€” it's the game's spine.

๐ŸŒŸ Best Google AI Usage

Gemini 1.5 Flash isn't a feature here โ€” it's the opponent. It:

  • Analyses real, live match data from the current tournament
  • Generates natural-language reasoning you can read, judge, and argue with
  • Returns structured JSON predictions you can verify and score against your own
  • Runs entirely client-side through the Gemini API โ€” no backend, no server, no secrets stored

The AI is the difference between "a football prediction form" and "a game with a worthy rival." Google AI Studio's free tier made it possible to ship that rival to anyone with a 30-second API key signup.

What's Next

  • ๐ŸŒ Global leaderboard (Neon serverless Postgres) โ€” rank against other humans, not just the Oracle
  • ๐Ÿ“Š Season-long accuracy tracking across the tournament
  • ๐Ÿ”” Match reminders so you never miss scoring a saved prediction

Try It

โ–ถ๏ธ Play Beat the Oracle โ†’

You'll need a free Gemini API key from Google AI Studio โ€” takes about 30 seconds. Then go find out whether the machines have won... today.

Made with โค๏ธ in Canada ๐Ÿ‡จ๐Ÿ‡ฆ for the June Solstice Game Jam 2026.

Top comments (1)

Collapse
 
mamoor_ahmad profile image
Mamoor Ahmad

Good Work ๐Ÿ‘Œโœ๐Ÿป๐Ÿงก