Top Banner
1 EPGY 2011 Computer Science: Artificial Intelligence Lekan Wang
52

EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

Jan 24, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

1

EPGY 2011

Computer Science: Artificial Intelligence

Lekan Wang

Page 2: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

2

LECTURE 1.1

Introduction to the Course

Introduction to AI

Introduction/Review of Java and Code Design

Page 3: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

3

Introduction

Class Structure

What is AI?

History

Topics and Techniques

Programming Intro

Page 4: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

4

Introduction

Class Structure

What is AI?

History

Topics and Techniques

Programming Intro

Page 5: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

5

Who Are Your Counselors

• (RCs? TAs? RAs?)

• Name

• Academic Background

• CS and AI background

• Why you’re interested in AI, or what you’re

interested in learning

Page 6: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

6

Who Are You

• Name

• Why are you here?

• What’s your experience with computer

science?

• Why are you interested in AI?

• Summarize AI in a few sentences.

• Favorite snack foods

Page 7: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

7

Who Am I

• Stanford MS CS, BS MS&E

• Coordinated Stanford’s introductory CS

courses (CS106A, CS106B, CS106X, CS106L,

CS198)

• Work at Palantir Technologies

• SUMaC 2004

• Love to teach

• AI tools and concepts are powerful and useful

Page 8: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

8

Introduction

Class Structure

What is AI?

History

Topics and Techniques

Programming Intro

Page 9: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

9

3 Weeks

• http://lekanwang.com/ai-epgy/wp-admin/

• Lecture – Stuff: 50/45/35

– 2 Breaks

• Lab (Groups of 3) – Problem Sets, “Vignettes,” and Code

– Shouldn’t ever finish

– Collaborative Reviews

• Daily Feedback -- http://goo.gl/uqDzF

• Evening Activities

Page 10: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

10

Final Project Timeline

• Week 1: Talk with RCs, me

• End of 2.1: Topic Selection

• Week 2: One-on-Ones with me

• Week 3: Optional one-on-ones

• 3.4: Presentations (15 minutes)

Page 11: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

11

3 Weeks

...OF EXPLORATION

Page 12: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

12

A Few Rules

Actively Engage and Contribute

Raise Questions

A Room of Equals

Page 13: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

13

Introduction

Class Structure

What is AI?

History

Topics and Techniques

Programming Intro

Page 14: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

14

What Is AI? – Popular Views

• “The Machines” in The Matrix

• David, others in AI

• Data, The Borg in Star Trek

• Certain droids in Star Wars

• The Master Control Program in Tron

• Cylons in Basttlestar Galactica

• HAL 9000 in 2001: A Space Odyssey

• GLaDOS in Portal

• Cortana in Halo

• Terminator and SkyNet in Terminator

• The Steering Wheel in WALL-E

• Sonny from I, Robot

Page 15: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

15

What Is AI? – Maybe?

• Dumber droids in Star Wars

• The Computer in Star Trek

• Watson

• EDI in Mass Effect

• Dr. Know in AI

Page 16: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

16

What is AI? – Hmm...

• Chess playing program

• Military Drone/Autopilot

• Self-driving car

• Collision Avoidance System

• Adaptive Transmission

• Yelp/Netflix/iTunes/Facebook recommendations

• Washing Machine

Page 17: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

17

AI is the endeavor of building

intelligent artifacts or systems

Uhh...ok...?

Page 18: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

18

Strong vs. Weak AI

• John Searle

– Strong: “A physical symbol system can have a mind

and mental states.”

– Weak: “A physical symbol system can act

intelligently.”

• Strong presupposes consciousness

• WTF is consciousness?

Page 19: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

19

Approaches to AI

Systems that think like humans Systems the think rationally

Systems that act like humans Systems that act rationally

Russell/Norvig, 5

“The exciting new effort to make

computers think…machines with minds,

in the full and literal sense.”

“The study of the computations that

make it possible to perceive, reason, and

act.”

“The study of how to make computers do

things at which, at the moment, people

are better.”

“A field of study that seeks to explain and

emulate intelligent behavior in terms of

computational processes.”

Page 20: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

20

Approaches to AI—Human Simulation “Systems that think like humans.”

Page 21: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

21

• Cybernetics

• Ray Kurzweil (Technological Singularity)

• Early neural networks

Approaches to AI—Human Simulation “Systems that think like humans.”

Page 22: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

