Lesson plan

Gray Wolves

Students use loops and nested loops in Minecraft to help the Agent manage farm tasks and reduce human-wildlife conflict with gray wolves.

Gray Wolves
Ages
Ages 8-10
Duration
1 hour
Essential question

How can programmers use loops and automation to protect domestic animals and lessen human conflict with gray wolves?

Overview

In this lesson from the Animal Research Center (ARC) series, students examine how misinformation and fear have harmed gray wolf populations. As human settlements expand into wolf territory, learning how to deter predators responsibly without violence is key to peaceful coexistence.

Working inside Minecraft, learners code the Agent using repeat loops, while loops, and nested loops across four targeted tasks: securing a chicken coop, moving sheep, practicing non-lethal hazing, and clearing an area. Students test and debug their code while developing a persistent problem-solving mindset.

Learning objectives

By the end of this lesson students will be able to:

  • Apply repeat loops, while loops, and nested loops to solve specific automated challenges.
  • Test, identify errors in, and debug Agent code during practical tasks.
  • Explain how misconceptions about gray wolves impact wolf conservation and human coexistence.
  • Demonstrate a resilient coding mindset when programs do not work on the first attempt.

Blocks and items used in this lesson

Key vocabulary

Loop
A programming structure that repeats a set of code instructions multiple times.
Nested Loop
A loop placed inside another loop to handle multi-layered repeating patterns.
While Loop
A loop that continues executing actions as long as a specific condition remains true.
Conditional
A statement or rule in code that tells the program to perform an action only if something specific is true.
Agent Detect
A coding block that checks whether an obstacle or specific block is present in a chosen direction.

Before class

Lesson sequence

Suggested timing: about 60 minutes in total.

  1. Introduction: Wolf Misconceptions and ARC Mission10 min

    Introduce the Animal Research Center context and discuss how fear and misinformation have historically harmed gray wolf populations. Explain that students will program their Agent to help farmers manage resources and deter wolves safely without lethal force.

  2. Direct Instruction: Loops and the Agent10 min

    Present the core computer science concepts using the lesson slides. Demonstrate repeat blocks, while loops, nested loops, and how the Agent detect command informs decisions.

  3. Coding Tasks: Activities 1 and 215 min

    Students enter the world to complete Activity 1: Secure the Chicken Coop and Activity 2: Moving the Sheep. Encourage students to trace their loops carefully and inspect the Agent inventory when building or moving items.

  4. Coding Tasks: Activities 3 and 415 min

    Learners proceed to Activity 3: Hazing to deter wolves safely, followed by Activity 4: Clearing the Area. Students test and debug their code sequences, adjusting loop counts and conditional checks when tasks fail.

  5. Formative Review and Reflection10 min

    Gather the class to check understanding through verbal or written formative prompts about conditionals, loop structures, and the Agent capabilities.

Assessment: success criteria

  • Student successfully completes the four in-game Agent tasks using repeat, while, or nested loops.
  • Student can identify and fix errors in their code through testing and debugging.
  • Student correctly explains that repeating code over and over is called a loop.
  • Student confirms that the Agent can hold items in its own inventory.

Differentiation

Support

Provide step-by-step pseudo-code or visual loop diagrams from the presentation slides to help students determine loop counts before coding.

Stretch

Have students complete the optional Animal Research Template using internet sources to research real-world gray wolf behaviors and conservation data.

Knowledge check

5 questions to check understanding after the lesson. Tap an answer to see if it is right; the score appears at the end.

  1. 1Why have gray wolves historically been hunted by humans according to the lesson?

  2. 2What term describes the programming concept of repeating code over and over?

  3. 3What does a loop placed completely inside another loop represent?

  4. 4What is the function of the 'Agent detect' code block?

  5. 5True or False: The Agent is capable of holding its own inventory.

Resources

Part of the Coding Fundamentals curriculum

This is lesson 6 of 17 in Coding Fundamentals.

  1. Basic Moves and the Agent
  2. Coding Challenge
  3. Dinosaur Run
  4. Earth’s Moon & Mars
  5. Ganymede (Jupiter's Moon) & Saturn's Rings
  6. Gray Wolves
  7. Mercury and Venus
  8. Minecraft Space Center
  9. Panda's Protected Habitat
  10. Polar Bear Rescue
  11. Revisiting Biomes
  12. Revisiting Planets
  13. Sea Turtle Assistance
  14. The Experiment
  15. Uranus’ Rings and Neptune's Moon, Triton
  16. We Need Beets!
  17. Wild West

Frequently Asked Questions

Where can I find the optional research activity mentioned in the lesson?

The Animal Research Template and its accompanying lesson plan are located in the Supporting Files section of the resource. This portion requires web connectivity and is conducted outside Minecraft.

What specific coding concepts does this lesson introduce to students?

This lesson focuses on repeat loops, while loops, and nested loops, while reinforcing conditionals and the Agent detect block.

Adapted from Gray Wolves by Minecraft Education on Minecraft Education, last updated Sep 16, 2023. This classroom version, the timings and the quiz were written by 9Minecraft Education.

You May Also Like

9Minecraft Education is an independent teaching resource and is not affiliated with Mojang or Microsoft. Lesson plans here are our own classroom-ready adaptations; each one links to the original resource and credits its author. © 2026 9minecraft.net