karel.pdf - Karel the Robot 1 Nicolas Wirth Algorithms Data Structures => Programs deal with each separately algorithms first algorithm a finite set of

karel.pdf - Karel the Robot 1 Nicolas Wirth Algorithms Data...

This preview shows page 1 - 5 out of 10 pages.

Karel the Robot 1. Nicolas Wirth ... “Algorithms + Data Structures => Programs” deal with each separately ... algorithms first algorithm ... “a finite set of unambiguous, executable instructions that will ultimately terminate if followed” 2. Concept of Karel... a language ... similar to standard procedural programming languages like Pascal, C , or BASIC no data ... just algorithms invented for teaching purposes ... has the essential elements of a commericial language … but its fun 3. Karel’s World streets and avenues
walls beepers 4. Karel’s Tasks the beeper bag … used to store beepers … may be filled at start of program
navigating in the world ... doing tasks given by the Robot Master (the program)
5. Karel’s Capability to Act ... primitive actions Move; TurnLeft; PickBeeper; PutBeeper; TurnOff; 6. Karel’s Capability of Sensing the Environment (Sensory Perceptions) … these are Karel’s “tests” Radar (Echo Locator) front-is-clear/blocked, left-is-clear/blocked, right-is-clear/blocked Hearing (Microphone) next-to-a-beeper, not-next-to-a-beeper Sensor Arm any-beepers-in-beeper-bag, no-beepers-in-beeper-bag Direction (Compass) facing-north, facing-south, facing-east, facing-west not-facing-north, not-facing-south, not-facing-east, not-facing-west 7. Karel’s Capability of Making Decisions IF <TEST> THEN <ACTION 1> ELSE <ACTION 2>; <TEST>is one of the boolean “tests” in item 6 above.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture