37
ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science Department

ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Embed Size (px)

Citation preview

Page 1: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

ISC 4322/6300 – GAM 4322Artificial Intelligence

Lecture 1The Foundations of AIand Intelligent Agents

University Of Houston- VictoriaComputer Science Department

Page 2: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Contacts

Instructor: Dr. Alireza Tavakkoli

Office: UC 101C

Mon. 5:00 – 6:00 pmOffice hours: Wed. 3:00 – 4:00 pm

or by appointment

Email: [email protected]: http://www2.uhv.edu/tavakkolia/teaching/ISC4322-6300/index.html

Or Blackboard

Page 3: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

• Introduce state-of-the-art algorithms in artificial intelligence

• Show how these algorithms apply to real-world problems

• Provide practice in applying algorithms by solving “real” problems (Games)

After this course, you should be able:

• Evaluate claims about intelligent systems in an informed way

• Have a great algorithmic toolbox to help you design adaptive systems

• Build intelligent agents for interesting agents

• Contribute to AI research

Class Goals

Page 4: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

• Part I: Decision-Making in Deterministic Environments– Single agent: Dynamic programming, informed search techniques, randomized

search, genetic algorithms, constraint satisfaction, planning– Multi-agent: Game theory, mini-max search and approximations

• Part II: Decision-Making in Stochastic Environments– Single agent: Bayesian Networks, Hidden Markov Models, Kalman and Particle

Filters, decision and utility theory, Markov Decision Processes– Multi-agent: Expectimax search, stochastic game theory

• Part III: Learning in Unknown Environments– Supervised learning: Decision Trees, Support Vector Machines, Neural Networks– Unsupervised learning: reinforcement learning

Structure of Course

Page 5: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

• Exams– One mid-term, one Final

• Assignments– 3-4 Homeworks, 2-3 Programming Assignment– Projects can be complete by pairs of students.– Late assignments: (2n)2% Penalty

• Grading Policy– Homework 15% <87 A– Projects 25% 75-87 B– Midterm 25% 62-74 C– Final 30% 50-61 D– Participation 5% 50< F

What is Expected

Page 6: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

What is AI?

Thinking

vs.

Acting

Humanly vs. Rationally

“The automation of activities that weassociate with human thinking,

activities such as decision-making, problem solving, learning”

(Bellman,1978)

“The study of mental faculties through the use of computational models.”

(Winston, 1992)

“The art of creating machines that perform functions that require

intelligence when performed by people.”(Kurzweil, 1990)

“AI is concerned with rational action…and studies the design of rational agents.

A rational agent acts so as to achievethe best expected outcome.”

(S.R. & P.N., 1995)

Page 7: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

What is AI?

Thinking

vs.

Acting

Humanly vs. Rationally

“The automation of activities that weassociate with human thinking,

activities such as decision-making, problem solving, learning”

(Bellman,1978)

“The study of mental faculties through the use of computational models.”

(Winston, 1992)

“The art of creating machines that perform functions that require

intelligence when performed by people.”(Kurzweil, 1990)

1“AI is concerned with rational action…

and studies the design of rational agents. A rational agent acts so as to achieve

the best expected outcome.”(S.R. & P.N., 1995)

Page 8: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Acting Humanly

Alan Turing(1912-1954)

Turing Test (1950)

Capabilities that the computer would needto possess:

• Natural language processing• Knowledge representation• Automated reasoning• Machine learning

The total Turing test requires also computer vision and robotics

The quest for “artificial flight” succeeded when the Wright brothersand others stopped imitating birds and learned about aerodynamics.

Page 9: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

What is AI?

Thinking

vs.

Acting

Humanly vs. Rationally

“The automation of activities that weassociate with human thinking,

activities such as decision-making, problem solving, learning”

(Bellman,1978)

“The study of mental faculties through the use of computational models.”

(Winston, 1992)

“The art of creating machines that perform functions that require

intelligence when performed by people.”(Kurzweil, 1990)

2

“AI is concerned with rational action…and studies the design of rational agents.

A rational agent acts so as to achievethe best expected outcome.”

(S.R. & P.N., 1995)

Page 10: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Thinking Humanly

Allen Newel(1927-1992)

Herbert Simon(1916-2001)

Simon and Newel came up with the General Problem Solver – GPS (1961).

GPS can solve (in principle) every problem that can be formalized

symbolically, e.g. Towers of Hanoi

Main concern by Simon and Newel: Is the trace of GPS’ reasoning the same as the trace of a human?

“Over Christmas, Allen Newell andI created a thinking machine.”

Herbert Simon, 1961

First system to separate knowledge of problems from its strategy on how to solve them

But this if the focus of…. Cognitive science:Requires experimental investigation of actual humans or animals

Page 11: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

What is AI?

Thinking

vs.

Acting

Humanly vs. Rationally

“The automation of activities that weassociate with human thinking,

activities such as decision-making, problem solving, learning”

(Bellman,1978)

“The study of mental faculties through the use of computational models.”

(Winston, 1992)

“The art of creating machines that perform functions that require

