cs 480 artificial intelligence

38
CS 480 ARTIFICIAL INTELLIGENCE Instructor: B. Ravikumar Computer Science Department 116 I Darwin Hall Class meets: Fridays 9 to 12

Upload: vail

Post on 25-Feb-2016

39 views

Category:

Documents


0 download

DESCRIPTION

CS 480 ARTIFICIAL INTELLIGENCE. Instructor: B. Ravikumar Computer Science Department 116 I Darwin Hall Class meets: Fridays 9 to 12. Course details. Catalog Description: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CS 480 ARTIFICIAL INTELLIGENCE

CS 480 ARTIFICIAL INTELLIGENCE

Instructor:B. Ravikumar

Computer Science Department116 I Darwin Hall

Class meets:Fridays 9 to 12

Page 2: CS 480 ARTIFICIAL INTELLIGENCE

Course details

Catalog Description: A survey of techniques that simulate human intelligence. Topics may include: pattern recognition, general problem solving, adversarial game-tree search, decision-making, expert systems, neural networks, fuzzy logic, and genetic algorithms. Prerequisite: CS 315 or consent of instructor.

Background Expected:

•Programming and data structures (CS 315)• Discrete mathematics (CS 242)•Linear algebra Some background in logic and probability will be helpful, but not necessary. 

Page 3: CS 480 ARTIFICIAL INTELLIGENCE

Course details

Course Goals:

AI covers wide range of topics:

• understanding language• vision and speech processing• problem solving, planning• common sense reasoning.

AI techniques:

• combinatorial (searching, A* algorithm etc.)• logical (prove assertion in formal framework)• probabilistic (decision tree, Bayesian network)• machine learning (neural network, evolutionary technique)

Page 4: CS 480 ARTIFICIAL INTELLIGENCE

Course details

Other references:

• N. Nillsson, AI: A new synthesis.

• Winston, Artificial Intelligence.

Page 5: CS 480 ARTIFICIAL INTELLIGENCE

Course details

Page 6: CS 480 ARTIFICIAL INTELLIGENCE

Course details

Short Quizzes (5 – 10%)

Two Mid-Term tests (20%) – Both tests will be in class and will be about 75 miutes long. The tests will be open book/open notes. Home Work and Projects (40 - 50%) – There will be some common programming projects and a final project. The final project will be done individually. You can choose a problem from a list that will be provided early in the semester. The project is due the last week of the semester. You are to write a report summarizing your contributions to the chosen problem. Some selected project work will be presented in the department colloquium.

Final Examination (25 - 30%) – The final examination will be comprehensive and will take place at the scheduled time posted in the web page http://www.sonoma.edu/university /classsched/ finals_sched.pdf (not updated for Fall 09 as of August 15, 2009.) 

Page 7: CS 480 ARTIFICIAL INTELLIGENCE

Lecture 1 Outline

• Course overview• What is AI?• A brief history• The state of the art

Slides adapted from Russell and Norvig, AIAMA

Page 8: CS 480 ARTIFICIAL INTELLIGENCE

Course overview• Introduction (chapters 1,2)Techniques• Combinatorial (search) approach to AI

(chapters 3,4,5,6)• Symbolic (logical) approach to AI (chapters

7,8,9)• Probabilistic approach to AI (chapters 13,14)• Learning approach to AI (chapters 18,20) Applications• Natural Language Processing (chapter 22,23)• Computer vision (Chapter 24)

Page 9: CS 480 ARTIFICIAL INTELLIGENCE

What is AI?

Authors think AI falls into four categories:

Thinking humanlyThinking rationally Acting humanly Acting rationally

The textbook advocates "acting rationally"

••

Page 10: CS 480 ARTIFICIAL INTELLIGENCE

What is AI?

Before attempting a definition, we will state some major contemporary applications of AI:

• business: advertising, financial decision making• web: identifying objects in images, social network models etc.• medical: image classification (belign vs. malignant tumor), image analysis using functional MRI• multiple field: language translation, semantic analysis, speech synthesis, speech to text conversion.• industrial: vision, robotics

Page 11: CS 480 ARTIFICIAL INTELLIGENCE

