
- Type
- Lesson plan
- Subject
- Computer Science & Coding
- Grade
- Primary (Grades 3-5)
- Ages
- Ages 8-10
- Duration
- 45 min
- Level
- Beginner
How can we use manual controls, variables, and nested loops to solve mining and construction challenges in a frontier town?
Overview
This computer science lesson transports students to the American frontier during the 1850 gold rush. Learners integrate previously covered coding skills, such as events, variables, and nested loops, to assist miners in building up a frontier settlement while cultivating a resilient coding mindset.
Students work directly with the Agent in Minecraft to complete building and mining challenges. They guide the Agent through restricted mine passages to gather resources, lay out exterior walls on marked starter plots, and configure three separate parameters to erect the town hall.
Learning objectives
By the end of this lesson students will be able to:
- Navigate the Agent through confined mine shafts using manual control to harvest ore.
- Build perimeter walls on marked starter house plots using loops or direct commands.
- Program town hall walls to reach at least five blocks in height using length, width, and height parameters.
- Test and debug Agent movement and building scripts when errors occur.
Blocks and items used in this lesson
Key vocabulary
- Manual Control
- Directing an Agent by sending one individual command at a time rather than running an automated script.
- Nested Loop
- A loop placed inside another loop to repeat actions across multiple steps or rows.
- Variable
- A value that can change and be referenced to control actions in a program.
- Parameter
- A specific measurement or value, such as length or height, used to configure a task.
Before class
Lesson sequence
Suggested timing: about 45 minutes in total.
- Frontier Briefing5 min
Introduce the American frontier setting circa 1850. Explain that miners in the growing gold rush town need help mining resources and constructing buildings while the class works toward locating the portal.
- Activity 1: Mine the Resources10 min
Direct students to take manual control of the Agent. Because the miners cannot fit under the mine barrier, students steer the Agent through the confined space to extract all the ore using single commands.
- Activity 2: Starter Houses12 min
Have students assist the town by building perimeter walls on marked plots. Students work with two 5x5 plots, matching the marked length and width while deciding their own wall height, using manual controls or code.
- Activity 3: Town Hall13 min
Challenge learners to complete the town hall walls, which are not a perfect square. Students must define three distinct parameters—length, width, and a height of at least five blocks—to build the structure.
- Review and Formative Assessment5 min
Discuss whether nested loops save the Agent time during repetitive work and verify student understanding of manual control versus automated scripts using the guide questions.
Assessment: success criteria
- The student successfully maneuvers the Agent under the mine barrier to gather the ore.
- The student builds perimeter walls matching the 5x5 markings on the starter plots.
- The student sets length, width, and height parameters to build town hall walls at least five blocks tall.
- The student explains whether nested loops make work faster for the Agent and defines manual control.
Differentiation
Allow learners to rely on direct manual movement commands for the Agent if setting up multi-variable loops feels overwhelming.
Encourage students to build higher walls and refine their nested loop code so the Town Hall is built with fewer instructions.
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 must the Agent be used to gather ore in the mine during Activity 1?
Answer: B. The source explains that the miners cannot fit under the barrier into the mine, but the Agent can.
2What plot dimensions are provided for the starter house walls in Activity 2?
Answer: A. The lesson specifies that students are given plots that are 5 x 5 to build walls upon.
3What is the minimum wall height required for the Town Hall in Activity 3?
Answer: C. The activity instructions state that students need to make the town hall walls at least five blocks high.
4Which three parameters must students determine and set to build the Town Hall?
Answer: B. The source states that students need to figure out three parameters: height, length, and width.
5What term is used when you issue one command at a time to the Agent instead of running a full program?
Answer: D. The assessment notes identify giving the Agent one command at a time as taking manual control.
Resources
- Lesson package (.zip)Everything the author attached to this lesson in one download.
- Coding Fundamentals Part 3: Wild WestEDU Guide and Formative Assessment
- Coding Fundamentals Part 3: Wild WestClassroom Presentation
- Coding Fundamentals Part 3: Running Out of TimeCurriculum Overview
- 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 17 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
What historical backdrop is used to frame these coding tasks?
The lesson takes place on the American frontier around 1850, during the height of the gold rush as mining settlements expand.
Do students have to write automated scripts for all three activities?
No, students are explicitly encouraged to use manual control for the mining task and may choose manual movement or written code for the starter houses.
Where are the teacher presentation slides and printable assessment located?
The presentation slides are located under the supporting files section, and printable assessment questions are provided at the end of the educator guide.
Adapted from Wild West by Minecraft Education on Minecraft Education, last updated Sep 16, 2023. This classroom version, the timings and the quiz were written by 9Minecraft Education.






















