Skip to content
Computing · CONCEPTUAL · Ages 7–9

AI in Computer Games

How computer game characters 'decide' what to do; simple rule-based AI vs learning AI; NPCs, difficulty adjustment; AI as the opponent in chess or board games

Lesson: AI Computer Games

Subject: Computing · Domain: Artificial Intelligence · Age Band: 7-9 (Tailored for gifted 5-6yo) · Type: Conceptual
Centrality: 0.0095 · Taxonomy ID: mt_fT4G0QloX5 · Standards: CSTA K-2 (1B-AP-08, 1B-AP-11) · Tailored for: Gifted 5y9m (IQ 125-130+, Math 2-3, Reading 98th%)

A quick note on your child's asynchronicity: Your son likely already understands that a computer sends down spaceship pixels to shoot at his character. But gifted kids often process the mechanics without grasping the underlying architecture—the "how does it actually know to do that?" The danger here is procedure-without-concept. We want him to internalize the difference between a machine following a massive list of rules (algorithmic AI) and a machine reacting to his specific past behaviors (learning AI). We will use rich vocabulary here. If he glazes over, pivot to the physical games immediately.

Why this matters

When a five-year-old plays a video game, they often anthropomorphize the screen. They think the computer is "mad" at them, or that the boss is "trying" to beat them. Understanding Game AI strips away the magic and replaces it with logic.

This matters profoundly for a gifted child because it introduces them to algorithmic thinking and the decision-matrix. He already grasps algorithms (step-by-step instructions) and patterns. Now, he gets to see how those prerequisites combine to create the illusion of intelligence. By differentiating between rule-based AI (if X happens, do Y) and learning AI (adjusting difficulty based on player data), you are laying the foundational vocabulary for machine learning, neural networks, and modern computer science. You aren't just explaining a game; you are introducing the concept that computers only ever do exactly what we tell them to do—even when we tell them to learn.

Learning objective

To understand and articulate how computer game characters make decisions, specifically differentiating between characters that follow static, pre-written rules and those that change their behavior based on the player's actions.

You will know he grasps this when he can say: "The computer isn't actually thinking; it's either following a giant list of 'if-then' rules, or it's copying my patterns to make the game harder."

Before you sit down together

Materials

You will not need a screen for the core of this lesson. Because he is highly asynchronous, grounding abstract computing concepts in physical reality prevents conceptual gaps. * A deck of cards or colored blocks: To act as a visual "decision tree" or rule list. * Paper and markers: For drawing out the logic. * A simple board game with dice (like Chutes & Ladders or Sorry!): To demonstrate pure randomness vs. rules. * Sticky notes: To write down "rules" and stick them to your shirt.

Best time of day for this lesson

Given his asynchronous profile, you might find his cognitive battery is highest mid-morning (around 10:00 AM) after a protein-rich snack, or perhaps right after a period of intense physical play when his executive functioning has reset. Try to avoid transitioning him directly from a screen-based activity to this lesson, as the "turn off the iPad" friction often burns through a five-year-old's emotional regulation reserves. Start this at the kitchen table or living room floor when he is physically rested.

Activity: "The Robot and the Copycat"

This is a Conceptual lesson (Introduce → Explore → Apply → Wrap-up). You will play the role of the computer. Total time budget: 15-20 minutes. If he is deeply engaged, let it run longer.

Phase 1: Introduce (3-5 minutes)

Start by challenging his current mental model of his video games. * Dialogue: "When you play [insert his favorite game here], and the bad guy chases you, how do you think the bad guy knows where to go? Do you think there is a little brain inside the TV?"

Let him answer. Validate his imagination, but introduce the concept of the algorithm. * Dialogue: "Some parents think computers are magic, but you and I know they are just very fast instruction-followers. A computer doesn't have a brain. It has an algorithm—a massive, giant list of 'If this happens, do that.' In games, characters that aren't you are called NPCs (Non-Player Characters). Let's play a game where I am an NPC."

Phase 2: Explore (5-7 minutes)

The Rule-Based NPC: Take three sticky notes. Draw a simple symbol on each (e.g., a sword, a shield, a smiley face). Stick them to your shirt. * Dialogue: "I am a computer goblin. My programmer gave me exactly three rules." (Point to the notes). "Rule 1: If you step left, I step left. Rule 2: If you step right, I step right. Rule 3: If you jump, I freeze."

