Lab 8 Artificial Intelligence

profilefadoo
CS-1150-Lab-8.pptx

How to Submit Lab #8

Soft copy

Go to Pilot Course Page and Use the Dropbox Submission Link to upload your files

CS 1150 - Lab 2 - Exploring Number Systems

1

Lab #8 Overview

Learn how semantic networks and rule-based natural language systems can simulate intelligent behavior

Answer all questions in lab Exercise

Lab #8 Due Date – November 16, 2018 11:59 PM

CS 1150 – Lab 13 – Artificial Intelligence

2

Introduction to Semantic Networks

CS 1150 – Lab 13 – Artificial Intelligence

3

Knowledge is represented as a set of concepts that are connected by different relationships among them.

Nodes = Concepts

Arcs = Relationships

Graph = Semantic Network

Inheritance and Instantiation

CS 1150 – Lab 13 – Artificial Intelligence

4

Instantiation – X is an INSTANCE of Y if X is a specific example of the general concept Y.

Eg – Mary is a Woman (Woman is a General Concept and Mary is an example of a Woman)

Inheritance – X ISA Y if X and Y both are general concepts and X is a subset of the more general concept Y.

Eg – Woman is a Human (Humans are consist of Men and Women and Woman is a subset of Human)

Building Semantic Networks

CS 1150 – Lab 13 – Artificial Intelligence

5

Mary

Woman

Human

Animal

Food

Man

Mammal

Hair

Place

is-a

is-a

is-a

is-a

instance-of

eats

moves

Skin

has

has

is-a

Close World and Open World Assumptions

CS 1150 – Lab 13 – Artificial Intelligence

6

Close World Assumption – What is not currently known to be true is false

Anything that is not in our Semantic Network is false.

Open World Assumption – Truth-value of a statement is independent of whether or not it is known by an observer to be true

Anything that is not in our Semantic Network, we cannot say that they are true or false.

Rule Patterns Supported by the Applet

CS 1150 – Lab 13 – Artificial Intelligence

7

noun isa noun

Eg – Mary is a woman

noun verb

Eg – Animal moves

noun verb object

Eg – Animal eats food

noun’s noun verb object

How Deduction Works - Woman eats food??

CS 1150 – Lab 13 – Artificial Intelligence

8

Rules We Have

R1 – woman isa human

R2 – human isa animal

R3 – animal eats food

Deduction

human isa animal (R2) and animal eats food (R3), therefore:

human eats food (I1)

woman isa human (R1) and human eats food (I1), therefore:

woman eats food (I2)

Eliza Therapist Applet

CS 1150 – Lab 13 – Artificial Intelligence

9

Read the rules

$ is used to define variables

Eg - $0 is the first variable

Variables are single words

* - More than one word

How Eliza Therapist Applet Works?

CS 1150 – Lab 13 – Artificial Intelligence

10

Eliza turns what you type into a question merely by appending a question mark to the statement and switching the pronouns, as shown below:

What would you do if you want to use a variable to replace mother? How would Eliza turns it to a question?

Writing Rules for Eliza Therapist

CS 1150 – Lab 13 – Artificial Intelligence

11

Rules takes the form pattern=>response

Eg.1 – I have a problem=>What kind of problem?

Eg.2 – I hate my $0 *=>Tell me more about your $0.

Variables can appear in pattern part and response part both (See Eg.2)

To match more than one word for a variable, surround the variable with an asterisk and parentheses *($0)=>$0 ?

Eg.3 – *($0) usually believe *($1)=>Do $0 usually believe $1 ?

Writing Rules for Eliza Therapist Cont.

CS 1150 – Lab 13 – Artificial Intelligence

12

Forbid the matching of some words, use / with variable

Eg – $0/You are $1=>Do you really believe that $0 are $1 ? This rule tries to match a sentence that has “are” as the second word, but the first word cannot be You.

Limitations of Eliza Therapist Applet Program

Doesn’t know about English grammar rules

Cannot recognize uppercase and lowercase words as essentially the same word

Evaluating Web Sources-Use for Lab

http://guides.library.jhu.edu/evaluate

Evaluating Sources – watch the youtube clip

Authorship

Can I obtain more valid information?

Email, affiliations

Is author well known and biography included?

Publishing Body

Where did the information originate

Reputable source

Publication date, copyright

Links to sources

Link to communicate with WebMaster or author

Was the research method explained?

Currency

Is it fresh or dusty?

CS 1150 - Lab 2 - Exploring Number Systems

13

Hopkins: Distinguishing Propaganda and Misinformation-Use For Lab

Propaganda- facts given in a provocative manner to encourage you to think in a particular way

Uses colorful adjectives, gives opinion, one-sided

Misinformation – not the truth, incorrect information

May sound sincere and informative, based on nothing, intention neutral

Ask for sources, rationale

Disinformation – the dissemination of purposely false information with intention of influencing policies

CS 1150 - Lab 2 - Exploring Number Systems

14