Thursday, July 27, 2006

Getting Lispy

More Lisp
We have the basic arithmetic available in Lisp.
cos, expt, log etc we have.
We always need random numbers in AI, so
(random limit [random-state])

You of course need logic

/= is not equals

(and ...) (or ...)

cond is for conditionals.
(cond (test_1 exp_11 ... exp_1k)
(test_2 exp_21 ... exp_2k)
...
)
There is no 'else' statement. Just use t for true as a final test.

There really is way too much in common lisp...

Function values
Non-destructive

Scope
Recursion
Procedural languages will allow recursion, so who cares?
Procedural languages have it as an add-on, whereas functional languages have it as a fundamental.

(mapcar #'* a b)
A convenience function to apply the multiplication to each item in the list.

Procedural Programming is the Von Nuemann architecture. Fetch, execute, store.
Side effect programming
Not compositional, but repetitive.
Requires lots of housekeeping (i, count, etc)

Functional programming is the opposite of all this.
But then when you actually get into it, "Pure lisp is often buried in large extensions buried in Von Nuemann style stuff". Or something like that, in 1978.

The first example of recursion still relied on side effects.

The Philosophy of AI

The philosophy of AI
What would an AI be?
How could we know if we had it?
Is it possible?
Is AI research ethical?

The strong AI thesis.
The set of all possible Turing machines can be enumerated, simpler to more complex.
The theory is that if AI is possible, then there is at least one AI in this set.
As you enumerate something that's infinitely long, then you have an infinite number of AI's.

"Computing Machinery and Intelligence" (Turing, 1950),
Lady Lovelace's objection: "The Analytical Engine has no pretensions to originate anything". it can do only what we tell it to do.
We're smart, it's stupid.

Can machines think? Yes.
The Mathematical Objection: Godel, Turing etc have shown that no purely formal system can prove (know) every mathematical truth.

The assumption is that we are not formal systems ourselves. But if we are formal systems, or isomorphic to formal systems, then AI can hold true. There is no proof that we are not formal systems.

To avoid endless arguments, Turing proposed the Turing test for intelligence. The Imitation Game.
So instead of trying to understand what is DEEP intelligence, he just went by what appears to be intelligence.

Unfortunately, the Turing test is neither necessary nor sufficient as a test for intelligence.
It's a worthy goal, however.
What if the internet passed the turing test one day?
Monkey's MAY type Shakespeare's complete works, but there's more to AI than random search.

The Total Turing test is where you drop the screen.
It tests the ability of the robot to interact with the world (embodiment).

Even More Total Turing Test
Require isomorphic internal information processing.
Totally Complete Turing Test: Require isomoprhic internal processing of all types, down to subatomic level.

Which tests are sufficient for intelligence?
Surely we'll have something impressive if we can create something to fool people fairly regularly?

Can Machines Think? No Way.
Human intellect is an inarticulable skill; computer "intellect" involves rule-following.

But AI would be processing at a higher level than the implementation level. See the rest of Kevin's rebuttals.

Let's say we can have a program that can understand Chinese.

John Searle's Chinese Room Argument is that you can have a program that will run and have a conversation in Chinese, but it isn't REALLY understanding. There's no understanding going on.

What it comes down to is what do we mean by intelligence?
Teletype intelligence isn't enough. The meanings of words isn't enough for intelligence.

What would the Searle room answer if you asked it "Do you like my new Red shirt?"

intelligence without consciousness is a possibility. It might be a possibility that we can create an artificial consciousness in a box.

So we have the turing test, and Searle's rebuttal that this is not sufficient.

The next philosophical question is, what would it mean to produce an ethical AI?
The fundamental goal of AI is to build a utilitarian (good) AI.

There's perhaps a limit to the number of brains that can be enumerated, with physical limitations etc. However the number of turing machines are infinite.

Then we develop them, and they get smarter and smarter themeselves, and we have the SUPERINTELLIGENCE singularity.

Can we control these?
Asimoc's Laws of Robotics.

The biggest dangers to premature extinsion of civilisation today.
risk = probability x disvalue

1. Asteroid impact
2. Environmental collapse
3. CBN warfare
4. Nanotechnology (could be good, could be really nasty)
5. Adversarial SuperIntelligence
6. Terrorism.

Wednesday, July 19, 2006

Lisp - The Language

Lisp
The functionality and structure of Lisp lends itself to AI. It's used for research and application of AI.

Other languages are more geared towards practical problem solving in industry, Lisp towards... impractical ones.

It's functional/recursive
Dynamic typing (not strong typing)
Flexibility; ease of prototyping (vs. Maintenance).

Taught at Monash because
Historical
Exposure to functional model
Exposure to prototyping

If you're worried about type, you have to do your own checking (it's called debugging!).