Acting humanly: Turing Test• Turing (1950) "Computing machinery and intelligence":• "Can machines think?" "Can machines behave

intelligently?"• Operational test for intelligent behavior: the Imitation

Game

• Predicted that by 2000, a machine might have a 30% chance of fooling a lay person for 5 minutes

• Anticipated all major arguments against AI in following 50 years

• Suggested major components of AI: knowledge, reasoning, language understanding, learning

Page 12: CS 480 ARTIFICIAL INTELLIGENCE

Thinking humanly: cognitive modeling

• 1960s "cognitive revolution": information-processing psychology

• Requires scientific theories of internal activities of the brain

• How to validate? Requires 1) Predicting and testing behavior of human

subjects (top-down) or 2) Direct identification from neurological data

(bottom-up)• Both approaches (roughly, Cognitive

Science and Cognitive Neuroscience) • now distinct from AI•

••

Page 13: CS 480 ARTIFICIAL INTELLIGENCE

Thinking rationally: "laws of thought"

• What are correct arguments/thought processes?• Several Greek schools developed various forms of

logic: notation and rules of derivation for thoughts; may or may not have proceeded to the idea of mechanization

• Direct line through mathematics and philosophy to modern AI

• Problems: 1. Not all intelligent behavior is mediated by

logical deliberation2. What is the purpose of thinking? What

thoughts should I have?

Page 14: CS 480 ARTIFICIAL INTELLIGENCE

Acting rationally: rational agent• Rational behavior: doing the right thing• The right thing: that which is expected to

maximize goal achievement, given the available information

• Doesn't necessarily involve thinking – e.g., blinking reflex – but thinking should be in the service of rational action

•••

Page 15: CS 480 ARTIFICIAL INTELLIGENCE

AI techniques• Combinatorial search problems

– state space (over which search is performed)– finite state space (discrete)– how to move from one state to another

(transition rules)

• Applications– Games (one player or two players)– Navigation (robotics)

• Solution – Search tree exploration

Page 16: CS 480 ARTIFICIAL INTELLIGENCE

techniques• Combinatorial search approach

Sliding piece puzzle: 1 2 34

86

7 5Start: goal:

1 2 34 5 67 8

Legal moves: slide a piece next to empty slot.

Many AI problems can be modeled as search problems.

Page 17: CS 480 ARTIFICIAL INTELLIGENCE

A portion of a search tree for the 8-puzzle.

Page 18: CS 480 ARTIFICIAL INTELLIGENCE

Combinatorial search

•Uninformed search• depth-first• breadth-first• iterative deepening• breadth-depth

• informed search• best-first

Page 19: CS 480 ARTIFICIAL INTELLIGENCE

Combinatorial search

•Depth-first search

What are the ways to speed-up DFS?

Page 20: CS 480 ARTIFICIAL INTELLIGENCE

Combinatorial search

• Breadth-first search

Page 21: CS 480 ARTIFICIAL INTELLIGENCE

Combinatorial search

• heuristic search• for each node, a heuristic provides an estimate of its distance from the goal.

• for sliding-piece puzzle, Manhattan distance is one such estimate.

• estimate for other search problems? (e.g. queen placement)

Page 22: CS 480 ARTIFICIAL INTELLIGENCE

Combinatorial search

Consider placement in the 5th row.

Page 23: CS 480 ARTIFICIAL INTELLIGENCE

techniques• Symbolic (logical) approach to AI intelligent problem solving requires

reasoning and deduction.

Knowledge is represented as a set of logical assertions A1, …, An, and a conclusion to be drawn is also expressed as an assertion.

Can we deduce F from A1, …, An?

Page 24: CS 480 ARTIFICIAL INTELLIGENCE

Knowledge bases

• Knowledge base = set of sentences in a formal language

• Declarative approach to building an agent (or other system):– Tell it what it needs to know

• Then it can Ask itself what to do - answers should follow from the KB

• Agents can be viewed at the knowledge leveli.e., what they know, regardless of how implemented

• Or at the implementation level– i.e., data structures in KB and algorithms that

manipulate them––

•–

Page 25: CS 480 ARTIFICIAL INTELLIGENCE

The party example

