Language for AI
In the first class of AI, some may wonder why we need to write a program to learn cases instead of build a action table so the program will look up the table and choose the proper one. The reason is pretty obvious: it is too much for a programmer to consider all the cases and fit into the table. Indeed such implementation means fast response. However, when there is a special case which the programmer has omitted, problems will occur. The worst part is when he/she tries to add this special case, it may take more time than what one expect. Therefore, using lookup table is not practically in all senses.
Instead of look up table, we try to simulate how human brain works in AI programming. Since human thinking seems to involve a small amount of reasoning using a large amount of knowledge(Winston & Horn, "LISP", p.3). Whenever we face a problem, what our brain actually does is choose different pieces of information from memory, evaluate them and join them if necessary, and keep evaluating and joining until solution is found or run into dead end(no solution). In terms of computer AI, we need a way to manipulate these information in almost the same way that our brain does.
First we look at imperative language. In this type of language, working with information is not a straightforward task. We need to define a lot functions in order to present its own data to other functions(or other objects). Further, since the size of object is fixed in most case, it is not easy(sometimes impossible) to join them together as a new piece of information. And worst of all, we need to keep track of these memory allocations and deallocations frequently. Hence, imperative language is obviously not a good choice.
What we need is a language that treat the information as a single unit(symbol) which we can send it as itself or part of an expression to other function directly. In addition, it allows us to create a new information during runtime without worrying about the size of the new information. Functional language seems like a choice for us. First, it treat inforamtion as a symbol rather a structure. Therefore, we can easily send this information to function or gather them as an expression directly. Further, functional language emphasizes on evaluation of expressions. So we can thie expression(which combine with symbols) to another function directly for further operation. Last but not least, functional language supports garbage collection which the programmer no longer about memory management.
Since AI is starting from choose existense knowledges, evaluate them, combine them and make further evaluation. It is not doubt that functional language is the best choice. With functional language, programmer can more concentrate on AI developing.