Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site rochester.UUCP Path: utzoo!watmath!clyde!floyd!harpo!seismo!rochester!gary From: gary@rochester.UUCP (Gary Cottrell) Newsgroups: net.ai Subject: Re: Tail Recursion is Iterative Message-ID: <5535@rochester.UUCP> Date: Fri, 9-Mar-84 10:45:25 EST Article-I.D.: rocheste.5535 Posted: Fri Mar 9 10:45:25 1984 Date-Received: Sat, 10-Mar-84 11:30:14 EST Sender: gary@rocheste.UUCP Organization: U. of Rochester, CS Dept. Lines: 37 From: Gary Cottrell>From decvax!decwrl!rhea!orphan!benson Thu Mar 8 23:44:38 1984 Date: Thursday, 8 Mar 1984 18:57:59-PST From: decvax!decwrl!rhea!orphan!benson Subject: Re: Tail recursion. Please forward to Mr. Sloan. To: decvax!harpo!seismo!rochester!gary Status: R Dear Mr. Cottrell: I do realize that in most cases (I.E., everyday programming), tail recursion can be reduced to iteration. However, in my study of this aspect of dog modeling, I found the underlying MOTIVATION to be recursive in nature. Clearly this is not a concept which can be applied to programming outside the AI realm. (And when I say "AI", I of course mean "AI", not "AI"). My canine subject did not set out to chase his tail for i equals 1 to n. Nor did he intend to chase it until some condition was met; the obvious condition being "has the tail been caught?" In fact, frequent experiments showed that actual tail capture did not necessarily end the cycle, and it often was not achieved at all before cessation of the chasing activity. No, a more realistic model is one in which a bored or confused dog initiates an attempt to catch his tail. During this process, the previously unseen tail falls into view as the head is turned. The dog's suspicion is aroused; is this some enemy preparing to strike? This possibility causes an attempt to catch the tail. This causes the tail to fall into view.... and so on. The recursion may be terminated either by some interrupt generated by an unrelated process in the dog's brain, or by forced intervention of the dog's master. The latter is dangerous, and should be scrupulously avoided, because it does not allow the dog's natural unwinding mechanism to be invoked. Thus, the dog may carry unnecessary Tail Chasing Activity procedure frames around in his brain for years, like a time bomb waiting to go off. This, indeed, is a subject deserving further study. In response to your other question: you are welcome to post my AI reports wherever it seems appropriate. Tom Benson