Reference Guide: Overview
return to main page

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

You may also want to read a reference guide that describes the details of the commands and functions Karel understands and/or a reference guide for the JavaScript programming language.

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 boundaries. Karel cannot bump into these walls; if he tries to move into one, he will crash.

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
Within Karel's world may also be one or more walls. Just as Karel may not move into the boundaries of his world, he may not move into walls within it either. An attempt to move into a wall will cause Karel to crash, just like an attempt to move into a boundary.
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, he might be "next to" a beeper, if there is one located where he is located. Karel can pick beepers up and put them into his "beeper bag" (see below) or take them out of his beeper bag and put them down at the intersection at which he is located. More than one beeper may be located at any given intersection.
Karel's Beeper Bag
As mentioned above, Karel has a beeper bag into which he 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 in his bag. If he hears a beeper while at an intersection it is because there is a beeper at that intersection that is not in his bag.



*Differences From Karel the Robot's Original Specifications:

As noted in the text above, this Karel simulator is different in a few minor ways than the original specifications in "Karel the Robot" by Richard E. Pattis and revised by Jim Roberts and Mark Stehlik.