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.

Introduction (Original Excerpt)
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
- Modeling a decision-making process for navigation
- Applying if-else structures to control program flows
- Using boolean return values for environment checks
- Repeating decision logic through loops
- Structuring alternative actions at collisions
- Algorithmic planning of movement sequences in grid environments
- Implementing autonomous behavior patterns in program code
Didactic value in the classroom
- Gradual introduction to nested decision structures
- Promoting systematic problem-solving through decision trees
- Clear separation of state checks and actions
- Transparent goal orientation through defined start and end points
- Differentiation possible through extension of decision rules
Flow of the lesson unit
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)
- Program a pilot to navigate the labyrinth safely.
- Use
hat_kollision()to detect obstacles. - Create a decision tree with
if/else. - Repeat the steps in a loop to reach the goal.
Example (excerpt)
| |
This fragment illustrates the fundamental connection between state checking and derived action in the decision-making algorithm.
Hints for classroom practice
- Can be used as approximately 30-minute deep dive on control structures.
- Differentiation possible through additional decision rules.
- Result security through visualization of the decision tree.
- Expandable to alternative navigation strategies.
- Linked to topics such as loops, logic, and algorithms.
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.