Robot#
The Robot class is a restricted public facade for the internal actor.
Students interact with a Robot object rather than a full miniworlds Actor,
so the visible API is limited to the abilities defined in the current WorldConfig.
Attempting to call an ability that is not enabled for the current task raises
AttributeError, which gives the student clear feedback about what is allowed.
Abilities#
The default ability set is {"step", "turn_left", "turn_right"}.
The "with_position" config additionally grants "position".
The "leaf_line" config additionally grants "on_leaf" and "remove_leaf".
Method / Property |
Description |
|---|---|
|
Move one tile in the current heading. Does nothing if the tile is blocked. |
|
Rotate 90 degrees counter-clockwise. |
|
Rotate 90 degrees clockwise. |
|
Return |
|
Remove one |
|
Current |