Have him physically move. Step left, step right, jump. You follow the rules perfectly. * Dialogue: "Notice I am not trying to catch you. I am not thinking. I am just following my rules. This is called Rule-Based AI. It's just a giant chain of cause and effect."

The Learning NPC (The Copycat): Now, change the rules. Take the sticky notes off. * Dialogue: "Now, I am a different kind of computer. I have no rules written on me. Instead, my rule is: Watch what you do three times, and then do it back to you."

Let him move (e.g., jump, step left, spin). You then mimic his exact sequence. * Dialogue: "I didn't have rules written down before the game started. I learned my rules by watching your patterns. This is called Learning AI."

Phase 3: Apply (5 minutes)

Now, apply this to the concept of difficulty adjustment (why games get harder). * Dialogue: "If a game is too easy, you get bored. If it's too hard, you get mad. How does the computer know? It uses Learning AI to watch your data. If you die on the same level five times, the computer's algorithm says, 'Give him more lives,' or 'Make the enemy slower.'"

You might try playing a quick round of Rock-Paper-Scissors. Play normally, but track his choices. If he picks "Rock" three times in a row, announce: * Dialogue: "Ding! My Learning AI noticed a pattern. You like Rock. I am switching my algorithm to Paper."

Phase 4: Wrap-up (2-3 minutes)

Bring it back to the big picture. * Dialogue: "So, the next time you play a video game, remember that the computer isn't outsmarting you. It's just running math. It's either following a giant list of rules, or it's adjusting the game by looking at your past choices."

Kid-response scripts

He says... What's happening You might try...
"The computer is cheating!" He is experiencing frustration with adaptive difficulty and anthropomorphizing the machine. "It feels like cheating, doesn't it? But remember, it has no feelings. Let's look at the pattern. What move did you just do three times?"
"I already know what AI is, it's like a robot." He is relying on surface-level pop-culture definitions rather than computational mechanics. "You're right about robots! But let's be precise. Is a robot a physical body, or is it the rules inside the body? Can AI exist without a robot?"
"Why doesn't the computer just win every time?" A brilliant philosophical and logical question. He sees the machine's speed advantage. "What a great question! If the computer won every time, would you keep playing? The programmers wrote a rule: Do not always win. Keep the player engaged."
"I want to play a real video game instead." His 5-year-old attention system wants the dopamine hit of the actual screen. "I get that. Tell you what. Let's play your game for 10 minutes, and our rule is that every time an enemy moves, you have to tell me: Rule-based or Learning AI?"
"What if the computer's rule is to break the rules?" He has independently stumbled onto the concept of emergent behavior or chaos theory. (See Stretch section). "Whoa. You just described something called 'emergent behavior.' Let's write that down and explore it right now."

Common misconceptions to watch for

What you see What's actually going on How to gently address
He thinks the NPC has "emotions" or "wants." Anthropomorphism. His developing brain naturally assigns intent to moving objects. "It looks like the ghost wants to eat Pac-Man. But what is the actual rule? The rule is: 'Move toward the yellow circle.'"
He confuses randomness with intelligence. When an enemy does something unpredictable, he assumes the computer "decided" to be tricky. Introduce the concept of a Random Number Generator (RNG). "Sometimes the rule is just: 'Roll a digital dice. If it lands on 4, shoot a laser.'"
He thinks Learning AI is actually alive/conscious. This is a critical conceptual gap in young gifted kids exposed to sci-fi concepts. "Learning AI is like a smart parrot. It can copy your patterns perfectly, but it doesn't know it's playing a game. It just processes data."

Stretch (where the real lesson lives for your son)

If he breezes through the initial activity, do not just move on. His brain craves depth. These stretches connect Game AI to higher-order computer science and mathematics.

1. The "Look-Ahead" Algorithm (Minimax Concept) Introduce how a computer plays chess or tic-tac-toe. * How to frame it: "The computer doesn't just look at the board right now. It uses math to pretend to make a move, then pretends you make a move, all the way to the end of the game. It plays out a thousand imaginary games in one second and picks the path where it wins the most." * Action: Play tic-tac-toe. Before you place your X or O, verbally list out loud: "If I go here, you could go there, and then I lose." Show him the "decision tree" verbally.

