Lesson plan

Mining with the Agent: Part I

Program the Agent to dig a vertical mine shaft, interpret distribution data to plan mining depth, and manage resources like ladders and torches.

Mining with the Agent: Part I
Ages
Ages 8-13
Essential question

How can we use automated code and data interpretation to design an efficient and safe vertical mining operation?

Overview

Vertical shaft mining provides an accessible way to study automation and computational thinking. By programming the Agent with loops and conditional checks, students eliminate repetitive manual digging while learning how automated instructions interact with an open 3D environment.

Using an ore distribution graph from the lesson handout, learners examine the trade-offs of mining at varying depths. Students collect foundational survival items, manage shafts lined with ladders, and evaluate mining patterns to maximize their yield of valuable ores.

Learning objectives

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

  • Program the Agent using parameterized and hard-coded loops to excavate vertical shafts and horizontal tunnels.
  • Interpret an ore distribution graph from a handout to identify optimal subterranean mining elevations.
  • Explain how conditional logic allows the Agent to detect environmental blocks and selectively collect items.
  • Develop a resource management plan using ladders, torches, and crafted tools to navigate and illuminate deep shafts.

Blocks and items used in this lesson

Key vocabulary

Parameterized Loop
A programming loop where a variable or numeric input sets the exact number of repetitions, such as shaft depth.
Conditionality
A coding structure that performs actions only when specific circumstances are met, such as checking for a block in front.
Vertical Shaft
A deep, straight vertical passage dug into the ground to reach lower geological layers.

Before class

Lesson sequence

  1. Warm-up & Data Analysis

    Introduce the challenge of vertical shaft mining. Direct students to the handout graph to analyze which depths contain key resources and discuss shaft dimensions, such as a 3x1 opening, while planning how to prevent lethal falls.

  2. Surface Preparation & Code Setup

    While the world remains set to daytime, students gather wood to craft a crafting table and ladders. Students then enter the Agent code from the handout to prepare their automated digger.

  3. Shaft Excavation & Inventory Check

    Run the Agent code to dig the vertical shaft and line the walls with ladders for safe descent. Students right-click the Agent to inspect its inventory, then secure lighting by mining coal or making charcoal in a cobblestone furnace to produce torches.

  4. Tunneling & Pattern Exploration

    Learners program the Agent to mine outward from the shaft base. Students compare straight paths against grouped block patterns to locate ore clusters efficiently, considering how conditional checks could help the Agent harvest only desired blocks.

  5. Review & Extensions

    Gather the class to share mining depth strategies and code modifications. For extended work, students can restore the day-night cycle to build a shelter around their bed, create an underground base with crafting stations, or design stairs or waterfall lifts.

Assessment: success criteria

  • Student accurately explains how the handout graph informed their selected mining elevation.
  • Student configures Agent loop parameters to dig a vertical shaft without creating dangerous falling hazards.
  • Student retrieves items by right-clicking the Agent and crafts needed tools, ladders, or torches.
  • Student explains how conditional statements enable the Agent to inspect blocks or collect specific resources.

Differentiation

Support

Assist students with entering the starter code parameters from the handout and remind them to place ladders continuously while digging downward.

Stretch

Challenge students to re-enable the day-night cycle, build a secure surface house or underground base, and code alternative transit routes such as stairs or waterfalls.

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. 1What is the main function of the graph provided on the student handout?

  2. 2Why might mining outward in a simple straight line be less effective for finding rare ores?

  3. 3If raw coal has not yet been uncovered, how can students obtain torches?

  4. 4How does conditionality improve the Agent's automated mining routine?

  5. 5How can a player inspect the materials that the Agent has excavated?

Frequently Asked Questions

Why does the lesson begin with the world set to always day?

Keeping the world in daytime allows students to focus on coding the Agent, gathering basic wood, and crafting ladders without nighttime hazards or hostile creatures interfering.

What considerations should guide the depth and width of the shaft?

Students should choose practical dimensions such as a 3x1 opening and plan safe descent routes so that an accidental fall down the shaft is not fatal.

Adapted from Mining with the Agent: Part I by Philip Golden on Minecraft Education, last updated Jun 21, 2018. 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