Reference Guide: Overview

This page provides an overview of Karel's world and what the robot can do.

You may also want to read a reference guide that describes the details of the vocabulary Karel understands.

Karel's World:

General Comments
Karel lives in a flat world with the standard north, south, east, and west compass points. The world is bounded on all four sides by walls. Karel must not walk into these walls. If Karel hits a wall, that is considered an ERROR and Karel shuts itself off.

Crisscrossing the world are horizontal streets (running east-west) and vertical avenues (running north-south). An intersection (or street corner or corner) is located wherever a street and avenue intersect. Karel can be positioned on any corner, facing one of the four compass points. Both streets and avenues are numbered; consequently each intersection may be identified by its street and avenue numbers.

The corner of 1st Street and 1st Avenue is named the origin. This is the most southwesterly corner in Karel's world. Street numbers increase as Karel travels east and avenue numbers increase as Karel travels north.
Karel's Location
As mentioned above, Karel will always be located at an intersection within his world, and will always be facing north, south, east, or west.
Walls
As we've mentioned before, Karel's city is surrounded by walls. In addition, walls may exist within the city as well. Karel must never bump into any walls in or around the city.
Beepers
Within Karel's world may be zero or more beepers. Beepers are small objects that emit a quiet beeping noise that Karel can "hear". When present, they are located at intersections (like Karel), which means when Karel is at a particular intersection, it might be "next to" a beeper, if there is one located where Karel is located. Karel can pick beepers up and put them into its backpack, or take them out of its backpack and put them down at the current intersection. More than one beeper may be located at any given intersection.
Karel's Backpack
As mentioned above, Karel has a backpack into which it can put any number of beepers. The bag is made of a material that completely blocks the sound emitted by the beepers. This means that Karel will never "accidentally" "hear" a beeper that is in the backpack. If Karel hears a beeper while at an intersection it is because there is a beeper sitting on the ground at that intersection.