wunder beta

🎮 AI in Video Games

When a video game enemy chases you, is it really thinking? In this course you'll discover how the computer players in games make their moves — by following rules a person wrote — and you'll learn what

7
lessons
~20 min
to learn
🔬 Science
subject
Adults
level
Start the course →

What you’ll learn

  1. Is the Computer Thinking?Understand that game enemies follow written rules rather than thinking.A chasing game enemy can feel alive, but it is only following a rule the game maker wrote, such as 'move toward the player.' The computer obeys that rule over and over, very fast, which makes it seem clever even though it never actually thinks.
  2. The Computer Follows RulesLearn that computers act on IF/THEN rules called algorithms, and follow them exactly.Computers follow step-by-step instructions, often shaped as 'IF something is true, THEN do this.' A list of such steps is an algorithm. The computer runs its rules extremely fast but does exactly what they say — with no rule to stop it, an enemy will happily walk off a cliff.
  3. Meet the Pac-Man GhostsSee a real example of different rules creating different behavior.In Pac-Man, four ghosts chase the player, each following a different rule: Blinky chases directly, Pinky tries to get ahead and ambush, Inky behaves unpredictably, and Clyde chases then retreats when close. Different rules give the ghosts their distinct personalities.
  4. Everything Is DataDefine data and recognize its four common kinds: numbers, words, pictures, and sounds.Data is the information a computer stores and uses. In a game it appears as numbers (score, health), words (names), pictures (art), and sounds (effects). A whole game is really a large collection of data the computer manages.
  5. Pictures Are Really NumbersUnderstand that images are grids of pixels, and each pixel's color is set by a number.Every picture on a screen is a grid of tiny squares called pixels. A number tells each pixel which color to show, so a picture is really a grid of numbers. This is why computers, which are built to handle numbers, can store and change images so easily.
  6. The Computer Keeps ScoreRecognize that games track health, score, position, and time as numbers.Games store much of what happens as numbers: health, score, a countdown timer, and even the player's position (two numbers on a grid). The computer changes these numbers as you play — adding to your score, subtracting from your health — which is mostly simple arithmetic.
  7. Choosing the Best MoveUnderstand how a computer chooses a 'best' move by scoring options and picking the highest.A computer that must choose a move gives each option a numeric score and selects the highest one. Strong chess computers look many moves ahead, scoring huge numbers of possibilities, but they are still just following rules and comparing numbers — very fast, careful counting rather than magic.

Questions this course answers

A game enemy chases you everywhere. Why does it seem so smart?

The enemy isn't thinking. It follows a rule the game maker wrote, like 'move toward the player,' over and over, very quickly — which makes it feel clever.

A list of step-by-step rules that a computer follows is called a what?

A set of step-by-step instructions, often written as 'IF this, THEN that,' is called an algorithm.

If a game maker forgets to add the rule 'don't walk off cliffs,' what will the enemy do?

A computer only does exactly what its rules say. With no rule against it, the enemy will keep walking off the cliff — it never stops to think.

Why do the four Pac-Man ghosts seem to have different personalities?

Each ghost follows its own chasing rule — one charges straight, one sneaks ahead, and so on — so they act like they have different personalities.

Which of these is an example of NUMBER data in a game?

A score like 4200 is number data. Names are words, the jump 'boing' is sound, and the coin art is a picture.

What are the tiny squares that make up a picture on a screen called?

Pictures are made of tiny colored squares called pixels. A number tells each pixel which color to be, so even pictures are really numbers.

Grounded in trusted sources

  • GameInternals — 'Understanding Pac-Man Ghost Behavior' (gameinternals.com)
  • BBC Bitesize — 'What is data?' and 'Introduction to algorithms' (bbc.co.uk/bitesize)
  • Code.org — 'How computers represent images' (code.org)

Every Wunder lesson is built from real, reputable sources — never invented.

Related Science courses

Wunder is a personalized learn-anything platform — tell it any topic and it builds a beautiful, fact-checked course in minutes, with narration, a knowledge check, and a college-style University track.

Browse more Science courses · All topics · Home

© 2026 Wunder Learning LLC · Terms & Privacy