CSL302 Artificial Intelligence Spring 2017cse.iitrpr.ac.in/ckn/courses/s2017/csl302/w1.pdfEpisodic...

Post on 08-May-2020

17 views 0 download

Transcript of CSL302 Artificial Intelligence Spring 2017cse.iitrpr.ac.in/ckn/courses/s2017/csl302/w1.pdfEpisodic...

CSL302Artificial IntelligenceSpring 2017NARAYANAN C KRISHNANCKN@IITRPR.AC.IN

Reference MaterialqCourse TextbookoArtificial Intelligence A Modern Approach,

Stuart Russell and Peter Norvig, 3rd edition oLow price edition will suffice

qOther reference materialsohttp://aima.cs.berkeley.edu/o AI – Rich and Knight

qPre-requisiteso CSL 201 – Data Structures

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 2

Tentative Course Schedule

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 3

Quizzes – 20%qAlmost every weekqCovers material discussed from the previous quiz till the current weekqDuration 30-45mqTop 6 out of 8 will be considered towards the final grade

Quiz WeekQ1 2Q2 3Q3 5Q4 6Q5 11Q6 12Q7 14Q8 15

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 4

Labs – 30%qDue every third Friday 11.55pmqProgramming Assignmentsostart early – heavy

programming component

qTA is available for any assistanceostudents are encouraged to

contact the TA for clarifications regarding the labs

qProgramming languageoC/Python

Lab DateL1 27/1L2 17/2L3 10/3L4 31/3L5 22/4L6 24/4

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 5

Grading SchemeqTentative BreakupoQuizzes (6 out of 8) – 20%oLabs (5 out of 6) – 30%oMid-semester exam – 25%oEnd-semester exam – 25%oAttendance Bonus - 1%ØAttendance is not mandatory, however attendance will be taken

for every class and will count towards the bonus points

A student must secure an overall score of 40(out of 100) and a combined score of 60(out of 200) in the exams to pass the course.

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 6

Honor CodeqUnless explicitly stated otherwise, for all assignments:oStrictly individual effortoGroup discussions at a high level are encouragedoYou are forbidden from trawling the web for

answers/code etc.qAny infraction will be dealt with in severest terms allowed. qI reserve the right to question you with regards to your submission, if I suspect any misconduct.

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 7

Course Websiteqhttp://cse.iitrpr.ac.in/ckn/courses/s2017/csl302/csl302.htmlqAll class related material will be accessible from the webpageqLabs will be uploaded incrementally and will be notified through emailoLabs will be submitted only by moodle

qI will not be giving any separate handoutsqThe pdf version of the lecture slides will be available on the class website.

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 8

General InformationqCourse Structureo3-0-2 (4 credits)

qScheduled Class TimingsoWednesday-1.30-2.20pmoThursday– 2.25-3.15pmoFriday– 3.20-4.15pm

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 9

8:00 - 8:50 9:00 - 9:50 9:55 - 10:45 10:50 - 11:40 11:45 - 12:35 12:35 - 1:30 1:30 - 2:20 2:25 - 3:15 3:20 - 4:10 4:15 - 5:05 5:10 - 6:00 6:00 - 6:30

CYL454(L1-G1,G3,G5) HUL459(L-7) CSL343(L2) CSL607(L-5)

CYL454(L2-G2,G4,G6) HUL475(L-5) EEL345/EEL475(L-10) CSL605(L-10)

CYL458(L-3) EEL486(L-6) EEL312/EEL453(L-4)

BML601(L4) MEL203(L-5) MEL603(L6)

MAL421(L-5)

CSL607 CYL454(L1-G1,G3,G5) HUL459(L-7) CSL343(L2)

EEL312 CYL454(L2-G2,G4,G6) HUL475(L-5) EEL345/EEL475(L-10)

MEL603 CYL458(L-3) EEL486(L-6)

CSL605 BML601(L4) MEL203(L-5)

MAL421(L-5)

CSL301(L-2) CSL309(L-6) PHL452(L-4)

CSL343(L2) CYL454(L1-G1,G3,G5) CSL302(L-4) EEL490(L-4) CYL453(L-5) CSL355(L-2)

HUL459(L-7)(T) EEL345/EEL475(L-10) CYL454(L2-G2,G4,G6) EEL323/EEL463(L9) EEL484(L-5) BML451(L-6) EEL315/EEL452(L-4)

HUL475(L-5)(T) EEL486(L-6) EEL312 CYL458(L-3) EEL614(L-10) MEL602(L-10) EEL333/EEL475(L-5)