• If Alex goes, then Beki goes: A B• If Chris goes, then Alex goes: C A• Beki does not go: not B• Chris goes: C

Query: Is it possible to satisfy all these conditions?

This is called satisfiability problem.

Page 26: CS 480 ARTIFICIAL INTELLIGENCE

Example of languages

• Programming languages:– Formal languages, not ambiguous, but cannot express

partial information. Not expressive enough.• Natural languages:

– Very expressive but ambiguous: ex: small dogs and cats.

• Good representation language:– Both formal and can express partial information, can

accommodate inference• Main approach used in AI: Logic-based languages.

• Predicate-logic with Horn clauses

Page 27: CS 480 ARTIFICIAL INTELLIGENCE

Deduction algorithmsExample: Given P R, and Q ~R

Can we deduce ~(P & Q)?

Applications

• expert systems (Mycin, dendral are early examples)

• logic programming

• automatic theorem proving (software validation)

Resolution strategy

Page 28: CS 480 ARTIFICIAL INTELLIGENCE

Example:

X (Y ((mother(X) child_of(Y,X)) loves(X,Y)))mother(mary)child_of(tom,mary)

Can we deduce?

loves(tom, mary)

Logical deduction in predicate logic

Page 29: CS 480 ARTIFICIAL INTELLIGENCE

techniques• Probabilistic approach to AIKnowledge representation models uncertainties.Example:• H = “Have a headache”• F = “Coming down with Flu”• P(H) = 1/10• P(F) = 1/40• P(H|F) = ½Given that you have a headache, what is the probability that you

have flu?

This kind of modeling is widely used in various prediction problems, e.g., in determining the insurance premium for car etc.

Page 30: CS 480 ARTIFICIAL INTELLIGENCE

Probabilistic approach to AI

Some games are inherently probabilistic.

•Financial markets

• backgammon

Page 31: CS 480 ARTIFICIAL INTELLIGENCE

techniques

Training set

New applicant: (young, has job, does not own house, good credit).

Will (s)he default? We can build a probabilistic model to answer.

Page 32: CS 480 ARTIFICIAL INTELLIGENCE

techniquesMachine learning approach to AI:• self-improving algorithms• solution obtained without explicit programming• Closer to modeling human intelligence or natural

intelligence (we learn many things by observing even if step by step procedure absent)

Prominent examples:• Neural networks• Genetic algorithms, evolutionary method

Page 33: CS 480 ARTIFICIAL INTELLIGENCE

techniquesNeuron (very roughly modeled by neurons in human brains.

Page 34: CS 480 ARTIFICIAL INTELLIGENCE

techniques

An algorithm called back propagation algorithm is used to adjust the weights of neurons based on the discrepancy between correct output and computed output.

Page 35: CS 480 ARTIFICIAL INTELLIGENCE

techniques

Evolutionary algorithms:

• encoding of the collection of solutions as strings.

• goal is to evolve the “best” solution.

• use cross-over and mutation and iterate.

Example of cross-over and mutation

Page 36: CS 480 ARTIFICIAL INTELLIGENCE

AI prehistory• 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 theorydesign systems that maximize an objective

function over time • Linguistics knowledge representation, grammar

Page 37: CS 480 ARTIFICIAL INTELLIGENCE

Abridged history of AI• 1943 McCulloch & Pitts: Boolean circuit model of brain• 1950 Turing's "Computing Machinery and Intelligence"• 1956 Dartmouth meeting: "Artificial Intelligence" adopted• 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, probabilistic techniques dominate• 1995--The emergence of intelligent agents

Page 38: CS 480 ARTIFICIAL INTELLIGENCE

State of the art• Deep Blue defeated the reigning world chess champion Garry

Kasparov in 1997

• Proved a mathematical conjecture (Robbins conjecture) unsolved for decades

• No hands across America (driving autonomously 98% of the time from Pittsburgh to San Diego)

• During the 1991 Gulf War, US forces deployed an AI logistics planning and scheduling program that involved up to 50,000 vehicles, cargo, and people

• NASA's on-board autonomous planning program controlled the scheduling of operations for a spacecraft

• Proverb solves crossword puzzles better than most humans