Key-Art-2-1-554x368.png

Mining with the Agent: Part I

8-10 yrs old

11-13 yrs old

Computer Science

Vertical Shaft mining is an excellent illustration of the Agent's utility. With simple code we can automate the heavy labor involved in mining

avatar Submitted By: Philip Golden

June 21, 2018

Skills

  • Critical Thinking
  • Project Based Learning

External References

Survival Island World (ideal for mining)

This mcworld is an ideal setting for the project

Student handout with graph and code

It can be useful to talk through the code with students as they are implementing it

Example Makecode Implementation

Shows additional tp and turnLeft functions that are very useful

Learning Objectives

  • Data Interpretation: Using the graph on the handout, student's determine what levels they wish to mine at. Simple interpretations of the graph allow student's to say 'x is found at level y', however more detailed consideration can give an idea of the relative likelihood of finding different materials
  • Understanding loops in coding: Both parameterized (shaft) and hard coded (mine) loops are implemented. Students can be encouraged to think about the tradeoffs between the two approaches
  • Conditionality in coding: The agent needs to perform actions based on his environment (is there a block in front of me). An extension could be to only collect if certain wanted materials are present
  • Strategic planning: Tradeoffs exist between mining at different levels at different stages. Careful planning of the use of materials can give significant rewards
  • Creativity: This project gives significant scope for creative decision making and the end results should be highly individualised

Guiding Ideas

  • Carefully plan a strategy for mining - students will likely initially need ladders (to ascend shaft), and once they have found coal they can make torches. After this stage it probably makes more sense to go deeper, and start to collect ores for crafting
  • Consider the shaft dimensions -how deep should it be (don't make it so deep that a fall means depth), is a 3x1 opening a reasonable choice?
  • Consider the mining route - the code will make the agent mine in a straight line, but is this the best thing to do? Typically ores are grouped together. Is there a pattern that would be efficient to find rare blocks?

Student Activities

  • Initially the world is always day. Use this to implement the code for the agent from the handout
  • Collect wood and craft a crafting table to make ladders
  • Have the agent create a vertical shaft, and line the walls with ladders
  • Right clicking the agent shows you what has been collected. Key first goal is to get torches, by either mining coal directly or creating charcoal from a furnace (cobblestone)
  • Decide how to proceed mining and what can be crafted from mined materials
  • Extension 1:  Turn back on the day night cycle and create a simple house around the bed. Now it may also be advantageous to craft weapons and armour
  • Extension 2: Consider creating an underground 'base' with a crafting table etc. to remove the need to continually return to the surface
  • Extension 3: Are there more efficient ways to move up and down than ladders? Could we use waterfalls? How about stairs? Can the agent help us here?

Performance Expectations

  • Students should be able to interpret the graph on the handout and verbalise at least a basic strategy for mining
  • This strategy should evolve as the project progresses and could encompass:
    • Stages of mining where the outcomes from previous stages (e.g. stone tools) enable new capabilities
    • Physical patterns for mining that are particularly efficient
  • Students should manipulate the code at least at the level of choosing different parameters for mining and shafts, and potentially also to implement shaft patterns (e.g. stairs) or mining patterns
  • Students should be able to explain whether how conditionality (i.e. only collect certain blocks) would be implemented and whether it is useful

Skills

  • Critical Thinking
  • Project Based Learning

External References

Survival Island World (ideal for mining)

This mcworld is an ideal setting for the project

Student handout with graph and code

It can be useful to talk through the code with students as they are implementing it

Example Makecode Implementation

Shows additional tp and turnLeft functions that are very useful