intelligence when performed by people.”(Kurzweil, 1990)

3

“AI is concerned with rational action…and studies the design of rational agents.

A rational agent acts so as to achievethe best expected outcome.”

(S.R. & P.N., 1995)

Page 12: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Thinking Rationally

Aristotle(384-322 BC)

“Socrates is a man; all men are mortal;therefore, Socrates is mortal.”

Logic-based AILogic provides:•A syntax for describing the world and relations among objects•A way to achieve logical/correct inferences

Create intelligent systems that reason using the syntax and the laws of logic

By 1965 there were programs that could in principle, solve any solvable problem described in logical notation.

But…1.How to represent knowledge in logical notation when we are less than 100% certain?2.Computational explosion: A few hundred of facts exhaust the computational resources of any computer when it attempts logical inference without some sort of guidance

Page 13: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

What is AI?

Thinking

vs.

Acting

Humanly vs. Rationally

“The automation of activities that weassociate with human thinking,

activities such as decision-making, problem solving, learning”

(Bellman,1978)

“The study of mental faculties through the use of computational models.”

(Winston, 1992)

“The art of creating machines that perform functions that require

intelligence when performed by people.”(Kurzweil, 1990)

4

“AI is concerned with rational action…and studies the design of rational agents.

A rational agent acts so as to achievethe best expected outcome.”(Russell and Norvig, 1995)

Page 14: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Logical inference is part of intelligence. It does not cover everything:•e.g., might be no provably correct thing to do, but still something must be done•e.g., reflex actions can be more successful than slower, carefully deliberated ones

What is a rational action?One that achieves the best outcome

(or in the case of uncertainty… the best expected outcome)

Acting Rationally

Stuart Russell

PeterNorvig

It is this objective that requires:• Natural language processing• Knowledge representation• Automated reasoning• Machine Learning• Computer Vision• Robotics

“Human behavior is well adapted forone specific environment and is the product, in part, of a complicated andlargely unknown evolutionary processthat is still far from producing perfection.”

Page 15: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

The Foundations of AI

• Philosophy Logic, methods of reasoning, mind as physical system foundations of learning, language,

rationality• Mathematics Formal representation and proof algorithms,

computation, (un)decidability, (in)tractability,probability

• Economics utility, decision theory • Neuroscience physical substrate for mental activity• Psychology phenomena of perception and motor control,

experimental techniques• Computer building fast computers

engineering• Control theory design systems that maximize an objective

function over time • Linguistics knowledge representation, grammar

Page 16: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

AI History – Modern Era

• 1943 McCulloch & Pitts: Boolean circuit model of brain• 1950 Turing's "Computing Machinery and Intelligence"• 1956 Dartmouth meeting: "Artificial Intelligence" adopted• 1952—69 Look, Ma, no hands! • 1950s Early AI programs, including Samuel's checkers

program, Newell & Simon's Logic Theorist, Gelernter's Geometry Engine

• 1965 Robinson's complete algorithm for logical reasoning• 1966—73 AI discovers computational complexity

Neural network research almost disappears• 1969—79 Early development of knowledge-based systems• 1980-- AI becomes an industry • 1986-- Neural networks return to popularity• 1987-- AI becomes a science • 1995-- The emergence of intelligent agents

Page 17: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

• SKICAT: automatically classifies data from space telescopes and indentifies interesting objects in the sky. 94% accuracy, way better than human (decision trees)

• Deep Blue: the first computer program to defeat human champion Garry Kasparov (minimax search + alpha-beta-pruning + optimizations)

• Pegasus, Jupiter, etc.: speech recognition systems (Hidden Markov Models)

• HipNav: a robot hip-replacement surgeon (planning algorithms)

• DARPA Grand/Urban Challenge: autonomous driving 98% of the time from Pittsburgh to San Diego (filtering and planning algorithms)

• Deep Space 1: NASA spacecraft that did an autonomous flyby an asteroid (logic-based AI)

• Credit card fraud detection and loan approval (decision trees and neural networks)

• Chinook: the world checker’s champion (game theory)

• Spam Assassin and other spam detectors (naïve Bayes learning)

• Soccer playing Aibo robots (reinforcement learning)

Where are we now?

Page 18: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Where are we now?

Page 19: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science
Page 20: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Intelligent Agents

Agent

Environment

?

Sensors

Actuators

Percepts

Actions

How to fully describe an AI problem:

• Performance measure• Environment• Actuators• Sensors

Intelligent (rational) agent

For each possible percept sequence, a rational agent should select an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and

whatever built-in knowledge of the environment the agent has

Definition encompasses both physical and virtual/software agents

Page 21: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Vacuum-Cleaner World

• Performance Measure– Award One Point per Clean Cell Over 1000 Time Step

• Environment– Two Cell World

• Actions– Left, Right, Suck, NoOp

• Percepts– Location and Contents, e.g., [A,Dirty]

• Is this a rational agent?

Page 22: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Rational Agents

• Rationality is distinct from omniscience (all-knowing with infinite knowledge)

