[Next] [Up] [Previous]
Next: About this document Up: Towards Artificial Intelligence Previous: User-Defined Procedures

Exercises

  1. Write (in English) an algorithm for making poached egg on toast, taking into account that you might have run out of eggs, toast, or butter.
  2. The procedure date returns a list containing the current date and time:

        date() =>
    
        ** [21 Mar 1989 13 51 24]

    What would be printed out by the following POP-11 commands:

        length(date()) + length("date")=>
    
        [length(date)]=>
    
        "length(date)"=>
    
    
    
        vars date_length;
    
        date() -> date_length;
    
        date_length + date_length -> date_length;
    
        date_length =>
  3. Write a POP-11 procedure area that takes as its argument the radius of a disk and returns its area (given that an expression to calculate the area is 3.14159*radius*radius). Incorporate area in a procedure volume that takes two arguments, representing the radius and height of a cylinder, and returns its volume (given that the volume of a cylinder is area*height).
  4. Read Turing's paper entitled ``Computing Machinery and Intelligence,'' in Hofstadter and Dennett (1981). Is his `Imitation Game' a valid test of intelligence? What are its limitations? Turing sets out some objections to the assertion that ``machines can think'' and dismisses each one. Can you think of any more objections? Are the dismissals fair? Given what you have read so far, and your own background knowledge and opinions, do you agree with Turing's claim that ``at the end of the century the use of words and general educated opinion will have altered so much that one will be able to speak of machines thinking without expecting to be contradicted''?


Cogsweb Project: luisgh@cogs.susx.ac.uk