To introduce the student to the Prolog programming language. This includes both reaching a level of competence in programming and also understanding the meaning of such programs. It is intended to provide the student with an alternative tool for solving problems of a symbolic non-numeric type such as problems encountered in Artificial Intelligence.
Term | Prerequisites | Core For | 1 | Basic computing skills and knowledge of Unix and text editing | N/A |
· The components of a Prolog program.
· The syntax of Prolog. The meaning of a Prolog program.
· Lists; the Prolog list structure and useful list operations. Structures which generalise lists into data objects having several components. Two classical problems; the eight queens problem and the four colours problem; solved using Prolog.
· Elementary arithmetic operations. Basic operators and some examples of their use. Input and output in Prolog.
· Prolog queries and the mechanism of backtracking. How the programmer can control backtracking mainly in order to obtain a more efficient program. The infamous cut operator and examples of "green" and "red" cuts.
· Application areas of Prolog; knowledge-based systems and cognitive science. The relationship between logic and Prolog; parsing of simple natural-language sentences and finding of optimal routes in structures (e.g. maps of city underground train networks) where heuristics or "rules of thumb" influence what is optimal and what is not.
Weighting | No. Exam Questions | No. Courseworks | 30% coursework, 70% examination | 6 | at least 3 |