ucbesvax.turner@ucbcad.UUCP (01/09/84)
#N:ucbesvax:38500002:000:2038 ucbesvax!turner Jan 2 09:59:00 1984 Can anyone here comment on Prolog as an appropriate implementation language for Go? I am just learning Prolog at the moment, and the usual pain involved in taking on a new language prevents me from being very objective. The goal-directedness seems a plus, but I'm somewhat concerned about efficiency, and bounding the move-searches. Our implementation (Univ. of So. Wales) for the VAX 11/780 lacks a compiler at the moment. I assume that LISP implementations of Go have made use of compiled LISP. I believe that interpretive overhead for Prolog is greater than that for interpreted LISP--to the extent that such apples/oranges comparisons can be made--but my reference (Clocksin and Mellish, "Programming in Prolog", Springer-Verlag, 1981) doesn't give details of Prolog implementation. If you do not have the above-mentioned book, I can recommend it on the basis of a night's reading. Whereas LISP is sort of an abstract machine language in certain ways--a single-chip implementation of a LISP dialect was done at MIT a few years ago, which included automatic garbage collection--Prolog is properly classed as a Very High Level Language. "Programming in Prolog" is a very readable tutorial-style text, though a bit rough around the edges. The kernel of Prolog appears to be a simple inference engine. The programmer does not specify procedures, as such, but rather defines terms, and relations among them, then asks after the validity of certain statements about the terms defined with respect to the relations among them. Thus, very simple algorithms can be augmented by adding special cases, pre-empting the more general validation processes. As it turns out, it is very easy for this process to get out of hand. Left-recursive definitions can cause infinite loops, where the corresponding right-recursion will terminate quickly. One can imagine situations where there are two ko fights on a board, and the program loops in it's analysis by always looking at the ko moves first. --- Michael Turner (ucbvax!ucbesvax.turner)