Lesson plan

Wild West

Students direct and program the Agent in an 1850s gold rush town to mine ore, build starter houses, and construct town hall walls.

Wild West
Ages
Ages 8-10
Duration
45 min
Essential question

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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

Support

Allow learners to rely on direct manual movement commands for the Agent if setting up multi-variable loops feels overwhelming.

Stretch

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.

  1. 1Why must the Agent be used to gather ore in the mine during Activity 1?

  2. 2What plot dimensions are provided for the starter house walls in Activity 2?

  3. 3What is the minimum wall height required for the Town Hall in Activity 3?

  4. 4Which three parameters must students determine and set to build the Town Hall?

  5. 5What term is used when you issue one command at a time to the Agent instead of running a full program?

Resources

Part of the Coding Fundamentals curriculum

This is lesson 17 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

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.

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