MEL203(L-5) MEL603 BML601(L4) MEL471(L-7) MEL521(L-9) MEL522(L-6)

MAL421(L-5) MEL403(L-1)

CSL301(L-2) CSL309(L-6)

CSL355(L-2) CSL302(L-4) EEL490(L-4) PHL452(L-4)

CYL458(L-3)(T) EEL315/EEL452(L-4) EEL323/EEL463(L9) EEL484(L-5) CYL453(L-5)

EEL333/EEL475(L-5) EEL614(L-10) MEL602(L-10) BML451(L-6)

MEL522(L-6) MEL471(L-7) MEL521(L-9)

MEL403(L-1)

CSL301(L-2) CSL309(L-6)

PHL452(L-4) CSL355(L-2) CSL302(L-4) EEL490(L-4)

CSL355(L-2)(T) CYL453(L-5) EEL315/EEL452(L-4) EEL323/EEL463(L9) EEL484(L-5) CYL453(L-5)(T)

BML451(L-6) EEL333/EEL475(L-5) EEL614(L-10) MEL602(L-10)

MEL522(L-6) MEL471(L-7) MEL521(L-9)

MEL403(L-1)

SLOT A SLOT B SLOT C SLOT D SLOT A1 SLOT B1 SLOT C1 SLOT D1

FRI

INDIAN INSTITUTE OF TECHNOLOGY ROPAR2014 BATCH TIMETABLE FOR 2nd SEMESTER OF ACADEMIC YEAR 2016-17

MON

TUES

WED

THUR

EEP-307-LAB

EEP-307-LAB

EEP309-LAB

MEL403(L-1)(T)

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 10

8:00 - 8:50 9:00 - 9:50 9:55 - 10:45 10:50 - 11:40 11:45 - 12:35 12:35 - 1:30 1:30 - 2:20 2:25 - 3:15 3:20 - 4:10 4:15 - 5:05 5:10 - 6:00 6:00 - 6:30

CYL458(L-3) HUL472(L3) CSL202(L-L1) MAL213(L1-G1,G3,G5)

BML601(L4) EEL204(L-4) MAL213(L2-G2,G4,G6)

MAL421(L-5) MEL201(L-3)

MAL452(L-6)

EEL204(L-4)(T) MAL213(L1-G1,G3,G5) CYL458(L-3) HUL472(L3) CSL202(L-L1)

MEL201(L-3)(T) MAL213(L2-G2,G4,G6) BML601(L4) EEL204(L-4)

MAL421(L-5) MEL201(L-3)

MAL452(L-6)

