Grupos de Google ya no admite nuevas publicaciones ni suscripciones de Usenet. El contenido anterior sigue siendo visible.

What AI Language

Visto 3 veces
Saltar al primer mensaje no leído

pa...@blackpool.ac.uk

no leída,
20 may 1998, 3:00:0020/5/98
a

We are currently designing an AI course. The original idea was to use prolog.
However, currently people and colleges have been expressing a change from
the established AI languages: prolog, lisp to java.

Is java suited to AI? What is the main language used in the AI industry? Will
Java eclipse it? Or should we stick to the known AI languages?

Phill N. Armstrong


ph...@noki.demon.co.uk

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading

Mark Watson

no leída,
20 may 1998, 3:00:0020/5/98
a

Hello Phill,

re: what language for teaching AI:

There are several good possibilities in my opinion:

1. Java
Pros: automatic memory management, modern OO language,
students can use Java skills for non AI tasks
Cons: there is a wealth of example systems built in Prolog and LISP

2. Scheme
Pros: probably the best LISP dialect for students. Many good example
systems. Fun language to use. Easy to learn.
Cons: most of your students will not get jobs programming in Scheme

3. Prolog
Pros: very short example programs can demonstrate search techniques,
parsing, etc. Really a fun language toplay with.
Cons: most of your students will not get jobs programming in Prolog,
and I believe that some students might have some trouble with
Prolog's declarative style.

If I were teaching a really introductory class, I might be tempted to
give the students some initial exposure to all three of the languages
listed above (perhaps 3 lectures each, and make sure that programming
environments are all set up for the three languages). Then let the students
choose one language for a small project.

-- Mark


-- Mark Watson www.markwatson.com
-- Please visit my site for Java source code and programs,
-- and for information on the 10 books that I have written
-- dealing with artificial intelligence, Java, and C++.

David G. Mitchell

no leída,
20 may 1998, 3:00:0020/5/98
a

In article <6jukoe$9c2$1...@nnrp1.dejanews.com>, <pa...@blackpool.ac.uk> wrote:
>
>Is java suited to AI? What is the main language used in the AI industry? Will
> Java eclipse it? Or should we stick to the known AI languages?

You need to get students writing and understanding programs
to perform simple versions of certain sorts of tasks quickly.

In Prolog, you can write a simple strips-like planner in about
a page, and a simple Sit-calc based one (which allows incomplete
initial information) in not much more. You can write a
surprisingly nice first-order theorem prover in about a page
(for example, the LeanTAP prover). You can implement several
sorts of natural-language processing tasks, other varieties
or reasoning techniques such as CBR, etc also in a page or two.

These tasks require much larger amounts of code in almost any
other language. If your students are experienced with Java
already, and you provide some libraries, that's one thing, but
if they have to learn Java for the course, and have to write
these tasks from scratch in it, they'll spend more time hacking
than understanding the ideas and techniques.

We used Prolog to teach first year undergrads about planning,
constraint satisfaction, natural-language understanding, and
learning, with surprising success. For a senior level course,
the topics are much the same, although more sophisticated
versions of the problems and solutions are in order.


Mark Watson wrote:
>
>If I were teaching a really introductory class, I might be tempted to
>give the students some initial exposure to all three of the languages
>listed above (perhaps 3 lectures each, and make sure that programming
>environments are all set up for the three languages). Then let the students

Unless you have lots of time, I doubt this is practical. We teach
these three languages in 13 weeks, and my experience suggests that you
can't get students comfortable with these styles any faster than that.

Dave Mitchell

Rainer Joswig

no leída,
21 may 1998, 3:00:0021/5/98
a

pa...@blackpool.ac.uk writes:

> We are currently designing an AI course. The original idea was to use prolog.
> However, currently people and colleges have been expressing a change from
> the established AI languages: prolog, lisp to java.

Depends on what you want to teach students. Maybe it is easier to
tell them something about First Order Logic while using Prolog or Lisp.
Maybe not. Decide what topics you want to handle, how much time you have
and then see what is appropriate.

Depends also on what you want to do with the Students later. If you
have interesting projects with Java and AI, students
might benefit from an early introduction to Java later on.

See the Russell/Norvig book on AI. They have some
example code on the web. A Java version should be
there, too.

Actually, if it is not a strict AI programming course, then
you already have plenty of complicated topics. Little gadget
programming is pretty much useless in AI.


Patrick Wray

no leída,
21 may 1998, 3:00:0021/5/98
a

Until I read the first three responses to this question, I had thought LISP
was THE language to use for AI. Is this no longer the case? If not, why not?

Donald Fisk

no leída,
21 may 1998, 3:00:0021/5/98
a

