Every AI you’ve met — the chatbot that answers your questions, the phone camera that finds faces, the app that guesses your next song — runs on a handful of surprisingly simple ideas. You don’t need a computer science degree to get them. You need about twenty minutes and a willingness to lose at golf.
Here’s the deal: play each game first. Don’t read ahead. Then read “What just happened?” to find the AI idea you were using without realising it.
Fog Golf
Find the hole you can’t see.
The hole is at the lowest point of the course. The problem? A thick fog has rolled in. You can only see the ground near places your ball has already landed — plus two numbers: how high you are (we call it the loss) and which way the ground slopes (the gradient). The hole sits at loss 0.
You get ten strokes. A new course appears every day at midnight (India time), the same for everyone, so you can compare scores with friends — you get one round a day, and it starts with your first swing. Want to warm up? Switch to Practice for endless random courses. Par is 4 on every course: holing it in 4 earns 10 points, each stroke fewer earns 2 more and each stroke more costs 2. Birdie means one under par (3 strokes); bogey means one over (5). Equal scores share a place on the leaderboard, and the hole stays hidden until the course closes at midnight — so no spoilers for friends who play later.
Fog Golf
Today’s course · same hole for everyone · one round a day
- Stroke
- 1/10
- Par
- –
- Loss · height
- 0.00
- Gradient · slope
- 0.00flat
Lands at 20.0 of 100. The hole is at the lowest point (loss 0). On the Swing button, ← → also aim.
Loading the course On the Swing button, the arrow keys change the aim (Shift for bigger steps).
Leaderboard
Fewest strokes wins. Equal scores share a place (=3).
Your stats
Finish today’s course to start your record: rounds played, your daily streak and how many strokes you usually need.
What just happened?
You were training an AI. Well — you were doing the exact job a computer does when it trains one.
A machine-learning model has knobs, called parameters. A tiny model might have two; the models behind chatbots have billions. Every setting of the knobs is a spot on a landscape, and the height there is the loss: a score for how wrong the model’s answers are on its training examples. Training means finding the knob settings with the lowest loss — the bottom of the landscape. Your golf course was a landscape with just one knob: where the ball is.
Why the fog? A computer can’t see the whole landscape either. With a billion knobs there are far too many spots to check them all. What it can do is measure the loss where it stands, and the slope — the gradient — that says which way is downhill. That’s exactly what the Loss and Gradient boxes above the course showed.
The bot’s rule is called gradient descent, and it is the workhorse of modern AI:
Why the bot got stuck. Gradient descent only ever feels the slope under its feet. When it rolls into a valley, every direction is uphill, the slope drops to zero, and it stops — even if a deeper valley is just over the next hill. That spot is called a local minimum; the deepest valley of all is the global minimum. If you found the hole, it’s because you did things the bot can’t: you took big exploring shots, remembered the loss at every spot, and jumped over hills.
So how does real AI cope?
- A good learning rate. Too small and training crawls; too big and it overshoots the valley and bounces about.
- Momentum. Like a heavy ball that keeps rolling through small dips instead of stopping in them.
- A little randomness. Stochastic gradient descent measures the slope on a small random batch of examples each step, so its path wobbles — and a wobble can shake it out of a shallow valley.
- Many dimensions. With millions of knobs, a true dead end is rarer than on our one-knob course: there’s usually some direction that still goes down. Real loss landscapes are strange places, and researchers are still mapping them.
Training an AI means rolling downhill on a landscape you can’t see, one small step at a time.
Think like a language model
Guess the word the AI will pick next.
Chatbots write their answers one word at a time, and before every word they ask a single question: what comes next? The little model in this game learned that from a few hundred sentences. Can you predict what it will predict?
Next Word · 8 rounds · 3 min
Can you think like a language model?
Chatbots write one word at a time, always asking: which word usually comes next? We trained a tiny model on a few hundred sentences about everyday Indian life. Guess what it predicts. The closer you are to its favourite word, the more points you get.
Runs entirely in your browser. Nothing you pick is sent anywhere.
What just happened?
You were playing the game at the heart of every language model. A language model is trained on a huge pile of text — books, websites, articles. Its training task sounds almost too simple. Hide the next word, guess it, and check. Then nudge the knobs so the right word becomes a bit more likely (with gradient descent — yes, the golf again), and repeat billions of times. Along the way it learns, for any start of a sentence, how likely each possible next word is. (Chatbots then get extra training from people’s feedback, so their answers are helpful and polite — but the next-word guesser is still doing the writing.)
Writing is just guessing, over and over. To answer you, the model picks a next word, sticks it on the end and asks again — word after word. (Strictly, models work with tokens: whole words or pieces of words. Common words are usually one token; a long or rare word gets split into two or three pieces.)
Tiny model, giant model. The model in the game looks only at the last couple of words and learned from a few hundred sentences. Real chatbots look back over thousands of words — the newest, hundreds of thousands — and learned from a large slice of the internet, so their guesses capture grammar, facts and style. But the game is the same game.
Likely is not the same as true. A language model picks words that are likely to come next, not words it has checked. That’s why a chatbot can write a confident, fluent sentence that is completely wrong — people call it a hallucination. When a fact matters, check it.
Temperature is the creativity dial. A model doesn’t always take the single most likely word. At low temperature it almost always does — safe, but repetitive (at temperature 0 it always takes the top word, so it writes the same thing almost every time). At high temperature, unlikely words get a real chance: more surprising, and eventually nonsense. If you reached the end of the game, you already turned this dial yourself.
A language model is a next-word guesser trained on a mountain of text. It predicts what is likely — not what is true.
Pixel Detective
Name the picture before it comes into focus.
Your eyes see a picture. A computer sees a grid of numbers. Each mystery picture starts as a few big blocks of colour and gets sharper step by step. Guess early for more points — how few pixels do you need to crack the case?
Pixel Detective · 6 pictures · 2 min
Guess the picture the way a computer sees it.
To a computer, a picture is just a grid of numbers. Each mystery picture starts as a blurry 2×2 grid and gets sharper. Guess early for more points, but every wrong guess costs you.
Runs entirely in your browser. Nothing you pick is sent anywhere.
What just happened?
An image is a grid of numbers. Each pixel stores how bright it is — usually a number from 0 (black) to 255 (white). A colour pixel stores three: how much red, green and blue. So a square Instagram post of 1080 × 1080 pixels is about 1.2 million pixels, or 3.5 million numbers. That’s all a computer ever gets.
Resolution is how many numbers you keep. The blocky versions in the game were made by averaging squares of pixels into one. Fewer, bigger blocks keep the overall colours and shape but throw away detail — which is why some pictures were easy at 4 × 4 and others needed every pixel. Vision models shrink things on purpose too (it’s called pooling): after spotting patterns, they summarise each small square by its average or its strongest value. That helps them focus on the overall shape rather than single pixels.
How does an AI find a cat in a grid of numbers? It doesn’t look at the whole grid at once. A convolutional neural network slides small windows of weights — filters — across the image. A filter gives a big number wherever its pattern appears, such as dark pixels next to light ones: an edge. Layer by layer, the network builds up:
EARLY LAYERS
Edges
Early layers spot places where light meets dark.
MIDDLE LAYERS
Shapes and textures
Middle layers combine edges into curves, corners and fur.
LATER LAYERS
Objects
Later layers combine shapes into “ears + whiskers + eyes = cat”.
Nobody tells the network which edges or shapes to look for. It learns its filters from thousands — often millions — of labelled photos, using gradient descent: rolling downhill on its loss, just like your golf ball. Newer models called vision transformers cut the picture into small square patches and treat them a bit like the words in a sentence — but underneath, it’s still numbers in, numbers out.
To an AI, a picture is just numbers. It sees by finding small patterns — edges — and stacking them into bigger ones.
What the games have in common
No magic. Just numbers, patterns and a lot of downhill steps.
Look back at the three games. Together they show the three moves behind almost every modern AI. It turns the world into numbers, like pixel brightness or word chances. It finds patterns in those numbers. And it learns those patterns by rolling downhill on a loss it can’t fully see, one small step at a time. (Our little word model cheated: it learned by simply counting. Real chatbots learn with gradient descent, just like the golf.) Once you can see those three moves, AI stops being magic and starts being something you can understand, question — and build.
That’s what the Indian AI Olympiad rewards: not just using AI tools, but understanding the maths, logic and ideas underneath them. If these games made you curious, you’re already thinking the right way.