It's actually the third oldest language still in use today. (FORTRAN 57, COBOL 58, Lisp 1958)

There are many different versions of Lisp
Common Lisp is the common language.

GNU CLISP is what we're using in this subject.

Lisp is normally interpreted, but then compiled later.
Script for Debug, compile for testing.

At the topmost level:
loop {
read
eval
print
}

Lisp objects
s-expression
Atoms. Atoms may be either
-numbers 3, 75.23322e-38
-or symbols x, nil

Intelligence is all about symbol manipulation. (McArthy) This is a lie!(?) but we'll go on with it for a while. More on that later. Anyway

Lists are a sequence of objects inside a pair of parentheses.
(8 7 99)
((8) 7 99)

Assigning values to symbols.
x = 5
x <- 5

Lisp uses a special function called setq.
[7]> (setq x 5)

The [7]> is a prompt that tells you how many s-exp have been executed so far.

There is also setf for simple assignment.

car and cdr are non-destructive

The empty list is (), nil - the atom.

Taking Lists apart.
car operated on lists, not atoms.

caadr

(car (car (cdr 'x y z)))

yz
y - y must be a list, otherwise it's going to fail.

(cons expression list): constructs a node.

Internally, lists are represented as binary trees.

What if you layered neural networks upon neural networks?
Do we really need to know HOW something is working and learning? Build neural bacteria from genetic algorithms. That's how life began on earth, with the basics, with simple organisms which weren't intelligent, but their bodies and genetics were! You can't just try to jump to the end of evolution when trying to recreate it.

User defined functions
(defun dname (arg1 arg2 ... argn)
s-expr1
s-expr2
...
s-expr3)

In principle, Lisp doesn't believe in side effects. The core of lisp is that you invoke a function that call other functions, and then you get your answers popping back until you get a final answer to present.

/usr/bin/clisp on ra-clay. Play around with it.
Edit filename.lisp
(load "filename")
Run/test your functions
Loop back to step 1.

That should be enough to get started on Lisp.

Tuesday, July 18, 2006

Introduction to AI

People aren't really very smart anyway.

Books:
Artificial Intelligence: A Modern Approach.

Tutorials in lisp run weeks 3 - 9.
Functional Programming.

As a field, it is an investigation of intelligence.
Applying computers to model/implement such intelligence.
Founded by Alan Turing in the 1950's, "Computing Machinery and Intelligence".
The early founders were optimistic about when it would come about though.

Going to the moon was in itself not really very productive, but the spin offs of communication, miniturisation, that came from it were very practical.

That's why society has genuine interest in AI research. Machine translation is one of them, data mining comes out of machine learning. All pretty useful. AI for game programming.

But what on earth is intelligence!?
Humans are our current best example of intelligence in the universe. But we don't get things right ALL the time.

Intelligent agents have to be able to learn

Cognitive Science is an interrelated field.
Creativity.... is this artificially possible?

What is intelligence? We don't really know, it's as equaloly contentious as it was in Aristotle's time.

My question is, if we don't even know what intelligence is, how can we even hope to create an artificial intelligence? Are we hoping to stumble upon it somewhere along the way?