Niki - the robot

from Wikipedia, the free encyclopedia
Niki's field of work

With Niki - the robot (often Niki or NIKI ) is a group of computer programs designated based on the developed by Richard E. Pattis idea of "Karel, the robot". The name Niki was chosen to honor the computer scientist Niklaus Wirth . These are programming languages ( mini-languages ) that are deliberately kept rudimentary and are intended to facilitate the introduction to algorithms . A virtual robot is programmed that moves on a tile field and can pick up and unload objects. The programming gives beginners a first glimpse into the world of procedural programming .

Due to the simple operation and the limited set of commands, Niki is well suited for getting started with programming, especially for learning the teaching language Pascal developed by Niklaus Wirth for structured programming .

The robot

The robot is only equipped with the most necessary skills. He can turn left, move one step forward, pick up an item, and release an item. More complicated movements can be achieved by combining the simple commands.

The language

The language is based on Pascal , but the range of languages ​​was greatly reduced by Niki in order to keep the initial difficulties when learning the programming as low as possible.

The Niki language includes procedures, recursion, the repeat statements Repeat Untiland While Do, and branching If Then Else. The early introduction of the procedure concept is of great importance. Thus the few Niki statements can vor, drehe_links, nimm_aufand gib_abbe effectively extended.

The modes

There are two modes with which the little robot Niki can be controlled, hand control and program control.

Program control

The structure of a program is the same as in Pascal :

Comments start with {and end with }.

PROGRAM <programm-name>;
PROCEDURE drehe_rechts;
   BEGIN
       drehe_links;
       drehe_links;
       drehe_links;
   END;
BEGIN
   vor;
   drehe_rechts;
   {usw.}
END.

The commands to address the robot:

command description
in front take a step forward
turn_left Rotation by 90 ° to the left
take_up pick up an object
give_ab hand in an item
WHILE Loop that (not) runs through at least once according to parameters
REPEAT Loop that runs through at least once according to parameters
IF If-query

Variations

In addition to Niki - the robot , there are a number of variations on the same idea. In addition to the ancestor Karel, the robot , hamsters , Kara, the beetle , Robi, the robot and the robot Karol are known. The programming language Logo is significantly more complex, but is based on the same principles ( Turtle control ).

See also

literature

  • Alfred Hermes, Dieter Stobbe et al. An introduction to algorithms using the Niki the robot model in: New Technologies Issue 1.2, published by the State Institute for Schools and Further Education, Soest 1985.
  • Alfred Hermes, Dieter Stobbe: Computer Science One . Ernst Klett Verlag, Stuttgart 1988. ISBN 3-12-738400-9

Individual evidence

  1. Richard E. Pattis. Karel The Robot: A Gentle Introduction to the Art of Programming . John Wiley & Sons, 1981. ISBN 0471597252
  2. Niki the robot at Central Office for Educational Media in the Internet e. V.
  3. Roland H. Untch, Basics of C ++ and C, http://www.cs.mtsu.edu/~untch/karel/
  4. Dietrich Boles, Sprachgrundlage Java, http://www.java-hamster-modell.de
  5. Language base Java, http://www.swisseduc.ch/informatik/karatojava/kara/
  6. Language basis JavaScript, http://www.sophie-scholl-schule.eu/joomla/index.php?option=com_content&view=article&id=80%3Arobi&catid=42%3Ainformatik&Itemid=84&lang=de

Web links