Lesson · with Servo · Architect rank
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.
You need
- Minecraft Education
- A new flat creative world
- The printable mission sheet (optional)
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.
Build task
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.