
- Type
- Lesson plan
- Grade
- Primary (Grades 3-5)
- Ages
- Ages 8-10
- Duration
- 1 hour
- Level
- Beginner
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.
- 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.
- 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.
- 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.
- 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.
- 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
Provide step-by-step pseudo-code or visual loop diagrams from the presentation slides to help students determine loop counts before coding.
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.
1Why have gray wolves historically been hunted by humans according to the lesson?
Answer: A. The guiding ideas explain that misinformation and hunting out of fear have hurt wolf populations as human progress infringes on their habitat.
2What term describes the programming concept of repeating code over and over?
Answer: B. Repeating code repeatedly is called a loop in computer science.
3What does a loop placed completely inside another loop represent?
Answer: C. A loop embedded within another loop is defined as a nested loop.
4What is the function of the 'Agent detect' code block?
Answer: C. The Agent detect block checks whether a block or obstacle exists in a given direction.
5True or False: The Agent is capable of holding its own inventory.
Answer: D. The formative assessment confirms as true that the Agent has its own inventory to carry blocks and items.
Resources
- Lesson package (.zip)Everything the author attached to this lesson in one download.
- Coding Fundamentals Part 1: Gray WolvesEDU Guide and Formative Assessment
- Coding Fundamentals Part 1: Gray WolvesClassroom Presentation
- Coding Fundamentals Part 1: Animal Research CenterCurriculum Overview
- Animal Research TemplateUse this lesson plan and student research template if you want to conduct the research portion of this computer science unit.
- Lesson worldOpens the world page in Minecraft Education (sign-in with a school account may be needed).
Part of the Coding Fundamentals curriculum
This is lesson 6 of 17 in Coding Fundamentals.
- Basic Moves and the Agent
- Coding Challenge
- Dinosaur Run
- Earth’s Moon & Mars
- Ganymede (Jupiter's Moon) & Saturn's Rings
- Gray Wolves
- Mercury and Venus
- Minecraft Space Center
- Panda's Protected Habitat
- Polar Bear Rescue
- Revisiting Biomes
- Revisiting Planets
- Sea Turtle Assistance
- The Experiment
- Uranus’ Rings and Neptune's Moon, Triton
- We Need Beets!
- 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.






















