Applicability
Skill areas: Speaking and Listening, Collaboration, Roles
Ages: 11-13 yrs old
Grade level: 6th, 7th, and 8th
Students collaboratively build mazes and write AI to solve their own mazes.
Understand the importance of dividing up work, collaborating with others, designing before building, and adjusting designs based on new input.
Follow rules for collegial discussions and decision-making, track progress toward specific goals and deadlines, and define individual roles as needed. Pose questions that connect the ideas of several speakers and respond to others’ questions and comments with relevant evidence, observations, and ideas. Acknowledge new information expressed by others, and, when warranted, qualify or justify their own views in light of the evidence presented.
This activity requires students to have the Code Connection app open and running with their Minecraft Education Edition. Graph paper is also useful for this activity, but it is not necessary. This is the first lesson in a 2-part series.
This activity consists of 2 parts:
Have students get into groups of 2 or 3. If you are using graph paper, pass out the paper to each group. Have each group design a maze that is no bigger than 10 x 10 squares. Ensure that students have an entrance and an exit to their maze:
Have students create their maze in Minecraft by hand.
Have students create their maze in Minecraft with code. For example, the code for the first two rows in the above maze would be:
player.onChat("createMaze", function () {
blocks.fill(
STONE,
pos(0, 0, 0),
pos(10, 1, 10),
FillOperation.Replace
)
player.runChatCommand("row1")
player.runChatCommand("row2")
})
player.onChat("row1", function () {
blocks.place(AIR, pos(6, 0, 0))
blocks.place(AIR, pos(6, 1, 0))
})
player.onChat("row2", function () {
blocks.place(AIR, pos(4, 0, 1))
blocks.place(AIR, pos(4, 1, 1))
blocks.place(AIR, pos(5, 0, 1))
blocks.place(AIR, pos(5, 1, 1))
blocks.place(AIR, pos(6, 0, 1))
blocks.place(AIR, pos(6, 1, 1))
})
Have each group come up with a list of instructions to solve their maze. For example, these are steps to complete the maze coded in Option 2 above. It begins with the agent standing at the ENTRANCE looking into the maze:
Have the students then code their agent to perform the actions. Ensure that the agent gets through their maze correctly.
OPTIONAL: Make it a competition! Who can design a maze that requires the most number of steps from an agent? The least number of steps?
Intended outcomes: