13 The second operation of the AI

Source: Internet
Author: User
Tags pear

2.9 With the following statements, please use the corresponding predicate formula to express them separately:

(1) Some people like plum blossom, some people like Chrysanthemum, some people both like plum blossom and like chrysanthemum.

(2) Some people go to play basketball every afternoon.

(3) The new type of computer is fast and the storage capacity is large.

(4) Not every computer department student likes the computer creates Macintosh program

(5) Anyone who likes to program is fond of computers.

Solution: (1) define predicate

P (x): X is Human L (x, y): × likes y

Where Y's individual domain is {plum, chrysanthemum}

The knowledge is represented by a predicate as:

(ヨx) (P (x) →l (x, Plum) ∨l (x, Chrysanthemum) ∨l (x, Plum) ∧l (x, Chrysanthemum)

(2) Defining predicates

P (x): X is man B (x): X Play basketball A (y): Y is afternoon

The knowledge is represented by a predicate as:

(ヨx) (∀y) (A (Y) →b (x) ∧p (x)

(3) Defining predicates

NC (x): X is a new type of computer F (x): X speed Fast B (x): Large x capacity

The knowledge is represented by a predicate as:

(∀x) (NC (x) →f (x) ∧b (x)

(4) Defining predicates

S (x): x is computer student L (x,pragramming): x likes programming U (X,computer): X uses computer

The knowledge is represented by a predicate as:

(∀x) (S (x) →l (x,pragramming) ∧u (X,computer)

(5) Defining predicates

P (x): X is Human L (x, y): × likes y

To represent knowledge with predicates → as:

(∀x) (P (x) ∧l (x,pragramming) →l (X,computer)

2.11 Representation of farmers, wolves, goats, cabbage problems with predicate notation

The farmer, the wolf, the goat, the cabbage all on the left bank of a river, now to send them all to the right bank of the river, the farmer has a boat, when the river, in addition to the farmer outside the ship can carry a wolf, goat, cabbage in one. A wolf eats a goat, and a goat eats cabbage unless the farmer is there. Plan for a safe crossing across the river. Please write out the definition of the predicate used, and give the function of each predicate and the individual domain of the variable.

Solution: Define the predicate as follows:

AL (x): X on the Left Bank ¬al (x): represents x on the right bank

where X's individual domain is {farmer, wolf, goat, cabbage}

Initial state of the problem: Al (Farmer) Al (ship) Al (Wolf) Al (goat) al (cabbage)

Target State of the problem: ¬al (farmer) ¬al (ship) ¬al (Wolf) ¬al (goat) ¬al (cabbage)

Defines a predicate that describes an operation:

L-r: The farmer himself rowed from the left bank to the right bank l-r (x): The farmer takes X from the left bank to the right bank

R-l: The farmer himself rowed from right bank to left bank r-l (x): Farmer with X from right bank to left bank

where X's individual domain is {wolf, goat, cabbage}

For each of these operations, both the condition and the action are included. They correspond to the following conditions and actions:

L-r: Farmers rowing from the left bank to the right bank

Conditions: Al (ship), Al (Farmer), ¬al (Wolf) ∨¬al (sheep), ¬al (sheep) ∨¬al (cabbage)

Action: Delete table: Al (ship), Al (Farmer)

Add Table: ¬al (ship), ¬al (farmer)

L-r (Wolf): Farmer boating with wolves from left Bank to right bank

Conditions: Al (ship), Al (Farmer), AL (Wolf), ¬al (sheep)

Action: Delete table: Al (ship), Al (Farmer), AL (Wolf)

Add Table: ¬al (ship), ¬al (farmer), ¬al (Wolf)

L-r (sheep): Farmer boating from left bank to right bank with sheep

Conditions: Al (ship), Al (Farmer), Al (sheep), Al (Wolf), AL (cabbage)

Or: Al (ship), Al (Farmer), Al (sheep), ¬al (Wolf), ¬al (cabbage)

Action: Delete table: Al (ship), Al (Farmer), Al (sheep)

Added tables: ¬al (ship), ¬al (farmer), ¬al (sheep)

L-r (cabbage): Farmer boating from left bank to right bank with cabbage

Conditions: Al (ship), Al (Farmer), AL (cabbage), ¬al (Wolf)

Action: Delete table: Al (ship), Al (Farmer), AL (cabbage)

Add Table: ¬al (ship), ¬al (farmer), ¬al (cabbage)

R-l: Farmer boating from right bank to left bank

Conditions: ¬al (ship), ¬al (farmer), AL (Wolf) ∨al (sheep), Al (sheep) ∨al (cabbage)

Or: ¬al (ship), ¬al (farmer), ¬al (Wolf), ¬al (cabbage), AL (sheep)

Action: Delete table: ¬al (ship), ¬al (farmer)

Add Table: Al (ship), Al (Farmer)

R-l (sheep): Farmer boating from right bank to left Bank with sheep

Conditions: ¬al (ship), ¬al (farmer), ¬al (sheep), ¬al (Wolf), ¬al (sheep), AL (cabbage)

Action: Delete table: ¬al (ship), ¬al (farmer), ¬al (sheep)

Add Table: Al (ship), Al (Farmer), Al (sheep)

Problem Solving Process:

Al (Farmer) Al (Wolf) Al (Farmer) Al (cabbage)

Al (ship) Al (cabbage) Al (ship) ¬al (farmer)

Al (Wolf) l-r (goat) ¬al (farmer) r-l AL (Wolf) l-r (Wolf ) ¬al (ship) r-l (goat)

Al (Goat) ¬al (ship) Al (cabbage) ¬al (Wolf)

AL (cabbage) ¬al (goat) ¬al (goat) ¬al (sheep)

Al (Farmer) Al (Goat) Al (Farmer) ¬al (farmer)

Al (ship) ¬al (farmer) Al (ship) ¬al (ship)

Al (Goat) l-r (cabbage) ¬al (ship) r-l AL (goat) l-r ( goat) ¬al (goat)

AL (cabbage) ¬al (cabbage) ¬al (cabbage) ¬al (cabbage)

¬al (Wolf) ¬al (Wolf) ¬al (Wolf) ¬al (Wolf)

2.16 write out their semantic networks for the following propositions, respectively.

(1) Each student has a computer

(2) High teacher from March to July to the computer department students to talk about the "computer network" class

(3) Students in the class have a male and female, a graduate student, an undergraduate

(4) Innovation Company at 56th Hoi Hai Street, Liu Yang is the manager of the company, he is 32 years old, Master's degree

(5) The red team played football with the Blue team and ended with a 3:2 score.

2.17 write out their semantic networks for the following propositions, respectively.

(1) Trees and grasses are plants;

(2) Both the tree and the grass have leaves and roots

(3) Weeds are grass and grow in water

(4) fruit trees are trees and will result

(5) Pear tree is a kind of fruit tree, it will knot pear.

13 The second operation of the AI

Related Keywords:

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

• Sales Support

1 on 1 presale consultation

• After-Sales Support

24/7 Technical Support 6 Free Tickets per Quarter Faster Response

• Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.