TEACH PROGLECT1 Aaron Sloman Oct 1998 OVERVIEW FOR NEW AI STUDENTS LEARNING POP-11 CONTENTS -- What is AI? -- -- Sub-fields of AI -- -- AI as SCIENCE -- -- AI as Engineering -- Many problems are ill-defined -- Choosing a programming language -- Requirements for a programming environment -- Requirements for an AI programming environment -- What you are interacting with -- -- Window Manager and Xserver -- -- Xterminal server -- -- Login program -- -- Operating system -- -- File system -- -- xterm window -- -- Unix shell -- -- Poplog process -- -- -- The editor VED -- -- -- The Pop-11 incremental compiler -- -- -- The Pop-11 memory manager -- -- -- The Pop-11 program library system -- -- -- The Pop-11 error handler -- -- -- Particular tools in Pop-11 -- -- -- Your own Pop-11 programs -- -- -- Other language systems Prolog, Common Lisp, SML -- Further Reading -- What is AI? -------------------------------------------------------- o A relatively new multi-disciplinary field, which brings new approaches to some very old problems about the nature of mind and intelligence. o It integrates several other disciplines, including psychology, philosophy, linguistics, logic, computer science, software engineering, and perhaps later on also anthropology and other subjects that study people. o AI has two main kinds of goals: Science (studying things that already exist, explaining how they work, etc.) Engineering (making new kinds of things, solving practical problems, etc.) These activities have much in common. Including requirements analysis, programming (model building), -- -- Sub-fields of AI o It has many sub-areas studying different types of problems, e.g. o Vision o Learning o Automated discovery (induction) o Memory o Problem solving and planning o Natural language processing o Modelling motivation and emotions o Robotics o Expert systems and intelligent interfaces o Intelligent software agents o Architectures for "complete" agents o (... and many more ...) AI uses many kinds of programming (e.g. logic programming, rule based programming) It also uses other techniques, e.g. use of neural nets, evolutionary computation, design of new hardware (e.g. retinas). -- -- AI as SCIENCE AI combines with disciplines that try to understand what a human mind is and how it works, for instance, psychology, linguistics, philosophy, biology, brain science. E.g. o Visual perception o Language understanding o Learning o Problem solving o Planning o Motivation o Emotions o Creativity o Evolution of intelligence o Social systems, collaborative agents o Modelling child development o etc. NOTES: Much of this work is still at a very early stage in its development. We have a great deal still to learn. There's a lot of overlap between the scientific and the engineering aspects of AI. Often the best model of how humans or other animals do something is also the most effective way of producing a useful automated substitute. -- -- AI as Engineering This has several aspects. o Attempting to design useful machines that do things that require (human-like) intelligence. Examples include the following: o robots in factories, o "intelligent" teaching systems o medical diagnosis systems o fault diagnosis systems o planning systems o speech and natural language systems o "intelligent front ends" to databases o visual inspection systems, o command and control systems, o theorem provers and mathematical aids o legal advice systems, o finding patterns in complex data o game playing programs o etc. o Attempting to design useful machines that interact with people and amplify their intelligence o Semi-intelligent advisors o Interactive "reminding" o etc. o Using improved understanding of how intelligent systems work (based on AI as science) to help us deal with problems when people go wrong, e.g: o Educational problems o Emotional problems. -- Many problems are ill-defined -------------------------------------- Why AI needs special programming tools -- one reason. Many non-AI programming problems are well defined before the programming starts: e.g. a mathematical analysis has been done and all that is needed is to express the mathematics in the programming language. Examples: Computing the highest common factor of a pair of numbers Sorting a list of words into alphabetical order In both cases the goal to be achieved is specifiable in advance with mathematical precision. Contrast: Create an interface that is easy to use. Write a program that understands English. Write a program that can interpret 2-D images of 3-D scenes. Design a robot that can learn to find its way about. Design an intelligent teaching program. These are "ill specified" tasks. It's not clear in advance exactly what the problem is. That is often true of AI tasks. Thus an environment that helps you EXPLORE a problem area, e.g. by easily developing and testing partial solutions, may speed up clarification of the nature of the problem, thereby leading more quickly to good results. Example: a partial solution can be implemented and then various people can play with it and try to "break" it, e.g. by suggesting new examples. When flaws are found they can be analysed and sometimes extensions made rapidly and then tested. -- Choosing a programming language ------------------------------------ How to choose a programming language is a complex matter. In particular it depends on the skills and knowledge of the programmer and on the nature of the task. Requirements for a good AI programming language: It needs the right expressive power (AI requires languages supporting a wide range of programming paradigms: procedural, functional, rule-based, object-oriented, extendable....) It needs a good development environment. It needs to produce efficient code (speed, space efficiency). It should be portable. It should be possible to "prove" that programs work. In general it is not possible to satisfy all these requirements simultaneously to a high degree. Which should be sacrificed depends on the nature of the task. Learning about AI is one task. Creating a safe automatic landing system for aeroplanes is a quite different task. Developing a program which is a prototype is one task. Developing a "production" program which is to be run many times is another task. -- Requirements for a programming environment ------------------------- A software dvelopment environment supports activities in which people produce requirements \ produce specifications | produce designs | implement designs | document everything test implementations | debug designs and implementations | maintain and develop systems / Some design methodologies assume a strict sequence starting from requirements analysis. In general a strict sequence is not possible: mistakes are made, and there is a lot of feedback to "earlier" stages. Sometimes you cannot tell what your requirements are until you have produced a "prototype" system and started trying it out. This is especially true of AI research and development. -- Requirements for an AI programming environment --------------------- Needs to support all these: Investigate problem (often it is very ill defined at first) Lots of experiments (trying different solutions, or different examples) Rapid prototyping (produce first-draft program very quickly for testing) Rapid testing (no need to restart your program to add new tests) Incremental design, implementation and testing (the editor, compiler, debugging tools, user programs, documentation browser, etc. are all part of the same system:) Great flexibility, and high expressive power To express appropriate kinds of information needed or produced To define appropriate kinds of behaviour But more specialised environments suit particular tasks, e.g. developing simple expert systems develping neural nets -- What you are interacting with -------------------------------------- When using a computing system you are typically interacting with many things. Some of them are obvious physical things, like the keyboard, the mouse and the screen (also the chair, the table, ....) The most interesting things you are interacting with are invisible "abstract" entities (also known as virtual machines). These abstract objects are all software objects: they involve programs running in the computer. -- -- Window Manager and Xserver The one you interact with first of all is the window manager: it causes the initial login panel or "machine-chooser" to be displayed, and provides you with feedback as you move the mouse. It cooperates with the "X server" program which handles all the detailed behaviour of the display. -- -- Xterminal server If you are using an Xterminal to connect to a remote computer (e.g. a remote sun) then you are typically also using an Xterminal "server" process on the remote machine. -- -- Login program When you type your username and password, a login program checks your password and decides whether you should be allowed to log in and if so it attaches your process to your login directory, and runs various startup scripts to allow you to use the computer. In particular it may run scripts which cause your preferred window manager to take control of the screen, providing you with menus, etc. -- -- Operating system All this time you will be interacting with one or more operating systems, e.g. one on the Xterminal and one on the remote computer you have logged into. The operating system manages all the different processes that run on the computer, including deciding how long they run for on every turn they get, how much memory they can use, etc. -- -- File system A major part of the operating system is the file system, which includes not only each user's files, but all the files required by the operating system, by our system administrators, etc. Sometimes the file system is on the same computer as your programs. In Birmingham we store the file system on a special computer called a "file server". So every time you read a file into VED, or read a mail message, or start a program, or write a file, you are interacting with the file system. To allow lots of different computers to interact with the same file system, or to share files with each other we use a system called NFS. -- -- xterm window Normally you will have one or more "xterm" windows running on your screen. These are not to be confused with Xterminals, which are physical devices. The xterm window provides a mechanism by which you can interact with the unix operating system and other programs on the computer, by typing commands into the window. The xterm software handles how text is displayed in the window, how it scrolls up, etc. -- -- Unix shell Usually xterm will run a shell program (by default that is "tcsh" at Birmingham, though in other places it chould be "sh" or "csh" or "ksh" or ...). A shell is a sort of "receptionist" process that enables you to interact with different parts of the Unix system, including the file system and many other programs which are available for you to invoke (editors, compilers, mail readers, internet browsers, calculators, calendar programs, ... -- -- Poplog process When you run Pop-11 or start up XVED or VED you are running the Poplog software system. This will typically have at least the followin components running as part of the system. -- -- -- The editor VED -- -- -- The Pop-11 incremental compiler This enables you to give Pop-11 commands or to define new Pop-11 procedures. The commands and procedure definitions are read by the compiler translated into machine code and then the machine code is either run or stored for future use, depending whether it is a command or a procedure definition. -- -- -- The Pop-11 memory manager Pop-11 handles memory by running an automatic garbage collector when necessary to reclaim wasted memory space. -- -- -- The Pop-11 program library system This allows lots of libraries (stored on magnetic disks on the file server) to be accessed when necessary, and compiled by the compiler. E.g. the command uses river causes the pop-11 library system to find the library file river.p, which is then read in by the pop-11 compiler and translated into machine code instructions. -- -- -- The Pop-11 error handler When things go wrong the error handler takes charge for a while, reporting the prohblem, and perhaps aborting your program. -- -- -- Particular tools in Pop-11 The pattern matcher, the database library, the objectclass system, the graphical libraries... -- -- -- Your own Pop-11 programs When you write programs, as you will when following instructions in teach files, those programs can be run, creating new "virtual machine" processes in the machine, with which you can interact. -- -- -- Other language systems Prolog, Common Lisp, SML Poplog includes other languages besides Pop-11. It can be started up with one or more languages included. By default you will normally start only Pop-11. But you could start a process which also includes one or more of the other languages in Poplog. -- Further Reading ---------------------------------------------------- About VED TEACH * usefulkeys TEACH * vedpop TEACH * vedproc TEACH * lmr TEACH * RHYME TEACH * EMAIL HELP * mark HELP * vedsearch HELP * vedkeys HELP * vednotes HELP * XTERMKEYS About Pop-11 TEACH * RIVER TEACH * vedproc TEACH * FACES Pop-11 primer, Preface, Chapter 1, Chapter 2. Continued in TEACH * PROGLECT2 --- $poplocal/local/teach/proglect1 --- Copyright University of Birmingham 1998. All rights reserved. ------