0% found this document useful (0 votes)
9 views11 pages

Artificial Intelligence Lecture 4

LISP, developed at MIT, is a high-level programming language primarily for Artificial Intelligence research, notable for its list processing capabilities. It represents both data and programs as lists surrounded by parentheses, allowing for complex structures and evaluations. LISP has been used in various applications, including Yahoo Store and AutoCad.

Uploaded by

medianupe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views11 pages

Artificial Intelligence Lecture 4

LISP, developed at MIT, is a high-level programming language primarily for Artificial Intelligence research, notable for its list processing capabilities. It represents both data and programs as lists surrounded by parentheses, allowing for complex structures and evaluations. LISP has been used in various applications, including Yahoo Store and AutoCad.

Uploaded by

medianupe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Artificial Intelligence: LISP (Lecture 5)

By
Dr. Rufai Aliyu Yauri (Bsc, BIT, MSC,PhD.)
Introduction to LISP
• LISP stands for List Processing.

• It is a programming language developed at


Massachusetts Institute of Technology (MIT)

• Developed for Artificial Intelligence research.

• But great power for LISP makes its good for other
purposes as well.
Introduction to LISP
• Lisp is the second-oldest high-level
programming language in widespread use
today
• Only Fortran is older (by one year).
• Lisp was originally created as a practical
mathematical notation for computer
programs
Introduction to LISP
• The programming language handle lists by
putting them between parenthesis
• Example of list: list of words, list of numbers

• This parenthesis mark the boundaries of the


list.
• Example ‘(rose
violet
daisy
buttercup)
Introduction to LISP
• The list can also have numbers (+ 2 2)

• Plus-sign +, followed by ‘2’s each separated by


white space.

• In LISP both data and programs are represented


in the same way. i.e. they are both lists of words,
numbers or other list separated by whitespace
and surrounded by parenthesis.
Introduction to LISP
• Lists can have list inside

• Example: ’( this list has (a list inside of it)

• In LISP words are called Atoms.

• In LISP Atoms are separated from each other


using whitespace.
Lisp Interpreter
When a command is entered, the lisp interpreter does:
• First, it looks to see whether there is a quote before
the list; if there is, the interpreter just gives us the list.

• On the other hand, if there is no quote, the interpreter


looks at the first element in the list and sees whether
it has a function definition. If it does, the interpreter
carries out the instructions in the function definition.

• Otherwise, the interpreter prints an error message.


Lisp Evaluation
• When the Lisp interpreter works on an expression,
the term for the activity is called evaluation.
Example (+ 2 2) will return 4,

• Evaluating Inner Lists.


• the outer list may use the value returned by the
first evaluation as information when the outer list
is evaluated.
(+ 2 (+ 3 3)) will return 8.
Popular Application Developed using LISP!

• Yahoo Store
• Jak and Daxter (the game)
• The flight system in the Boeing 747 Next
(their latest 747 as of this writing)
• QPX airfare search and pricing system by ITA
Software
• AutoCad uses Lisp as its scripting language
and large parts of it are written in Lisp
Summary
• Programming language developed for AI application

• Lisp programs are made up of expressions, which are lists or


single atoms.

• Lists are made up of zero or more atoms or inner lists,


separated by whitespace and surrounded by parentheses.

• Successful language
– symbolic computation, experimental programming
Learn Basic Lisp on
• https://www.tutorialspoint.com/lisp/
lisp_overview.htm

You might also like