PLN demo involving deductive and abductive reasoning. Self is looking for an amusing and honest friend and infers that Bob would be one based on his actions and the fact that friends tend to be honest.
Bob is a human.
I am a human.
I am honest.
I know Bob.
Friends tend to be honest.
People who told the truth about something are honest.
People who told a joke to someone, somewhere, are funny.
Being funny is loosely equivalent to being amusing.
Bob told Jill the truth about the party.
Bob told Jim a joke at the party.
Probability of two humans being acquaintances: .0002
Probability of a person being honest: .8
Probability of being funny: .69
The probability of random things (typically humans) being friends: .0001
The probablity of turning acquaintance into friendship between humans: .01
show more
Atomese |
---|
;; Kownledge base for the amusing friend demo. ;;;;;;;;;;;;; ;; Probability of being honest ;; Probability that two things are honest ;; Probability of telling the truth to someone. The probability if ;; We need also the following. It should normally be wrapped in a ;; People who told the truth about something are honest ;;;;;;;;;;;;;; ;; Probability of two human acquaintances ;;;;;;;;; ;; Bob is a human ;;;;;;;;;; ;; I am a human ;; I am honest ;; I know Bob ;;;;;;;;;;;;;;;; ;; The probability of random things (typically humans) being friends ;; Friendship is symmetric ;; I'm disabling that to simplify the inference. Ultimately the only ;; The probablity of turning acquaintance into friendship between ;; Friends tend to be honest ;;;;;;;;;;;;;;;;; ;; Probability of telling a joke to someone. The probability is ;; The following should be wrapped in a Lambda and ultimately ;; Probability of being funny ;; Same remark as for Predicate "told-a-joke-at" ;; People who told a joke to someone, somewhere, are funny ;; Being funny is loosely equivalent to being amusing ;;;;;;;;;;;;;;; ;; Bob told Jill the truth about the party
;;;;;;;;;; ;; Due to the fact the evaluator does not support fuzzy TV semantic we ;; Because implication-instantiation occurs on the sugar syntax, the |
PLN Rule | Atomese |
---|---|
implication-total-instantiation-rule: ImplicationScopeLink V P Q T |- Q[V->T] where V is a variable or a list of variables, P is a condition, Q is the implicand, T is an atom (or a list of atoms) to substitute and Q[V->T] is Q where V has been substituted by T. |
Antecedents: ;; People who told the truth about something are honest |
Atomspace representation transformation
Distribute the scope of the implication that friends tend to be honest in the KB, applying implication-scope-to-implication-rule.
PLN Rule | Atomese |
---|---|
implication-scope-to-implication-rule: ImplicationScopeLink V P Q |- ImplicationLink LambdaLink V P LambdaLink V Q where V is a variable or a list of variables, P and Q are the implicant and implicand bodies. |
Antecedent: Conclusion (2): (ImplicationLink (stv 0.85000002 0.5) (LambdaLink (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (EvaluationLink (PredicateNode "will-be-friends" (stv 9.9999997e-05 0.89999998)) (ListLink (VariableNode "$X") (VariableNode "$Y") ) ) ) (LambdaLink (stv 0.63999999 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (AndLink (EvaluationLink (PredicateNode "is-honest" (stv 0.80000001 0.89999998)) (VariableNode "$X") ) (EvaluationLink (PredicateNode "is-honest" (stv 0.80000001 0.89999998)) (VariableNode "$Y") ) ) ) )
|
Atomspace representation transformation
Infer the TV of the implicant of conclusion (2) using predicate-lambda-introduction-rule.
PLN Rule | Atomese |
---|---|
predicate-lambda-introduction-rule: |
Antecedent: |
Atomspace representation transformation
Infer the TV of the implicand of conclusion (2) using predicate-lambda-introduction-rule.
PLN Rule | Atomese |
---|---|
predicate-lambda-introduction-rule: |
Conclusion (4): |
Infer that honest people are more likely to become friends.
PLN Rule | Atomese |
---|---|
InversionRule: ImplicationLink A B |- ImplicationLink B A |
Antecedent: |
Atomspace representation transformation
PLN Rule | Atomese |
---|---|
implication-scope-to-implication-rule: ImplicationScopeLink V P Q |- ImplicationLink LambdaLink V P LambdaLink V Q where V is a variable or a list of variables, P and Q are the implicant and implicand bodies. |
Conclusion (6): (ImplicationLink (stv 0.1 0.5) (LambdaLink (stv 0.00019999999 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (AndLink (InheritanceLink (VariableNode "$X") (ConceptNode "human") ) (InheritanceLink (VariableNode "$Y") (ConceptNode "human") ) (EvaluationLink (PredicateNode "acquainted") (ListLink (VariableNode "$X") (VariableNode "$Y") ) ) ) ) (LambdaLink (stv 9.9999997e-05 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (EvaluationLink (PredicateNode "will-be-friends" (stv 9.9999997e-05 0.89999998)) (ListLink (VariableNode "$X") (VariableNode "$Y") ) ) ) ) |
Infer that honest human acquaintances tend to become friends (more so than just human acquaintances).
PLN Rule | Atomese |
---|---|
implication-implicant-conjunction-rule: ImplicationLink <TV1> A C ImplicationLink <TV2> B C |- ImplicationLink <TV> AndLink A B C |
Conclusion (7): (ImplicationLink (stv 0.13281251 0.44999999) (AndLink (stv 0.000128 0.89999998) (LambdaLink (stv 0.63999999 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (AndLink (EvaluationLink (PredicateNode "is-honest" (stv 0.80000001 0.89999998)) (VariableNode "$X") ) (EvaluationLink (PredicateNode "is-honest" (stv 0.80000001 0.89999998)) (VariableNode "$Y") ) ) ) (LambdaLink (stv 0.00019999999 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (AndLink (InheritanceLink (VariableNode "$X") (ConceptNode "human") ) (InheritanceLink (VariableNode "$Y") (ConceptNode "human") ) (EvaluationLink (PredicateNode "acquainted") (ListLink (VariableNode "$X") (VariableNode "$Y") ) ) ) ) ) (LambdaLink (stv 9.9999997e-05 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (EvaluationLink (PredicateNode "will-be-friends" (stv 9.9999997e-05 0.89999998)) (ListLink (VariableNode "$X") (VariableNode "$Y") ) ) ) ) |
Atomspace representation transformation
PLN Rule | Atomese |
---|---|
and-lambda-factorization-double-implication-rule: AndLink LambdaLink V A1 ... LambdaLink V An |- LambdaLink V AndLink A1 ... An |
Conclusion (8): (ImplicationLink (stv 1 1) (LambdaLink (stv 0.000128 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (AndLink (stv 0.000128 0.89999998) (EvaluationLink (PredicateNode "is-honest" (stv 0.80000001 0.89999998)) (VariableNode "$X") ) (EvaluationLink (PredicateNode "is-honest" (stv 0.80000001 0.89999998)) (VariableNode "$Y") ) (InheritanceLink (VariableNode "$X") (ConceptNode "human") ) (InheritanceLink (VariableNode "$Y") (ConceptNode "human") ) (EvaluationLink (PredicateNode "acquainted") (ListLink (VariableNode "$X") (VariableNode "$Y") ) ) ) ) (AndLink (stv 0.000128 0.89999998) (LambdaLink (stv 0.63999999 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (AndLink (EvaluationLink (PredicateNode "is-honest" (stv 0.80000001 0.89999998)) (VariableNode "$X") ) (EvaluationLink (PredicateNode "is-honest" (stv 0.80000001 0.89999998)) (VariableNode "$Y") ) ) ) (LambdaLink (stv 0.00019999999 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (AndLink (InheritanceLink (VariableNode "$X") (ConceptNode "human") ) (InheritanceLink (VariableNode "$Y") (ConceptNode "human") ) (EvaluationLink (PredicateNode "acquainted") (ListLink (VariableNode "$X") (VariableNode "$Y") ) ) ) ) ) ) |
Atomspace representation transformation
PLN Rule | Atomese |
---|---|
deduction-implication-rule: ImplicationLink A B ImplicationLink B C |- ImplicationLink A C |
Conclusion (9): (ImplicationLink (stv 0.13281251 0.405) (LambdaLink (stv 0.000128 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (AndLink (stv 0.000128 0.89999998) (EvaluationLink (PredicateNode "is-honest" (stv 0.80000001 0.89999998)) (VariableNode "$X") ) (EvaluationLink (PredicateNode "is-honest" (stv 0.80000001 0.89999998)) (VariableNode "$Y") ) (InheritanceLink (VariableNode "$X") (ConceptNode "human") ) (InheritanceLink (VariableNode "$Y") (ConceptNode "human") ) (EvaluationLink (PredicateNode "acquainted") (ListLink (VariableNode "$X") (VariableNode "$Y") ) ) ) ) (LambdaLink (stv 9.9999997e-05 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) ) (EvaluationLink (PredicateNode "will-be-friends" (stv 9.9999997e-05 0.89999998)) (ListLink (VariableNode "$X") (VariableNode "$Y") ) ) ) ) |
Infer that Bob may become a friend.
PLN Rule | Atomese |
---|---|
implication-total-instantiation-rule: ImplicationScopeLink V P Q T |- Q[V->T] where V is a variable or a list of variables, P is a condition, Q is the implicand, T is an atom (or a list of atoms) to substitute and Q[V->T] is Q where V has been substituted by T. |
Conclusion (10): ;; Bob and I will become friends. (EvaluationLink (stv 0.13281251 0.36445335) (PredicateNode "will-be-friends" (stv 9.9999997e-05 0.89999998)) (ListLink (ConceptNode "Self") (ConceptNode "Bob") ) ) |
Infer that Bob is funny.
PLN Rule | Atomese |
---|---|
implication-total-instantiation-rule: ImplicationScopeLink V P Q T |- Q[V->T] where V is a variable or a list of variables, P is a condition, Q is the implicand, T is an atom (or a list of atoms) to substitute and Q[V->T] is Q where V has been substituted by T. |
Antecedents: ;; people who tell jokes are funny (ImplicationScopeLink (stv 0.80000001 0.89999998) (VariableList (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Y") (TypeNode "ConceptNode") ) (TypedVariableLink (VariableNode "$Z") (TypeNode "ConceptNode") ) ) (EvaluationLink (stv 1e-06 0.60000002) (PredicateNode "told-a-joke-at" (stv 1e-06 0.60000002)) (ListLink (VariableNode "$X") (VariableNode "$Y") (VariableNode "$Z") ) ) (EvaluationLink (stv 0.69 0.69999999) (PredicateNode "is-funny" (stv 0.69 0.69999999)) (VariableNode "$X") ) ) ;; Bob told jim a joke at the party. (EvaluationLink (stv 1 1) (PredicateNode "told-a-joke-at" (stv 1e-06 0.60000002)) (ListLink (ConceptNode "Bob") (ConceptNode "Jim") (ConceptNode "Party") ) Conclusion (11): ;; Bob is funny. (EvaluationLink (stv 0.80000001 0.89999908) (PredicateNode "is-funny" (stv 0.69 0.69999999)) (ConceptNode "Bob") ) |
Atomspace representation transformation
PLN Rule | Atomese |
---|---|
equivalence-scope-distribution-rule: EquivalenceLink V P Q |- EquivalenceLink LambdaLink V P LambdaLink V Q where V is a variable or a list of variables, P and Q are the implicant and implicand bodies. |
Conclusion (12): (EquivalenceLink (stv 0.69999999 0.89999998) (LambdaLink (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (EvaluationLink (stv 0.69 0.69999999) (PredicateNode "is-funny" (stv 0.69 0.69999999)) (VariableNode "$X") ) ) (LambdaLink (TypedVariableLink (VariableNode "$X") (TypeNode "ConceptNode") ) (EvaluationLink (PredicateNode "is-amusing") (VariableNode "$X") ) ) ) |
Infer that if X is funny, then X is amusing.
Apply the equivalence-to-implication-rule on (12).
Being funny is similar to being amusing.
|-
If X is funny, then X is amusing.
PLN Rule | Atomese |
---|---|
equivalence-to-implication-rule: Equivalence |
Conclusion (13): ;; If X is funny, then X is amusing.
|
Infer that Bob is amusing.
Apply implication-total-instantiation on the result of (13).
(13) If X is funny, then X is amusing.
(11) Bob is funny.
|-
(14) Bob is amusing.
PLN Rule | Atomese |
---|---|
implication-total-instantiation-rule: |
Conclusion (14): ;;Bob is amusing |
Infer that Bob will be an amusing and honest friend.
Apply the and-introduction-rule over the results of (10), (11) and (14)
(10) Bob and I will become friends.
(1) Bob is honest.
(14) Bob is amusing
|-
(15) Bob will be an amusing and honest friend.
PLN Rule | Atomese |
---|---|
and-introduction-rule: A<TV1> |
Conclusion (15): ;; Bob will be an amusing and honest friend. |