CS 462: Introduction to Artificial Intelligence

boorishadamantAI and Robotics

Oct 29, 2013 (3 years and 11 months ago)

94 views

CS 462: Introduction to Artificial
Intelligence


This course advocates the
physical
-
symbol system
hypothesis

formulated by Newell and Simon in 1976.
It states that intelligence is a functional property
and is completely independent of any physical
embodiment.


Alternative less
-
symbolic paradigms are
neural
networks

and
evolutionary computation

(of which
genetic algorithms are the most prominent example).

What is
Intelligence
?


Property attributed to people:

She is intelligent = She
knows

a lot.


= She
thinks

fast.


= She
talks

much.


= She
learns

quickly.





Intelligence = Knowledge + ability to perceive, feel, comprehend,


process, communicate, judge, learn.

What is
Artificial Intelligence
?


An
interdisciplinary

field aiming at developing techniques and tools for
solving problems that people at good at.


Existing definitions of the field advocate everything from replicating
human intelligence to simply solving knowledge
-
intensive tasks. Some
examples:

“Artificial Intelligence is a study of complex information processing problems
that often have their roots in some aspect of biological information
processing. The goal of the subject is to identify solvable and interesting
information processing problems, and solve them.”
--

David Marr.

“Artificial Intelligence is the design, study and construction of computer
programs that behave intelligently.”
--

Tom Dean.

“Artificial Intelligence is the enterprise of constructing a physical symbol system
that can reliably pass the Turing test.”
--

Matt Ginsberg.

Goals of Artificial Intelligence


Scientific goal
: understand the mechanisms behind human
intelligence.


Engineering goal
: develop concepts and tools for building intelligent
agents capable of solving real world problems.


Intelligent Simulation
: creating realistic simulated worlds for
affordable training and simulation.


Intelligent Information Resources
: supporting the use of national
/ world
-
wide information infrastructure.


Intelligent Project Coaches
: help in design and operation of
complex systems.


Robot Teams
: performing dangerous operations and tasks.

Examples of intelligent agents:


Knowledge
-
based systems
: capture knowledge that people have
which are relevant to a problem.


Common sense reasoning systems
: capture knowledge that people
commonly hold which is why this knowledge is not explicitly
communicated.


Learning systems
: posses the ability to expend their knowledge based
on the accumulated experience.


Natural language understanding systems
: support dialog in
English/French/Japanese/…


Game playing systems.


Intelligent robots.


Speech and vision recognition systems.


Introduction to LISP


Why LISP?


Especially designed for symbol manipulation.


Provides built
-
in support for lists.


Automatic storage management (no need to keep track of memory
allocation).


Interactive environment, which allows programs to be developed step
by step. That is, if a change is to be introduced, only changed
functions need to be recompiled.


Recommended books:

1. These lecture notes are based on Winston and Horn LISP, 3
rd

edition,

AddisonWesley, 1993

2. For advanced topics and additional examples refer to Norvig P.

Artificial Intelligence Programming, Morgan Kaufman, 1992.

Basic terminology


Atoms
: word
-
like indivisible objects which can be
numbers

or
symbols
.


Lists:

sentence
-
like objects formed from atoms or other lists, and
enclosed in parentheses.


S
-
expressions:

compositions of atoms and lists.


Procedures:

step by step specifications how to do something.


Primitives
: procedures supplied by the LISP itself


Example: (+ 5 6)


User
-
defined procedures
: procedures introduced by the
programmer.

Example: (students 'anna)


Program:

a collection of procedures working together.

S
-
expressions


An s
-
expression can have other s
-
expressions nested in it. Examples:


(+ (* 5 7) ( / 2 4))


(This (is a dog) (or a cat))


Expressions can be interpreted both, procedurally and declaratively
.


If interpreted procedurally, an expression provides a direction for
doing something. Such an expression is called a
form
, and its first
element is the name of a procedure to be used to produce the value.


The process of computing the value of an expression is called
evaluation
.


If interpreted declaratively, expressions represent data.



Data and procedures have the same syntax
.

Evaluation of atoms


The value of a number is the number itself.

Example: 5 ==> 5


The value of a string is the string itself.

Example: “Nice day” ==> “Nice day”


The value of the symbol T is T (true).


The value of the symbol NIL is NIL (false).


The symbol NIL and the empty list ( ) are the same thing.


Variables are names of memory locations. The contents stored in a
given memory cell is the value of the variable serving as a name of this
location.

Example: Let x be a variable, and 5 be the contents of the memory cell called
x. Then, the value of x is 5.


Numbers


Integers: 179, 45


Ratio: 5/7, 7/9


Floating point: 5.2, 7.9


Examples:

* (/ 25 5)

5

* (/ 46 9)

46/9 ; do not divide evenly

* (float (/ 46 9))

5.111111

* (round (/ 46 9))

5 ; the nearest integer

1/9 ; the remainder

More numeric primitives

* (
-

6)

-
6

* (
-

-
6)

6

* (max 5 7 2)

7

* (min 5 7 2)

2

* (sqrt (* (+ 1 3) (* 2 2)))

4.0

* (+ (round (/ 22 7)) (round (/ 7 3)))

5




* (+ 2 2.5)

4.5

* (expt 3 6)

729

* (sqrt 81)

9.0

* (sqrt 82)

9.055386

* (abs 6)

6

* (abs
-
6)

6

Representation of atoms and lists in a computer
memory


Consider the list (A (B (C))). It can be represented by
means of the following diagram:


A

B

C

These boxes are

called
cons cells
.

Each
cons cell
consists of 9 bytes:


1 leading byte, called the
data type byte
. It holds
information indicating that the particular group of 9 bytes
is part of a list (i.e. a cons cell).


2 groups of 4 bytes each, representing pointers. Each
pointer is an address
--

the first one to the memory location
containing the first element of the list, and the second one
to the memory location storing the rest of the list.


The second pointer of the last element of each list contains
zeros (representing NIL and empty list). i.e. no cons cell
corresponds to the empty list.

The CONS primitive builds new lists

Example: Given the list
(Education is power),

build a new list from it
and the atom
University.


*

(cons 'University '(Education is power))


(UNIVERSITY EDUCATION IS POWER)




To implement this, LISP maintains a list of free boxes (cons cells), called

the
free
-
storage list
. CONS removes the first box from the free
-
storage

list, and deposits new pointers into it.

...

Education is power

Free storage list

University

Dotted pairs

Consider the list
(A B . C). Here (B . C)
is called a

dotted

pair,
and is represented as follows:






To construct the list (A B C), we write:


*
(cons 'A (cons 'B (cons 'C NIL)))



To construct the list (A B . C), we write:


*
(cons 'A (cons 'B 'C))

B

C