2. Emergent Behavior (When simple rules create complex results) * How to frame it: "What happens when the rules are simple, but there are a lot of characters?" * Action: Look up videos of "Boids" (bird flocking simulations) or Conway's Game of Life. Explain that the birds aren't told to form a V-shape; they are only told: "Don't hit the bird next to you, and fly at the same speed." The beautiful pattern is an accident of the math.

3. "Rubber-Banding" in Racing Games * How to frame it: "Have you ever noticed in Mario Kart that when you are in 1st place, suddenly the person in 8th place gets the best item and catches up super fast? That's not fair, right?" * Action: Explain that programmers deliberately insert a rule to "cheat" to keep the race exciting. This is Adaptive Difficulty. Have him brainstorm three games where he suspects rubber-banding is happening.

4. Designing an AI Flowchart * Action: Have him draw a flowchart for an enemy in a game he wants to invent. Use rhombuses for decisions (e.g., "Is player close?") and rectangles for actions (e.g., "Shoot fireball"). This forces him to externalize the algorithmic structure.

Quick mastery check (60 seconds)

  • [ ] Ask: "What does NPC stand for, and why don't they have brains?"
  • [ ] Ask: "If an enemy in a game suddenly gets much harder right when you start winning, what kind of AI is probably happening?" (Looking for Learning AI / Adaptive Difficulty).
  • [ ] Ask: "Is a computer following a rule, or making a choice?" (Looking for: Following a rule / executing an algorithm).

Formal mastery check

(From the dataset's assessment taxonomy)

  • [ ] Evidence 1: Can he explain how a computer opponent in a game decides its moves (referencing rules, algorithms, or speed of calculation)?
  • [ ] Evidence 2: Can he describe the difference between a game character that follows fixed rules (Rule-Based) and one that learns from the player (Learning AI)?
  • [ ] Evidence 3: Can he give an example of how AI makes a game more fun (e.g., adjusting difficulty, generating levels, preventing the player from getting bored or frustrated)?

Vocabulary to use naturally

  • Algorithm: The specific, step-by-step list of instructions the computer executes.
  • NPC (Non-Player Character): Any character in a game not controlled by the human player.
  • Rule-Based AI: Artificial intelligence that relies on pre-written "If-Then" statements.
  • Learning AI / Adaptive AI: Artificial intelligence that adjusts its behavior based on the player's past data and patterns.
  • Condition: The "If" part of an algorithmic rule (e.g., If health is low).
  • Pattern Recognition: How learning AI identifies what the player frequently does.

What comes next

If he has mastered the difference between rule-based and learning AI, his next logical steps in this computational trajectory are:

  1. Procedural Generation: How algorithms are used to create infinite, random game levels (like in Minecraft or No Man's Sky) rather than just controlling characters.
  2. Boolean Logic (AND/OR/NOT): Deepening his understanding of how multiple conditions combine (e.g., "Shoot fireball IF player is close AND player has no shield").
  3. Machine Learning Concepts (Classification): Moving beyond games to understand how AI sorts images or text based on data patterns.

If this lesson didn't land

Gifted five-year-olds have off days, too. Their cognitive processing speed often outpaces their emotional regulation, leading to sudden brick walls. If he loses interest or gets frustrated:

  • Change the Manipulative: If physical acting didn't work, try having him "program" you on a whiteboard. You are a "turtle robot." He writes the rules; you execute them perfectly (highlighting rule-based behavior).
  • Shorten the Timeline: Drop the "Learning AI" half of the lesson entirely. Just spend 10 minutes mastering "If-Then" rule-based logic. Come back to learning AI next week.
  • Use a Specific, Obscure Interest: If he doesn't care about generic bad guys, apply the AI concepts to his obsession. How does a diesel train engine "decide" to shift gears? How do the rules work in a specific Pokémon battle?
  • Check the Prerequisite: If he isn't grasping that the computer follows rules, he might need more foundational work in Step-by-Step Instructions (basic algorithms). Take a step back and do a simple "program the parent to make a sandwich" activity where you follow instructions absurdly literally to prove the computer has no common sense.

Source

Taxonomy ID: mt_fT4G0QloX5
Dataset: AI/Computing Curriculum Taxonomy
Standards Alignment: CSTA K-12 Computer Science Standards (1B-AP-08, 1B-AP-11)
Generated by: Specialized Pedagogical AI for Gifted Asynchronous Learners