HOMEWORKS IN YEAR 2005.



Late homeworks are accepted only in special cases. You have always one week for a homework to return, unless specified otherwise.

  1. Homework 1. Assigned on the first lecture.
    To be completed in one week.
    1. PART 1 Create your own WWW page. Explain your background and present your interest in robotics. What kind of project you want to do and why. What you expect to learn in this class. Your favourite robots from Internet? Send me by email the address of your page so I will link it for all class students to see. These pages will help in our group communication and especially in projects.
    2. PART 2 Write a test of as many lisp functions as you can do in one week. You should invent tests for the following functions: car, cdr, caddr, cons, list, set, setq, prog, progn, cond, atom, number, greaterp, plus, minus, minusp, numberp, go, nconc, reverse, nreverse, print, trace, traceset, debug. Additional tests of other functions are very welcome and will increase your grade. You should be acquinted with LISP environment and interactive use after this homework.
    3. PART 3 Write a LISP program that inverts the order of atoms in a list given as its argument.
    4. PART 4 Write a LISP program that copies an arbitrary list data structure on all levels but atoms. Show on examples how it works.


  2. Homework 2. Assigned on the third lecture and on Friday meeting before it.
    To be completed in one week.
    1. Given is a description of a labyrinth as a binary matrix. "Black field" encoded by a "1" is a wall element and "white field", encoded by 0 is a corridor on which the robot can move. You can use any other symbols to mark some useful data in the matrix. Represent the matrix by lisp array. The matrix should have at least one path to leave the labyrinth from any white point to one of the exits of the labyrinth.
    2. Write an algorithm that the robot will find some (not necessarily shortest) path to go out of the labyrinth whatever is its initial position. The robot may try various ways, remember blind corridors and next finding the reasonable good path.
    3. Can you write a program that always gives a warranty of the shortest path? You will get additional points for this.
    4. Each step of initial learning (tries and errors) and next finding the shortest path with the learned robot should be illustrated by printouts of the step-by-step snapshots of robot's position in the labyrinth.
    5. The labyrinth should be small, not larger than 10*10, to avoid printing too much paper.
    6. In addition to the lisp code and printout, please explain in English your ideas and how they can be used in a mobile robot.
    7. If you want you can propose additional features for additional points.


  3. Homework 3. Assigned on the third lecture.
    To be completed in three weeks. (31-st of January).
    1. This homework has three variants. The class should create three groups of approximately equal size, so that there will be several students' programs for each variant.
    2. VARIANT A.
      1. The sentence is a list of words. There is a group of question patterns that start with why, when, who, where, etc. Try to find all types of patterns like this. Of course, these patterns should be only for a robot living in a limited environment, such as our building or our laboratory. The first word is of type "why, when, who, where, what, etc".
      2. Next come words belonging to some groups of words and again, related to robot's environment, not a general world. The robot first tries to match one of the words "when, why, etc" in the sentence. We assume that exactly one of these words will be matched. This word is removed from the question list and the program goes to the state corresponding to this word. For example if the word was "WHERE" then the program goes to the state ANSWERS_TO_WHERE. For instance, if the question was the list (WHERE IS THE HAMMER AND THE NAILS), the program removes the atom WHERE and goes to internal state "ANSWERS_TO_WHERE".
      3. Now the question list becomes (IS THE HAMMER AND THE NAILS), This first search pattern corresponds to the highest level of branching in a decision tree, where the variable is "question-type" and its values are "when, where, why, who, what, etc". Now, being in state "ANSWERS_TO_WHERE" the program matches all stored in its memory words corresponding to items. If it finds one of them - HAMMER, it removes the word HAMMER from the list and goes to the state HAMMER that was reached by arrow HAMMER from state WHERE. This way the next level of the decision tree is created. In state HAMMER that hangs from state WHERE the question list becomes (IS AND THE NAILS). THE is removed together with HAMMER since it carries no information.
      4. Now the program looks for words corresponding to "animated objects", these are humans and robots (no dogs allowed in the lab). No such word is found. Now the program looks to words related to actions. The word IS is found and the corresponding branching is done. In this node of the tree program finds the answer "the hammer is near the big black box to the left of the main door."
      5. As we see, all answers to the questions can be found in the decision tree. This decision tree is created from input-output pairs as presented in the class.
      6. Let us observe that the same answer "the hammer is near the big black box to the left of the main door" will be given to the following questions:
        (WHERE IS THE HAMMER)
        (WHERE ARE THE NAILS AND THE HAMMER)
        (HAMMER, WHERE IS MY HAMMER)
        (MY HAMMER, WHERE IS IT) Let us also observe that this method uses machine learning in the learning phase when the big decision tree is created from the big set of examples given by the supervisor who teaches the robot.
      7. In order to improve the learning results, the programmer is responsible for the list of words corresponding to values of each variable and for the order of looking for the variables.
    3. VARIANT B.
      1. The sentence is a list of words. There is a group of questions that start from an informing sentence, for instance "THE HAMMER IS ON THE DESK, ISN'T IT?" or "MARY HAS LEFT THIS ROOM, HASN'T SHE?).
      2. The program has to recognize the type of such question by checking what is the pattern ending the question. These patterns are like (ISN'T IT), (HASN'T SHE), (IS THAT TRUE), (DOES NOT SHE), (HAS HE).
      3. Knowing the type of such sentence, the first part of the sentence, like (THE HAMMER IS ON THE DESK) has to be parsed and confirmed in the data base is it true or not.
      4. Before asking this kind of questions by the human, the program investigates the situation by asking questions to the human. For instance (WHERE IS THE HAMMER), (WHAT IS ON THE DESK), etc. So, in the first phase the initiative of dialog is by the computer who asks questions to create the data base of facts. When the data base is created, the computer gives initiative to the user who asks questions of the type B.
      5. The program should answer with full sentences, like (YES, YOU ARE RIGHT, THE HAMMER IS ON THE DESK), or (NO, YOU ARE WRONG, THE HAMMER IS NOT ON THE DESK, THE HAMMER IS ON THE BED).

    4. VARIANT C.
      1. The sentence is a list of words. We are concerned only with sentences that are direct commands to the robot.
      2. It is suggested that you use a combination of decision trees (get program from my webpage) and Eliza-like programs (also get it from my webpage).
      3. The commands can be formulated in many different ways, but they are all related to ordering robot to do something. For instance: (SING A SONG), (GO TO THE LEFT DOOR), etc.
      4. You have to create a simple language of commands of the robot. As a result of obtaining the command, the robot confirms the comand by repeating it in a structured way that corresponds to the language of commands but is also a correct natural language.
      5. When the user tells YES, the command is executed. If the user says NO, the program has to ask a question or a sequence of questions to clarify the situation.
      6. When finally the command is understood, it is executed.
      7. The types of commands are described by a certain grammar. Their number can be very large, for instance, (WAVE YOUR LEFT HAND THREE TIMES WHILE SMILING AND TELLING "OH YES YES").