11-13 yrs old
Math & Economics
Use Code Builder and build a testing area to determine if free range chickens lay more eggs.
January 25, 2019
World file for student use
Before beginning, students should have some experience and success with writing simple code using Code Builder and should be able to access player, blocks, agent, and loop commands.
Loops can drastically cut down on the amount of code needed to run a command.
The agent can be used to recognize, place, and remove blocks quickly and efficiently.
Analyzing and interpreting data are foundational skills from which evidence can be derived to support claims.
Teachers may run this lesson with individual students, or with small groups based on their familiarity with Code Builder commands.
Students are to use their agent and chat commands to complete an experimental test location and then run an experiment to determine if chickens lay more eggs when provided with more space.
Specifically, they will task their agent with building a fence around both a 5x5 area and a 10x10 area. They will then use a clone command to copy an existing chicken coop and place multiple copies in a row. Finally, they will use chat commands to spawn chickens into each test area and run the experiment.
1. Use the agent to build fencing around the 5x5 and 10x10 areas. Students should explore, compare, and share command options and configurations. They should be able to complete this task by combining the following player, agent, and loop commands:
2. Clone the existing chicken coop and make 4 copies. There are two ways to approach this and student understanding of position/coordinates will likely determine the choice they make. Both approaches use the clone command. They will be able to complete this challenge by embedding the following blocks command into a chat command:
This option requires that the player determine their relative position to the chicken coop in front of them. Entering the three-dimensional positions of the from and to values will capture a cuboid of the coop. The into values represent the location the player will place the cuboid relative to themselves.
The second option replaces ~x ~y ~z to ~x ~y ~z into ~x ~y ~z with a position sub-command.
To use this command students will insert the world coordinates of the lower left corner of the coop and the upper right corner. They then move to the location where they want the next coop to appear and enter in the new coordinates.
3. With the experiment ready to begin, students should generate one final command that will spawn 5 chickens next to the player. They will perform this action twice, once inside the 5x5 area and again in the 10x10 area:
Note: In addition to placing 5 chickens into each fenced area, students should use a chicken spawn egg to spawn one chicken into each coop. Chicken eggs will be collected in the chest.
With preparations complete, run the experiment for a set amount of time (~10 minutes) and have students count and record the number of eggs found in each station or chest. They can produce individual reports, or add all their observations into one large data set for comparison and analysis.
Students will demonstrate their understanding of agent and loop commands by building two fences of different perimeter.
They will demonstrate understanding of positions and coordinates by successfully placing 4 chicken coops adjacent to each other.
Four chicken coops will be created using the clone command.
Through observation, students will produce individual and collective data sets that will allow them to determine similarities and differences in their findings.
Students should be able to answer the following questions:
Sign in with your Microsoft account and sign up for the Minecraft: Education Edition newsletter. We promise to respect your inbox.