Skip to games

Spam Filter

Tap Spam or Inbox, or swipe the email card left or right (arrow keys on a keyboard); tap any learned word to see its counts

What is Spam Filter?

Spam Filter is a free machine learning game where you train a real spam filter by hand. You sort emails into Inbox or Spam, and every word flies into the filter's memory, counted for each pile. Then the filter sorts brand new emails by itself, lighting up the words that pushed its decision and showing how sure it is, with the actual sum one tap away. Four short rounds show the big ideas behind AI: it learns only from the examples you give it, wrong labels teach it wrong things, and words it has never seen give it no evidence.

#machine learning for kids#how spam filters work#AI training game

How to play Spam Filter

Controls: Tap Spam or Inbox, or swipe the email card left or right (arrow keys on a keyboard); tap any learned word to see its counts

  1. 1Tap Train the filter. An email appears: tap Spam or Inbox, or swipe the card left for Spam and right for Inbox.
  2. 2Watch its words fly into Filter memory. Red words have been seen more in Spam, green words more in Inbox, and the numbers are the counts.
  3. 3When the batch is sorted, press Test the filter. It reads brand new emails on its own and a needle swings toward Spam or Inbox word by word.
  4. 4Check whether it was right, see which words decided it, and tap Maths to see the exact sum.
  5. 5In round 3 your cousin has sorted some emails into the wrong pile. Tap them to fix the labels before training, then compare the results.
  6. 6Stuck while sorting? Tap the bulb and the right button will glow.

Spam Filter tips and strategy

  • Label carefully. The filter trusts every example you give it, so one email in the wrong pile turns its words into the wrong kind of clue.
  • Watch for words that appear in both piles, like QuestCraft or card. They are weak clues because they point both ways, so the other words in the email decide it.
  • When the filter has never seen any of the words it can only guess. Use Report as spam so it learns them, and the next similar email gets caught.
  • In the cousin round, read every row. Anything from a teacher, a parent or a school belongs in Inbox; prizes, deals and requests for bank details belong in Spam.

Spam Filter FAQ

How does a spam filter work?

A classic spam filter learns from emails people have already labelled. It counts how often each word appears in spam and in normal mail, then judges a new email by combining those clues: words like free and prize push it toward spam, words like homework or practice push it toward inbox. Modern filters also look at senders, links and much more, but the idea of learning from labelled examples is the same.

What is a naive Bayes classifier?

It is a simple machine learning method based on probability. For each word it asks how much more likely that word is in one category than the other, then multiplies all those clues together with how common each category is. It is called naive because it treats every word as a separate clue and ignores word order. The game adds one to every count first, a trick called smoothing, so no single word is ever treated as certain proof.

What is training data in AI?

Training data is the set of examples an AI learns from, each one labelled with the right answer. The AI can only be as good as those examples: if they are one-sided or wrongly labelled, it learns the wrong patterns. In the game you are the one creating the training data, which is why your sorting decides how well the filter works.

Why do spammers misspell words like FR33?

Because a filter that learned the word free has never seen FR33, so to the filter it is a brand new word with no evidence behind it. Misspelling is a way to slip past. It stops working once people report those emails, because the filter then learns the new spellings too.

You might also like