• Agents can perform actions in order to modify future percepts so as to obtain useful information (information gathering, exploration)

• An agent is autonomous if its behavior is determined by its own experience (with ability to learn and adapt)

Page 23: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

PEAS

• PEAS: Performance measure, Environment, Actuators, Sensors

• Must first specify the setting for intelligent agent design

• Consider, e.g., the task of designing an automated taxi driver

Agent Type Performance Measure Environment Actuators Sensors

Taxi Driver SafeFastLegalComfortableProfitable

RoadsOther TrafficPedestriansCustomers

SteeringAcceleratorBrakeSignalHornDisplay

CamerasSonarSpeedometerGPSOdometerEngine SensorsKeyboard

Page 24: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Fully observable vs. partially observable:• If the agent has always access to the complete state of the environment, then the

environment is fully observable• Partial observability due to: noisy, inaccurate sensors or sensor limitations

Deterministic vs. stochastic:• If the next state of the world is completely determined by the current state and the

agent’s action, then the environment is deterministic.• If the environment is deterministic except from the actions of other agents, then it is

called strategic.

Episodic vs. sequential:• In an episodic environment the agent’s experience does not depend on the actions

taken in previous episodes.• In sequential environments, the current decision could affect all future decisions.

Properties of Environments

Page 25: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Static vs. dynamic:• If the environment changes while the agent is not acting, then the environment

is dynamic.

Discrete vs. continuous:• Continuous values can appear in:

– The state of the environment, time, the percepts or actions of the agent.

Single agent vs. multiagent:• When are the other entities in the world considered agents?

– Competitive environments:• When they maximize an performance measure that depends on the agent’s actions

– Cooperative environments:• When they communicate or follow common rules so as to satisfy a common performance

measure

Properties of Environments

Page 26: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Agent Functions and Programs

• How does the inside of a rational agent work?– An agent is completely specified by the agent function mapping percept

sequences to actions– Agent = Architecture + Program

• Agent Program vs. Agent Function– Program takes the percept and returns the action– Function takes the entire percept history

• One agent function (or a small equivalence class) is rational

• Aim: find a way to implement the rational agent function concisely

Page 27: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

A Table Driven AgentA Table Driven Agent Program

Function TABLE-DRIVEN-AGENT (percept) returns action static percepts, a sequence, initially empty table, a table of actions, initially fully specified append percept to the end of percepts action Lookup (percepts, table) return action

• Drawbacks:– Huge table– Take a long time to build the table– No autonomy– Even with learning, needs a long time to learn the table

entries

Page 28: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Reflex Vacuum Agent Program

Sensing input:[Cell Id, Dirty or Not Dirty]

Actions:[Clean, move Left, move Right, NoOp]

Reflex Vacuum Agent Program

Function REFLEX-VACUUM-AGENT ([location, status]) returns action if status = Dirty then return Suck else if location = A then return Right else if location = B then return Left

• Advantages• Small Table• Cutting Down the Table Size by Eliminating Percept History• Action Does Not Depend on the Location

Page 29: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Agent

How do agents work?

Environment

?

Sensors

Actuators

Percepts

Actions

Page 30: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Agent

Reflex Agents

EnvironmentSensors

Actuators

Percepts

Actions

What the world is like now?

What the world is like now?

What action should I do now?

What action should I do now?

Condition-action

(if-then)rules

Condition-action

(if-then)rules

Page 31: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Agent

Model-based Reflex Agents

EnvironmentSensors

Actuators

Percepts

Actions

What the world is like now?

What the world is like now?

What action should I do now?

What action should I do now?

Condition-action

(if-then)rules

Condition-action

(if-then)rules

StateState

How the world evolves?How the world evolves?

What my actions do?What my actions do?

Page 32: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Agent

Goal-based Agents

EnvironmentSensors

Actuators

Percepts

Actions

What the world is like now?

What the world is like now?

What action should I do now?

What action should I do now?GoalsGoals

StateState

How the world evolves?How the world evolves?

What my actions do?What my actions do?What it will be if I

do action A?What it will be if I

do action A?

Search & Planning

Page 33: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Agent

Utility-based Agents

EnvironmentSensors

Actuators

Percepts

Actions

What the world is like now?

What the world is like now?

What action should I do now?

What action should I do now?

UtilityUtility

StateState

How the world evolves?How the world evolves?

What my actions do?What my actions do? What it will be if I do action A?

What it will be if I do action A?

How happy I will be in the state?

How happy I will be in the state?

Utility Function: X (state space)

Page 34: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Agent

Learning Agents

EnvironmentSensors

Actuators

Percepts

Actions

ProblemgeneratorProblem

generator

StateState

LearningelementLearningelement

PerformanceElement

PerformanceElement

Performance standard

changes

knowledge

feedback

learninggoals

Page 35: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Intelligent Agents

Page 36: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

Types of Agents

Page 37: ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 1 The Foundations of AI and Intelligent Agents University Of Houston- Victoria Computer Science

• AI: A Modern Approach :– Chapters 1 & 2

Question?