gourmethoogl.blogg.se

Block world problem prolog
Block world problem prolog










block world problem prolog

Perhaps most importantly, as written they perform tasks which should be useful and are immediately accessible by typing the program text into the computer. They provide examples of attacking familiar problems which can be useful if you do develop programming further. The programs are included because they a) illustrate the implementation of specification such as those we produced in the Specification section, and b) serve as a working model and starting point of discussion with a programming partner. Kononenko and Lavrac 1989 provides a quick introduction with examples )).

#Block world problem prolog full#

(Indeed, it is unlikely that the beginner will understand these methods enough to write new programs based on them, without considerable effort and resort to introductory books on Prolog (see Bratko 1986 for a full introduction. Even though these are not written in the most compact and generative manner possible, they will initially prove difficult to understand. A balance is struck between style and efficiency and intelligibility for the non-programmer. Again, these do not necessarily correspond to 'best programming practice'. It does, however, limit the degree to which the computer can be used in a given problem area, since much of the value of computers lay in the ability to represent generative descriptions of complex structures.Ī second method (§7.3.3) uses the capacity of the programming language to write more general (and powerful) generative definitions of structures and operations on structures, but requires much greater ability on the part of the programmer.

block world problem prolog

This method is the suited for those who will be using such techniques only occasionally, because there is relatively little to understand about the computing and program language if the problem itself is well understood by the anthropologist-programmer. This form of coding is, however, more defensible in Prolog, which makes impossible some of the worst excesses possible in other programming languages. This method corresponds to what has been called 'straight-line coding', because little or no use is made of the algorithmic capabilities of the programming language. The methods are relatively straight-forward and effective, at the cost of some efficiency and risk of derision by programmers. The approach to implementation was chosen based on the likelihood that the methods would be accessible to anthropologists. In this section we will examine some the ways in which this specification can be implemented in the programming language Prolog (the specification can be implemented in virtually any computer programming language). In § 6.2 we outlined the conceptual specification for programs which would identify the people corresponding to specific (etic) genealogical positions relative to some ego and which would list the genealogical terms describing the relationship(s) between an ego and a specific person. The following is extracted from Chapter 7 of Applications in Computing for Social Anthropologists, Michael Fischer, 1994, Routledge, London.












Block world problem prolog