Building an AI System ===================== Through my experience of working on a variety of software engineering and AI projects, I have noticed that there is is a marked difference between the two. These are: (1) The programming languages used. The following languages are suitable for AI use, in order of decreasing utility: (a) LISP, or an expert system shell, depending on the problem. (b) Prolog. (c) Pop-11, SASL, etc. (d) Snobol, etc. Conventional languages such as C, Pascal, Fortran are unsuitable as development languages, but sometimes systems are rewritten in these languages if the original code (written in, say, LISP) is too slow. This is not generally recommended, as the code in the conventional language is difficult to modify should the need later arise. The slowness of languages such as LISP is not a intrinsic feature of the language: the LISP compiler could be optimised so that it generates similar quality code to that of a C compiler. (2) There is seldom any precise statement of user requirements, which means that the specification is necessarily vague, which in turn means that the phrase "bug free" has very limited meaning, other than that the system should produce a solution to a given problem, or indicate that it cannot do so. The solution produced may not be optimal, and it may not be correct. This means that the relationship between the developer and end-user is different from in conventional software. and also that it is not possible to develop the system in the usual order of analysis-design-implementation. The chances of the first system exactly meeting the customer's requirements are close to zero, and so often a prototype is built, something is learned from this, and then the prototype is thrown away and a new system is built. AI: General Application Areas ============================= 1. Expert Systems -------------- These are programs which simulate the performance of an expert in a particular domain. Examples are PROSPECTOR -- geology, CADUCEUS -- medical diagnosis, R1 -- VAX configuration. In general, the user is given some advice after first providing the system with some data. Of all possible AI work, development of expert systems carries the least risk because (a) The technology is well understood, to the extent that expert systems are no longer a hot research topic. (b) There are a variety of expert system shells on the market (e.g. Personal Consultant Plus, Goldworks, OPS5, ART and KEE). These systems provide a short cut in the development of expert systems, as they contain an inference engine and (usually) a development environment. (c) A partially completed expert system is usable, though it will not handle all the cases it should. This means that the expert system can be delivered to the customer after a few months for use and evaluation. Afterwards, enhancements can be made so that the system can handle less common cases. 2. Natural Language ---------------- By Natural Language, it is meant languages that people use to communicate to each other, e.g English, Japanese. Most NL systems fall into one of two categories: (a) Front ends to existing computer software, e.g. a relational database. These systems often have a limited grammar, though they might be expected to handle sentences such as: Does Bristow work in the Buying Department? Are there any utilities with PE > 15? Which patients in ward 15 are HBsAg positive? The technique selected for parsing will depend on the grammar, and the semantics will be defined by a mapping from completed parse-trees to, for example, a statement in a database query language. (b) Machine Translation. This is more difficult, because, unlike database queries, text to be translated is not so restricted in grammar, vocabulary and subject matter. Translations of literary quality are out of the question with present-day technology, as, among other problems, these require good literary style. Successful (i.e. user-acceptable) systems do, however, exist. These translate technical articles in restricted subject domains (e.g physics papers) and provide grammatically correct output in the target language, but they lack style and often require post-translation editing by an experienced translator. There is obviously a large potential market for Chinese/English translation systems and precious little to satisfy it, but there are many problems, a few of which are: (i) Chinese is not an alphabetic language. This requires an extra input/output stage which would not exist for English or Malay. (ii) Native language status in one language and degree level in the other would be desirable, and there are few people with both. (iii) Chinese grammar is rarely taught: most people think that its grammar is similar to English (it couldn't be more different), and would be surprised to learn that it has no adjectives. Having said all this, it might be possible to translate short news reports or scientific abstracts, and use Tian-Ma for the character generation. 3. Automatic Programming --------------------- This area has not yet been successfully tackled and is therefore a research area. Debugging code (preferably LISP, as programs = data in LISP) might be more promising. In addition, there is the possibility of developing software engineering aids which assist somehow in the specification, design or documentation of a system. The selection of architecture, development software or algorithms can be tackled by expert systems. I have in fact done this for expert systems: the system I built selected the most appropriate architecture for an expert system (It contained about 60 rules. I agreed completely with the answer it gave in about 50% of cases). The next two categories are related, and usually fall under the category of Machine Intelligence. 4. Machine Vision -------------- This is difficult, and falls into two parts: (a) Low level processing. This distinguishes shapes and motion from images recorded by a camera. This is really outside the scope of AI, as it is impossible to introspect about this, and so it is not possible to simulate this process on a machine. For example, how would you describe the colour red, and could you accurately draw someone's face from a verbal description of him? A related problem: How to distinguish between two speakers of the same sex with the same accent, or describe an American accent? The result of these problems is that they have to be solved by algorithms with very little guidance from psychology experiments, and none at all from introspection. (b) High level processing. This is used to analyse a scene, e.g. to know that a particular shape is a table and chairs, and that the boy in the far corner of the room is standing on his hands. Here, it is possible to use input from cognitive psychology. High level image processing is still not a mature area, however, even by AI standards. If projects in this area are considered, they should not be too ambitious. 5. Robotics -------- Like machine vision, this can be divided into low-level and high- level processing. Unlike low-level vision, low-level robotics can be tackled easier from a knowledge of kinematics and dynamics than low-level vision can with a knowledge of optics. Low-level robotics (i.e. how to move an arm or make a robot walk) is outside the scope of AI. High-level robotics, i.e. robot planning, is quite well understood and there are a number of systems in existence, e.g. STRIPS and NOAH.