Minecraft Education: Agent Operator
If Then That
Teach the Agent to make a decision: if something blocks the way, turn; otherwise, keep moving. That is how a maze runner works.
Builder handle: ____________________ Date: ____________
Steps
- Build a tiny maze. Place a few walls by hand to make a short hallway with two corners. ☐
- Ask a question. Make a command called explore. Add 'repeat 30 times'. Inside it add an 'if … else' block from Logic. ☐
- Use the Agent's sensor. For the condition use 'agent detect block forward'. If true: 'agent turn right'. Else: 'agent move forward by 1'. ☐
- Test and fix. Run explore. If the Agent gets stuck, ask: what does it do at a dead end? Try adding a second check. ☐
Trap Trial
Design a hallway the Agent can solve with your if/else program, then challenge a friend's program to solve it.
Finish line: The Agent reaches the end of your hallway without you steering.
What I built: ____________________________________________
One thing I fixed: _______________________________________
Check
- In 'if agent detect block forward then turn right else move forward', what happens when the path is clear?
- ☐ The Agent turns right
- ☐ The Agent moves forward
- ☐ The program stops
- ☐ The Agent places a block
- A conditional lets a program…
- ☐ Repeat forever
- ☐ Choose what to do based on a question
- ☐ Store a number
- ☐ Draw pixel art
- Your Agent spins in a corner forever. A good debugging question is:
- ☐ Is my computer broken?
- ☐ What does my program do when both forward and right are blocked?
- ☐ Should I restart Minecraft?
- ☐ Is it night?
Techie Factory · techiefactory.com