pa...@blackpool.ac.uk wrote:
> We are currently designing an AI course. The original idea was to use prolog.
> However, currently people and colleges have been expressing a change from
> the established AI languages: prolog, lisp to java.
>
> Is java suited to AI? What is the main language used in the AI industry? Will
> Java eclipse it? Or should we stick to the known AI languages?

I'm somewhat worried that AI course developers themselves don't already
know the
answer to this question.

Prolog and Lisp are both suitable for GOFAI ("good old-fashioned AI"),
Java
much less so. In turn, Java is more suitable than languages like C, as
it
does at least support garbage collection, Vectors (which can in some
circumstances
be used instead of lists), exception handling, fairly rudimentary
support for
object orientation (e.g. in comparison to CLOS), and a stream tokenizer
which
is a reasonable surrogate for the Lisp input primitive (ratom).

Compare this with what Lisp gives you that Java does not: symbols,
linked lists,
property lists,numerous list processing functions, full object
orientation,
a range of numeric types including rationals, complex numbers and
bignums, functional
arguments, functional values, prettyprinting. Prolog gives you
different things
like pattern matching, backtracking, list processing, and some support
for higher
(> 1) order predicate calculus (univ and call). Both Lisp and Prolog
give you
a means of extending their syntax (macros and read macros in Lisp, and
operators
in Prolog).

However, the main advantage of using languages such as Lisp and Prolog
is that
programs and data have the same syntactic form, which means that you
don't have
to go to the trouble of writing a parser for reading data files or
processing
embedded languages.

None of this should come as any surprise, considering that Lisp was
developed
specifically with the needs of the AI community in mind, and Java was
developed
as a language for writing embedded code for electrical appliances.

There are other areas of AI for which Prolog is unsuited, and for which
Lisp is not very well suited: things such as neural networks and
subsumption
architectures which rely heavily on array processing and such like.
Here,
you might as well use the dialect of C named after a coffee.

In case anyone points out that there are more jobs going in Java than
in Lisp and Prolog put together, I have to say that there are precious
few
jobs going in AI, and so I'd hope that the other modules being taught
teach
more marketable languages, including Java, which appears to be (if
you'll
excuse the pun) flavor of the month at the moment. Also, there are
more
noble purposes to higher education than serving the short-term needs of
industry.

> Phill N. Armstrong

--
Le Hibou (mo bheachd fhe/in: my own opinion)
"it's just that in C++ and the like, you don't trust _anybody_,
and in CLOS you basically trust everybody. the practical result
is that thieves and bums use C++ and nice people use CLOS."
-- Erik Naggum

Donald Fisk

no leída,
21 may 1998, 3:00:0021/5/98
a

Patrick Wray wrote:
>
> Until I read the first three responses to this question, I had thought LISP
> was THE language to use for AI. Is this no longer the case? If not, why not?

It still is the case, though some people prefer Prolog (arguments
about the relative merits of Lisp vs. Prolog are about as productive
as religious arguments), while others attempt to nail jelly to
the ceiling by using languages such as C++. (Exception:
neural networks and similar things.)

Gary H. Merrill

no leída,
22 may 1998, 3:00:0022/5/98
a


David G. Mitchell wrote:

> You need to get students writing and understanding programs
> to perform simple versions of certain sorts of tasks quickly.

> ...


> These tasks require much larger amounts of code in almost any
> other language. If your students are experienced with Java
> already, and you provide some libraries, that's one thing, but
> if they have to learn Java for the course, and have to write
> these tasks from scratch in it, they'll spend more time hacking
> than understanding the ideas and techniques.

These are the critical points. A course in AI should not be a course in
programming languages, nor should it be a course on a particular programming
language. It should be a course in AI: methodology, techniques, representation,
etc. So considerations such as using a language that students can later use in
the job market do not apply -- that should be taken care of in other courses
(though perhaps in a "Languages for AI" course).

For advanced courses one might choose for whatever reason to present the course in
one particular language but allow the students "implementor's choice" when it
comes to homework and projects. For an introductory course, one should choose a
language that is either likely to be shared by the class already or is easy to
learn to the degree that they can very quickly be using it in the course without
getting bogged down in the details of the language itself.

To some degree you should be able to use the content of the course to guide you in
the choice of language -- along with your own willingness and ability to provide
the class with an environment to make work for the course in that language as
straightforward as possible (creating additional support functions, data
structures, libraries, etc.).

Do not, please, choose a language in which you (and your assistants, if any) are
less than superbly competent. There is nothing much more frustrating and
irritating to a student than an instructor who is unable to do the coursework and
explain every facet of the solution.

--

Gary H. Merrill / Principal Consultant, International Advanced Technology
[Views and opinions expressed here are my own and not necessarily
those of GlaxoWellcome Inc.]

0 mensajes nuevos