CSL202(L-L1) MAL213(L1-G1,G3,G5) CYL458(L-3) MEL471(L-7) EEL205((L-3) PHL452(L-4) EEL208(L-7)

HUL472(L3)(T) EEL204(L-4) MAL213(L2-G2,G4,G6) BML601(L4) CYL453(L-5) MEL625(L-10)

MEL201(L-3) MAL421(L-5) BML451(L-6) MEL618(L-9)

MAL452(L-6) MAL422(L-7)

CYL458(L-3)(T) EEL208(L-7) PHL452(L-4)

MEL625(L-10) MEL471(L-7) EEL205((L-3) CYL453(L-5) EEL205((L-3)(T)

MEL618(L-9) BML451(L-6)

MAL422(L-7)

PHL452(L-4) EEL208(L-7) MEL471(L-7) CYL453(L-5)(T)

EEL208(L-7)(T) CYL453(L-5) MEL625(L-10) EEL205((L-3)

MEL625(L-10)(T) BML451(L-6) MEL618(L-9)

MAL422(L-7)

SLOT A SLOT B SLOT C SLOT D SLOT A1 SLOT B1 SLOT C1 SLOT D1

FRI

THUR

EEP203-LAB

INDIAN INSTITUTE OF TECHNOLOGY ROPAR2015 BATCH TIMETABLE FOR 2nd SEMESTER OF ACADEMIC YEAR 2016-17

MON

TUES

WED

EEP204-LAB

EEP203-LAB

EEP204-LAB

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 11

General InformationqCourse Structureo3-0-2 (4 credits)

qScheduled Class TimingsoWednesday-1.30-2.20pmoThursday– 2.25-3.15pmoFriday– 3.20-4.15pm

qLab hoursoThursday -9.00-10.45am

qTeaching AssistantoYayati Gupta –

yayati.gupta@iitrpr.ac.inqOffice hoursoInstructor – only through prior

appointment or by email

qCourse google groupocsl302s2017@iitrpr.ac.in

qPre-registered students have already been added.qPseudonymo5 characteroJan 9th, 5.00pm

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 12

Introduction

Motivation – Why study AI?

What comes to your mind when you hear AI?

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 14

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 15

Kasparov said that he sometimes saw deep intelligence and creativity in the machine's moves

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 16

HAL - Heuristic Algorithmic, capable of• Speech Recognition• Facial Recognition• Natural Language Processing• Lip Reading• Art Appreciation• Reproducing emotional

behavior• Reasoning• Playing chess

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 17

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 18

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 19

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 20

What is AI?qWhat do you think?

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 22

Definition of AIThinking humanly Thinking rationallyActing humanly Acting rationally

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 23

Definition of AI

qActing Humanly –oTuring test

o Is it sufficient to imitate a human (living being)?

Thinking humanly Thinking rationallyActing humanly Acting rationally

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 24

Definition of AI

qThinking humanlyoModel human thinking processoRequires scientific theories of internalactivities of the human brainoCognitive Science, Cognitive Neuroscience

qA machine that thinks like human while solving a problem correctly.

Thinking humanly Thinking rationallyActing humanly Acting rationally

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 25

Definition of AI

qThinking RationallyqLaws of ThoughtoAristotle – right thinkingoBelief that “logic” governs the humanthought process

qKnowledge is not always 100% certainqWhat is the goal? What is purpose of thinking?

Thinking humanly Thinking rationallyActing humanly Acting rationally

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 26

Definition of AI

qActing Rationallyqrational behavior = doing the right thingqEncompasses the other lines of thought.oThinking rationally will help to act rationally, but

is not the only means; Eg: ReflexqAgent: an entity that perceives and actsqGoal: building rational agents

Thinking humanly Thinking rationallyActing humanly Acting rationally

Introduction CSL302 - ARTIFICIAL INTELLIGENCE 27

Intelligent Agents

Definition of AI

qActing Rationallyqrational behavior = doing the right thingqEncompasses the other lines of thought.oThinking rationally will help to act rationally, but

is not the only means; Eg: Reflex

qGoal: building rational agents

Thinking humanly Thinking rationallyActing humanly Acting rationally

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 29

AgentEnvironment

Agent

Perc

epti

on Action

What should I do next?

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 30

Agent Functions and ProgramqAgent behavior is described by the agent function that maps percept sequences to actions.qLookup Table – An action for every possible percept sequence.qAgent Program: realization/concrete implementation of the agent function within some physical system.

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 31

Vacuum World

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 32

Rational AgentsqA rational agent does the right thing(action)qWithout loss of generality, “goals” specifiable by performance measure defining a numerical value for any environment historyqRational Action: that maximizes the expected value of the performance measure given the percept sequence to date and prior knowledge

qRationality ≠ OmniscienceqRationality ≠ SuccessfulqRationality ≠ ClairvoyantqRationality ≠ Intentionally no Sensing

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 33

PEAS – Specifying the Task EnvironmentqMust specify the task environment as fully as possible

oPerformance

oEnvironment

oActuator

oSensors

Task Environment for automated taxi driver?

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 34

PEAS – Specifying the Task EnvironmentqMust specify the task environment as fully as possible

oPerformance- safe, fast, comfortable

oEnvironment-roads, other traffic, traffic signals

oActuator-steering, accelerator, brake, horn, signal

oSensors-video camera, IR sensor, GPS, odometer

Task Environment for automated taxi driver?

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 35

PEAS – Specifying the Task EnvironmentqHow does the following affect the complexity of the problem the rational agent faces?

oPerformance – complex goals makes performance harder to achieve?

oEnvironment

oActuator – Lack of effectors makes performance harder to achieve?

oSensors – Lack of percepts makes performance harder to achieve?

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 36

Properties of the Task Environment

Environment

Agent

Perc

epti

on Action

What should I do next?

Static vs. Dynamic

Partially vs. Fully Observable

Deterministic vs. Stochastic

Instantaneous vs. DurativeFull vs.

Partial Satisfaction

Discrete vs. Continuous

Single vs. Multiple Agents

Episodic vs. Sequential

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 37

Properties of the Task EnvironmentqObservable: The agent can “sense” its environmento best: fully observable worst: unobservable typical: partially observable

qDeterministic: The actions have predictable effectso best: deterministic worst: non-deterministic typical: stochastic

qStatic: The world does not change when the agent is deciding on what to do nexto best: static worst: dynamic typical: quasi-static

qEpisodic: The performance of the agent is determined episodicallyo best: episodic worst: non-episodic

qDiscrete: The environment evolves through a discrete set of stateso best: discrete worst: continuous typical: hybrid

qAgents: # of agents in the environment; are they competing or cooperating?

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 38

Task Environment-ExamplesEnvironment Observable Deterministic Static Episodic Discrete #

AgentsChess

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 39

Task Environment-ExamplesEnvironment Observable Deterministic Static Episodic Discrete #

AgentsChess Fully Deterministic Semi Sequential Discrete Multi

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 40

Task Environment-ExamplesEnvironment Observable Deterministic Static Episodic Discrete #

AgentsChess Fully Deterministic Semi Sequential Discrete Multi

Poker

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 41

Task Environment-ExamplesEnvironment Observable Deterministic Static Episodic Discrete #

AgentsChess Fully Deterministic Static Sequential Discrete Multi

Poker Partial Stochastic Static Sequential Discrete Multi

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 42

Task Environment-ExamplesEnvironment Observable Deterministic Static Episodic Discrete #

AgentsChess Fully Deterministic Semi Sequential Discrete Multi

Poker Partial Stochastic Static Sequential Discrete Multi

Taxi-Driving

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 43

Task Environment-ExamplesEnvironment Observable Deterministic Static Episodic Discrete #

AgentsChess Fully Deterministic Semi Sequential Discrete Multi

Poker Partial Stochastic Static Sequential Discrete Multi

Taxi-Driving Partial Stochastic Dynamic

Sequential Continuous

Multi

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 44

Task Environment-ExamplesEnvironment Observable Deterministic Static Episodic Discrete #

AgentsChess Fully Deterministic Semi Sequential Discrete Multi

Poker Partial Stochastic Static Sequential Discrete Multi

Taxi-Driving Partial Stochastic Dynamic

Sequential Continuous

Multi

Medical-Diagnosis

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 45

Task Environment-ExamplesEnvironment Observable Deterministic Static Episodic Discrete #

AgentsChess Fully Deterministic Semi Sequential Discrete Multi

Poker Partial Stochastic Static Sequential Discrete Multi

Taxi-Driving Partial Stochastic Dynamic

Sequential Continuous

Multi

Medical-Diagnosis

Partial Stochastic Dynamic

Sequential Continuous

Multi

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 46

Task Environment-ExamplesEnvironment Observable Deterministic Static Episodic Discrete #

AgentsChess Fully Deterministic Semi Sequential Discrete Multi

Poker Partial Stochastic Static Sequential Discrete Multi

Taxi-Driving Partial Stochastic Dynamic

Sequential Continuous

Multi

Medical-Diagnosis

Partial Stochastic Dynamic

Sequential Continuous

Multi

Image Analysis

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 47

Task Environment-ExamplesEnvironment Observable Deterministic Static Episodic Discrete #

AgentsChess Fully Deterministic Semi Sequential Discrete Multi

Poker Partial Stochastic Static Sequential Discrete Multi

Taxi-Driving Partial Stochastic Dynamic

Sequential Continuous

Multi

Medical-Diagnosis

Partial Stochastic Dynamic

Sequential Continuous

Multi

Image Analysis

Fully Deterministic Static Episodic Continuous

Single

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 48

Task Environment-Examples

The real world is partially observable, stochastic, dynamic and continuousHow do we handle it then?

Environment Observable Deterministic Static Episodic Discrete #Agents

Chess Fully Deterministic Semi Sequential Discrete Multi

Poker Partial Stochastic Static Sequential Discrete Multi

Taxi-Driving Partial Stochastic Dynamic

Sequential Continuous

Multi

Medical-Diagnosis

Partial Stochastic Dynamic

Sequential Continuous

Single

Image Analysis

Fully Deterministic Dynamic

Episodic Continuous

Single

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 49

Types of AgentsqTypes of agents (increasing in generality and ability to handle complex environments)oSimple reflex agentsoModel based reflex agentsoGoal-based agentsoUtility-based agentsoLearning agents

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 50

Simple Reflex Agents

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 51

Vacuum World

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 52

Model Based Reflex Agents

State Estimation

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 53

Goal Based Agents

State Estimation

Search/Planning

Search: process of looking for a sequence of actions that reaches the goal statePlanning: can be viewed as search in a structured environment.

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 54

Utility Based Agents

• Utility function: internalization of the performance measure• Conflicting goals• Multiple uncertain goals• Decision theoretic planning

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 55

Learning Agents

Intelligent Aents CSL302 - ARTIFICIAL INTELLIGENCE 56