Early buildWe're building in the open. Expect rough edges.Join the DiscordWhat's new

Where's the jungler? Teaching a program to read the minimap

Every League of Legends player gets told the same thing: look at your minimap more. It is the single most repeated piece of advice in the game, and the least followed, because the moment you need it most is the moment your eyes are glued to the fight in front of you.

So the first thing I wanted Scoutr.gg to do was the boring half of that job. Watch the minimap for you, all game, and say something when the enemy jungler shows up near your lane.

This is what it sees:

A recorded game of mine, replayed through the same detector the app ships. Cyan is the enemy jungler, white the other enemies it tracks. Halfway through, the jungler walks into the fog and the box is gone.

It only knows what you know

The tracker looks at one thing: the corner of your screen where the minimap is drawn. It grabs that square about six times a second and works on the pixels. It doesn't read the game's memory or touch its files, and it can't see through the fog of war. If an enemy isn't on your minimap, Scoutr.gg has no idea where they are either.

That was a deliberate constraint. A tool that knows more than the player is a cheat. A tool that notices more than the player is a coach.

All of this runs on your PC. The AI coach that talks strategy lives in the cloud, but the vision doesn't need it: no network round trip sits between an enemy appearing and the warning.

Four steps, no machine learning

Four panels of the same minimap: the raw capture, the same frame with only red pixels kept, boxes around the three enemy champion rings, and those boxes labelled Kayn, Yone and Swain
One frame, four steps. Panel 2 is an illustration of the idea, not the exact filter.
  1. Capture the minimap.
  2. Keep the red. Enemy champions wear a red ring. Throw away everything that isn't that red and the picture gets a lot simpler.
  3. Find the rings. Simpler, but not solved: enemy turrets are red, enemy minions are red, danger pings are red. What makes a champion different is the shape, a thin closed circle of a known size. So the tracker looks for exactly that and ignores the rest.
  4. Name them. Each ring has a face inside it. The game tells the app which ten champions are in this match, so the question is never "which of 170 champions is this?" It's "which of these five?" The tracker compares the face against the official portrait of each candidate and takes the best match, or says nothing if none is convincing.

There is no neural network anywhere in that list. People are surprised by this, so here's the reasoning: the art is fixed, the candidates are five, and the icons are a few dozen pixels wide. Comparing pictures is enough. It costs a few milliseconds per frame, needs no GPU, and when it gets something wrong I can open the frame and see why. I'd take that over a model I have to retrain every time a new champion ships.

What broke

That four-step description is the version that works. The version I first shipped had holes I only found by measuring champion by champion.

Red-faced champions were invisible. To tell champions from turrets, the early filter rejected any red ring whose middle was also red, because a turret icon is a solid red blob. Reasonable, until you look at Lee Sin, Wukong, Graves or Swain. Their portraits are mostly red. The filter threw them out as turrets, every frame, all game. A player facing one of them got a jungler tracker that never tracked. The fix was to stop looking inside the ring at all: judge the ring by its ring, and leave the face for step 4.

I was comparing against the wrong pictures. The minimap doesn't draw the square champion icons you see everywhere else. It draws its own round portrait, and for some champions that's a noticeably different crop. Matching against both fixed several champions that were merely unlucky.

Some champions change their face. Kayn picks a form mid-game and his minimap portrait changes with it. Each champion can now carry several appearances, and the best one wins.

Two minimap crops from the same game, both labelled Kayn: his base portrait early on and his blue Shadow Assassin portrait later
Same game, same player, fifteen minutes apart.

The enemies I wasn't tracking got mistaken for the ones I was. The tracker reports the jungler, the mid laner, the support and your own lane opponent. That leaves an enemy or two it doesn't care about, and their rings still show up. With only the tracked faces to choose from, "best match" sometimes meant calling the enemy bot laner the jungler. So the ignored enemies are now candidates too. They can win a ring. They just never get reported.

I built a benchmark to keep myself honest: every champion in the game, composited onto real minimap backgrounds, plus hand-labelled frames from my own recordings. Before these fixes the tracker could name 64% of champions at the smallest icon size, and twelve junglers were never named at all. After, 99%, and zero.

From a box to a warning

A name and a position on the minimap aren't worth much by themselves. What you want is the sentence a good teammate would say.

jungler on the minimap ──▶ "Kayn, top river"  (spoken, on screen)
                                   │
                                   ▼
                           heading for your lane? ──▶ gank alert

The app notes each sighting, and a separate loop checks ten times a second whether that position is a threat to your lane. If it is, you get the alert. All of it is plain arithmetic on the positions the tracker reports, which is why the warning arrives while there's still time to act on it.

And when the jungler walks into the fog, like in the clip? The box is gone, and the tracker has nothing more to say. What the app does with that silence is a different problem, with a different kind of answer, and it gets its own post.

Where it hurts

  • Fog of war is the ceiling. The tracker reads what the game draws. An enemy who isn't on your minimap isn't in its world either.
  • Finding every champion means finding more non-champions. The filter that stopped missing Lee Sin is more permissive, so it also lets through more things that merely look like rings. A ping drawn in the right place can pass. The naming step is what stops those becoming false sightings, and on the benchmark wrong names stayed at zero, but that is where the risk moved to.
  • Stacked icons hide each other. In a five-player fight the rings overlap and some go unread. Thankfully that's the one moment you don't need telling where the enemy is.
  • Shapeshifters aren't done. Kayle's portrait changes at level 11 and the tracker doesn't recognise her after that yet. Neeko, who can wear another champion's face, I haven't even measured.

Finding the next blind spot

My own games cover a tiny slice of champions, monitors and minimap sizes, and I can't fix what I can't see. So if you've opted into diagnostics, the app keeps a few small minimap crops per game and sends them along with its logs. Not a recording of your game: little squares around a ring, plus a handful of stills of the minimap itself, taken at the moments the tracker is most likely to be wrong. The first time it names someone, the times it barely made up its mind, the rings it couldn't name at all.

Eight small minimap crops, each centred on an enemy ring and labelled with why it was kept: first sighting, not sure, ring with no name, or an enemy that is not tracked
Eight of the twenty crops kept from the game in the clips above. Look at the second one: a ping sits on top of two enemies and the tracker thought it saw Kayn. He isn't there.

That second crop is the ping problem from the list above, caught in the act. Without it I'd have a log line saying Kayn was sighted, and no reason to doubt it.

The lesson I keep relearning: the detector was "working" the whole time Lee Sin was invisible. No errors, healthy status, alerts firing for other champions. It took a per-champion benchmark to show that a third of the roster was missing. If you build anything that perceives the world, measure it against the whole world you care about, not the handful of cases you happened to test with.


Minimap tracking and gank alerts are part of Scoutr.gg's Free plan — how it works. I'm Manu; I'm building this solo and writing up the engineering as I go.