Presentation is loading. Please wait.

Presentation is loading. Please wait.

For Friday No reading (other than handout) Homework: –Chapter 2, exercises 5 and 6 –Lisp handout 1.

Similar presentations


Presentation on theme: "For Friday No reading (other than handout) Homework: –Chapter 2, exercises 5 and 6 –Lisp handout 1."— Presentation transcript:

1 For Friday No reading (other than handout) Homework: –Chapter 2, exercises 5 and 6 –Lisp handout 1

2 What Do You Know? Examples of artificial intelligence in your life?

3 Views of AI Weak vs. strong Scruffy vs. neat Engineering vs. cognitive

4 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

5 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

6 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.

7 Issues in Determining Rationality Omniscience Autonomy

8 Task Environment Specification Performance measure Environment Actuators Sensors

9 Environment Issues Observability Deterministic or stochastic Episodic or not Static or dynamic Discrete or continuous Single or multi-agent

10 Types of Agents Simple Reflex Model-based Reflex Goal-based Utility-based Learning

11 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

12 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

13 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

14 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)

15 Evaluating Atoms > 9 9 > 32.0 32.0 > 43.2e02 4320.0 > 1000000000000 1000000000000 > abc *** - EVAL: variable ABC has no value > 'abc ABC > 'fred FRED > 'H2O H2O

16 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

17 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

18 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.

19 Function Calls in Lisp (functionname parameter1 parameter2...) (+ 3 5) All functions return values


Download ppt "For Friday No reading (other than handout) Homework: –Chapter 2, exercises 5 and 6 –Lisp handout 1."

Similar presentations


Ads by Google