newLISP Fan Club

Forum => Anything else we might add? => Topic started by: pjot on February 05, 2006, 02:13:57 PM

Title: newbie AI question
Post by: pjot on February 05, 2006, 02:13:57 PM
For a project starting soon I need some kind of AI. From the newLISP page this message is shown:


Quote
newLISP is a general purpose scripting language for developing web applications and programs in general and in the domain of artificial intelligence (AI) and statistics.


Of course I want to use newLISP :-)    I am a newbie in this field (though I do have some experience with Prolog). It is hard for me to see which way I must go with newLisp....



Has anybody tried to do AI with newLISP already? Are there any links or examples which I can study?



Peter
Title:
Post by: Lutz on February 08, 2006, 08:10:21 AM
What kind of AI? Artificial Intelligence is a large collection of techniques and algorithms, many of them shared with other fields like Statistics or Operations Research.



There are many examples of elementary AI algorithms in the Book: "Artificial Intelligence, A Modern Aproach" by Stuart Russel and Peter Norvig, and of course there is Peter Norvig's older book: "Artificial Intelligence Programming".



Lutz
Title:
Post by: pjot on February 08, 2006, 08:29:36 AM
Actually I like to do a kind of AI which you can compare with a game of chess. After a couple of games the program should improve it's ability of predicting the next move. How would I do such a thing with newLISP?



If I look to Prolog for example, it has the ability to generate solutions based on only a few set of rules. I do not think of plain brute-force calculation to be AI. Of course, also Prolog does calculations 'behind your back'. But the way it is coded is very tight, and a Prolog program can learn over a period of time by adding and removing facts and rules from it's internal database.



How do these things work in newLisp? Are there any examples?



Peter
Title:
Post by: cormullion on February 10, 2006, 12:36:14 AM
I imagine that the programming is much easier than designing the algorithms. For chess, the algorithms are already well described eg //http://www.gamedev.net/reference/programming/features/chess1/. newLISP would be a good language to write the chess algorithms in.



In a old book on Lisp I have by Deborah G Tatar, there's a section about a 'toy' expert system: weighted predicate rules, directed acyclic graphs, and so on.
Title:
Post by: pjot on February 10, 2006, 01:13:25 PM
Thanks. Still I don't see why newLisp would be a language in which AI could be implemented particularly well. I mean, the mentioned algorithms could also be implemented in some other language, for example, BASIC, probably with just as much code.



So in what way would it be an advantage to use newLisp? (Other than just the love for this very nice language, of course.) Why could I use newLisp better than BASIC to implement AI routines?



The only reason for me to choose newLisp is just because it's more beautiful. So I'll use it anyway. But where is the link with AI?



Peter
Title:
Post by: Lutz on February 10, 2006, 02:29:47 PM
In principle any programming language could be used for AI applications and pretty much every language has been used for it.



Many researchers like LISP because it feels less than a programming language and more like a flexible tool to describe and outline the models they are developing.



One reason for this is that LISP is more flexible in creating, maintaining and experimenting with new data structures without having to think much about data types.



Another reason is the fact that the same list paradigm is used for data as for functions and procedures. This makes it easier than in any other language to do functional abstraction, manipulating functions as data, passing them as parameters, creating programs on the fly and the like.



LISP is a nice tool to design new languages adapted to a specific problem. PROLOG was developed first in LISP. Somebody called LISP a programmable programming language. Allthough LISP is old it has easily adapted to any new invented programming paradigm, this is the reason that many CS departments use Scheme (a LISP dialect) for teaching CS.



But again any language can be used to solve AI problems, the more a problem is defined and worked out the easier it is to implement a solution in something like 'C ', Java or any of the modern scripting languages.



Lutz
Title:
Post by: pjot on February 12, 2006, 04:55:24 AM
OK thanks for your clarifications. I'll continue using newLISP anyway, though ;-)



Peter
Title: chess AI
Post by: Dmi on February 12, 2006, 12:46:18 PM
I've got a nice link about chess AI based on bayesian spam classifier.

This can be reproduced, as I can see... :-)

//http://dbacl.sourceforge.net/spam_chess-1.html



About BASIC:

There are two main sides of AI - classification algorithms, and production systems. The firsts, such as mapping algorithms for dimension downgrading, or even neural networks are mathematical constructs that can be easily implemented in procedural languages.

In other side, implementing production systems in procedural languages is much more complex - you may try it ;-)