Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
For Friday • No reading (other than handout) • Homework: – Chapter 2, exercises 5 and 6 – Lisp handout 1 What Do You Know? • Examples of artificial intelligence in your life? Views of AI • Weak vs. strong • Scruffy vs. neat • Engineering vs. cognitive What Is an Agent? • In this course (and your textbook): – An agent can be viewed as perceiving its environment • Note that perception and environment may be very limited – An agent can be viewed as acting upon it environment (presumably in response to its perceptions) • Agent is a popular term with nebulous meaning--so don’t expect it to mean the same thing all of the time in the literature Rational Agents • Organizing principle of textbook • A rational agent is one that chooses the best action based on its perceptions • This does not have to be the best action that could have been taken--perception may be limited Determining Rationality • Must have a performance measure. • Rationality depends on – – – – The performance measure. Agent’s prior knowledge. Agent’s possible actions. Agent’s percept sequence to date. Issues in Determining Rationality • Omniscience • Autonomy Task Environment Specification • • • • Performance measure Environment Actuators Sensors Environment Issues • • • • • • Observability Deterministic or stochastic Episodic or not Static or dynamic Discrete or continuous Single or multi-agent Types of Agents • • • • Simple Reflex Model-based Reflex Goal-based Utility-based • Learning LISP • LISt Processing • Functional Language – Pure LISP doesn’t use things like assignment statements or other imperative statements (though LISP does have extensions that allow you to use such techniques) • Typically run in an interactive environment Running LISP • • • • • Log in to one of the Suns At the prompt, type clisp You’re now in a LISP environment To get out: type (QUIT) clisp is available for DOS and linux The Lisp Interpreter • When you start Lisp, you’re in an interpreter • Anytime you type something in, Lisp assumes that you want it to evaluate what you just typed • What Lisp does depends on what you typed Atoms • The simplest thing in Lisp is an atom • Numbers are atoms • Anything that would be a standard identifier in C++, etc., is also an atom. • But alphanumeric atoms must be quoted when we refer to them (otherwise Lisp assume that they are variable names and tries to evaluate them by finding their contents--which may not exist) Evaluating Atoms >9 9 > abc *** - EVAL: variable ABC has no value > 32.0 32.0 > 'abc ABC > 43.2e02 4320.0 > 'fred FRED > 1000000000000 1000000000000 > 'H2O H2O Lists • Lists are the crucial data structure in LISP • They look like a list of atoms (or lists) enclosed in parentheses: (a b c 24 (a b)) • The list above has 5 members, one of them a list with two members • Like alphanumeric atoms, lists must be quoted when you type them in to the interpreter to keep Lisp from evaluating them nil • nil or () is the empty list • It is the only item in Lisp which is both an atom and a list (at the same time) • It is also Lisp’s value for FALSE (just like 0 is the value for FALSE in C and C++ • Note that Lisp also has a value for true: it is t More Examples > '(a b c) (A B C) > () NIL • Note that Lisp is not case sensitive. clisp echoes everything in uppercase. Some Lisps use lower case. Function Calls in Lisp • (functionname parameter1 parameter2 ...) • (+ 3 5) • All functions return values