22

Approaches to AI—Logical Machines

• Theorem provers

• Constraint satisfaction problems

• Logic-based systems

“Systems that think rationally.”

Page 23: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

23

Approaches to AI—Turing Test “Systems that act like humans.”

• Turing Test

• Eliza, rule based systems

• The Most Human Human

Page 24: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

24

Approaches to AI – Rational Agent

• Bulk of modern AI approaches

• Techniques and tools

– Search

– Machine Learning

– Probabilistic Models

– Constraint satisfaction

– Perception/Sensors (Inputs)

– Robotics (Outputs)

“Systems that act rationally.”

Page 25: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

25

What a let down...

Page 26: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

26

Introduction

Class Structure

What is AI?

History

Topics and Techniques

Programming Intro

Page 27: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

27

A Brief History – Early History

• From Control Theory/Operations Research

• (Pong came out in 1972)

• Arthur Samuel’s Checkers Program (ML)

• John McCarthy and Lisp (1958)

• Marvin Minsky

• Extreme optimism!

• Herbert Simon: Computer chess champion in ten years (1957)

Page 28: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

28

A Brief History—Slow Progress

• Problems

– Algorithmic complexity

– Logical Systems and Neural Nets inappropriate

– Researchers were naïve as hell

• Reframing of AI – rational agent model

• Expert Systems and Knowledge (1970s)

• Natural Language

Page 29: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

29

A Brief History— “Recent Progress”

• Handling Uncertainty

• Rational Agent model

• Probabilistic Methods

• Deep Learning

• Computer Vision

• SVMs

Page 30: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

30

So where are we now?

Page 31: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

31

What We Will Cover

• Real Tools

• Applications

Page 32: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

32

What We Will Cover

• Real Tools

• Applications

Page 33: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

33

What We Will Cover

• Real Tools

• Applications

Page 34: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

34

Introduction

Class Structure

What is AI?

History

Topics and Techniques

Programming Intro

Page 35: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

35

Math and CS Foundations

• Data Structures

• Recursion

• Algorithms

• Complexity

• Proofs

• Probability

Page 36: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

36

Knowledge Representation

• Discrete vs. Continuous

• Data structures

• Ontologies

• Trees

• Graphs

• Logic and Logical Inference

Page 37: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

37

Search

• Maps and Directions

• Pathfinder

• Motion Planning

• Uninformed Search

• Informed Search

Page 38: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

38

CSPs

• Being smarter with constraints

• Planning

Page 39: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

39

Machine Learning

• Classification

• Regression

• Clustering

• Evaluation

• Applications

Page 40: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

40

Bayes and Markov

• Probabilistic Models

• Uncertainty

• Correlation/Causation

• Modeling Complex Behavior

• Neural Nets

Page 41: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

41

Other

• Natural Language Processing

• Autonomous vehicles

• Biocomputation

• Lisp

• Theorem Solvers

Page 42: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

42

Introduction

Class Structure

What is AI?

History

Topics and Techniques

Programming Intro

Page 43: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

43

Assumptions

• Familiarity with syntax of a modern

programming language (Java, C++, C, Python,

Visual Basic)

• Familiarity with math up to Algebra II

• Minimal exposure to theory of computing and

programming languages

Page 44: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

44

Language & Environment

• Java

• Eclipse

Page 45: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

45

Code Design

Page 46: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

46

Code Style

Page 47: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

47

Code Style

• Magic Numbers

• Tabbing and Spacing

• Variable Scoping

• Variable Names

• Unused Variables, Methods, and Warnings

• Control Structures Redundancy

• Commenting!!

• Decomposition!

• “Premature optimization is the root of all evil.” – Donald Knuth

Page 48: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

48

Debugging

Page 49: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

49

Debugging

• System.out.println()

• assert()

• Eclipse Debugger

Page 50: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

50

SGGraphics

Page 51: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

51

SGGraphics

• GraphicsProgram – Override

– setup()

– run()

• SGObjects

• MouseListener

• MouseMotionListener

• KeyListener

• ActionListener

• setXXXXDebugMode(boolean)

Page 52: EPGY 2011 Computer Science: Artificial Intelligence Lekan Wanglekanwang.com/ai-epgy/wp-content/uploads/2011/06/L1-AI.pdfcourses (CS106A, CS106B, CS106X, CS106L, CS198) • Work at

52

SGGraphics DEMO!