This is assingment from Artificial Intelligence class What is a first-order defi
ID: 3814464 • Letter: T
Question
This is assingment from Artificial Intelligence class
What is a first-order definite clause? Construct a knowledge base KB consisting of the following sentences expressed as first-order definite clauses: The law says that it is a crime for an American to sell weapons to hostile nations. The country Nono, an enemy of America, has some missiles, and all of its missiles were sold to it by Colonel West, who is American. Prove that KB entails Criminal (West) using resolution. Steps to follow: 1. First convert each sentence in KB to CNF. 2. Then apply resolution to make the inference.Explanation / Answer
a)First-order definite clause grammar is a way of representing grammar for formal languages, in a logic programming language.
It is related to attribute grammars which Prolog was originally developed. Since they are called definite clause grammars as they represent a grammar as a set of definite clauses in first-order logic.
B. Based on KB, the sentences of given example is expressed as
first-order definite clause as follows.Forward chaining is a method in first-clause defination that begins by separating into two categories:
Rules: Rules are the nothingbut statements that have an implication to be used.
Facts: These are atomic statements that establish our system's knowledge of the environment
KB =
1. (American(x) Weapon(y) Sells(x, y, z) Hostile(z)) Criminal(x)
2. Owns(Nono, M1)
3. Missile(M1)
4. (Missile(x) Owns(Nono, x)) Sells(West, x, Nono)
5. Missile(x) Weapon(x)
6. Enemy(x, America) Hostile(x)
7. American(West)
8. Enemy(Nono, America)
= Criminal(West)
By deviding above KB,
c) KB =
; Rules:
1. (American(x) Weapon(y) Sells(x, y, z) Hostile(z)) Criminal(x)
4. (Missile(x) Owns(Nono, x)) Sells(West, x, Nono)
5. Missile(x) Weapon(x)
6. Enemy(x, America) Hostile(x)
; Facts:
2. Owns(Nono, M1)
3. Missile(M1)
7. American(West)
8. Enemy(Nono, America)
Our KB consists only of definite clauses, forward chaining gives it as the following steps.
Starting with your facts, satisfying over any rule that they can match completely and add those to your forward-chaining.
Once you've unified all the rules you can using starting facts, take another ground found in step 1, add them to your facts, and try again.
Stop when you reach one of two conditions: (a) you derive the ground term equal to your query, or (b) you generate no new terms between iterations.
So, let's try this out on our example above!
; Forward Chaining Iteration 1
KB =
; Rules:
1. (American(x) Weapon(y) Sells(x, y, z) Hostile(z)) Criminal(x)
4. (Missile(x) Owns(Nono, x)) Sells(West, x, Nono)
5. Missile(x) Weapon(x)
6. Enemy(x, America) Hostile(x)
; Facts:
2. Owns(Nono, M1)
3. Missile(M1)
7. American(West)
8. Enemy(Nono, America)
In aabove current iteration, we don't yet use any of the new facts hence these will be used in the next iteration.
Forward Chaining Iteration 2
KB =
; Rules:
1. (American(x) Weapon(y) Sells(x, y, z) Hostile(z)) Criminal(x)
4. (Missile(x) Owns(Nono, x)) Sells(West, x, Nono)
5. Missile(x) Weapon(x)
6. Enemy(x, America) Hostile(x)
; Facts:
2. Owns(Nono, M1)
3. Missile(M1)
7. American(West)
8. Enemy(Nono, America)
9. Weapon(M1) [Rule 3, Fact 5, = { x/M1 }]
10. Sells(West, M1, Nono) [Rule 4, Fact 2, Fact 3, = { x/M1 }]
11. Hostile(Nono) [Rule 6, Fact 8, = { x/Nono }]
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.