Learning Module · Detail

Car Bot

This learning module introduces algorithmic decision processes using if-else structures.

The learners model autonomous behavior through repeated state checks in a loop.

Time 30 minutes
Format rpgDungeon
Language Python 2 (CE)
Tasks 1

Preview Image: Car Bot

Introduction (Original Excerpt)

Welcome to the Shadow Archive of the digital academy. Everything is dark – only a small maintenance robot (Robi) is still in the cellar. At the end of the labyrinth, the golden Master-Reset-Switch awaits.

Didactic Classification

Subjective Objective

The central focus lies on developing a simple decision algorithm for autonomous navigation in a structured environment. The learners use boolean checks to query collisions and make movement decisions. A decision tree is modeled, which considers alternative action options when encountering blocked paths.

Implementation occurs through nested if-else structures combined with a loop for repeated execution of the decision-making process, making the connection between an abstract decision model and its concrete algorithmic implementation tangible.

Competence development

Didactic value in the classroom

Flow of the lesson unit

1

Find the reset

An autopilot algorithm is implemented that recognizes obstacles and reacts accordingly. Based on collision queries, movement and rotation decisions are made and repeated in a loop to reach the goal in the labyrinth.

  • Didactic focus: Nested decision logic
  • Typical Challenge: Correct Structuring of If-Else Queries

Work assignment (excerpt)

  1. Program a pilot to navigate the labyrinth safely.
  2. Use hat_kollision() to detect obstacles.
  3. Create a decision tree with if / else.
  4. Repeat the steps in a loop to reach the goal.

Example (excerpt)

1
2
3
4
5
for i in range(schritte):
    if not hat_kollision():
        bewegen()
    else:
        rechts_drehen()

This fragment illustrates the fundamental connection between state checking and derived action in the decision-making algorithm.

Hints for classroom practice

This module connects decision models with their step-by-step implementation in an autonomous navigation algorithm.

The clear task structure supports lesson organization and facilitates securing solution strategies. Differentiation is possible through additional decision rules.

Request a demo access and test the module in your own course context to introduce students to algorithmic pathfinding.