Skip to content

Commit 1fc2576

Browse files
committed
Update: induction and abduction TV calc fix, plus the additional node probs in FlyingRaven.metta are not specified
1 parent 2ad87e3 commit 1fc2576

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

examples/FlyingRaven.metta

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
(= (STV (Concept Sam))
2-
(stv 0.333 1))
2+
(stv 0.2 1))
3+
4+
(= (STV (Concept Pingu))
5+
(stv 0.2 1))
6+
7+
(= (STV (Concept Penguin))
8+
(stv 0.2 1))
39

410
(= (STV (Concept Raven))
5-
(stv 0.333 1))
11+
(stv 0.2 1))
612

713
(= (STV (Concept Bird))
8-
(stv 0.333 1))
14+
(stv 0.2 1))
915

1016
(= (kb)
1117
(

src/Formulas.metta

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,27 @@
2323
(= (Truth_Induction (stv $sA $cA)
2424
(stv $sB $cB)
2525
(stv $sC $cC)
26-
(stv $sAB $cAB)
26+
(stv $sBA $cBA)
2727
(stv $sBC $cBC))
2828
(stv (+ (/ (* (* $sBA $sBC) $sB)
2929
$sA)
3030
(* (- 1 (/ (* $sBA $sB)
3131
$sA))
3232
(/ (- $sC (* $sB $sBC))
3333
(- 1 $sB))))
34-
(Truth_w2c (min $cAB $cBc)))) ;confidence TODO check
34+
(Truth_w2c (min $cBA $cBC)))) ;confidence TODO check
3535

3636
; Abduction formula: PLN book "Appendix A: Comparison of PLN Rules with NARS Rules", page 307
3737
(= (Truth_Abduction (stv $sA $cA)
3838
(stv $sB $cB)
3939
(stv $sC $cC)
4040
(stv $sAB $cAB)
41-
(stv $sBC $cBC))
41+
(stv $sCB $cCB))
4242
(stv (+ (/ (* (* $sAB $sCB) $sC)
4343
$sB)
44-
(/ (* sC (* (- 1 sAB) (- 1 sCB)))
45-
(- 1 sB)))
46-
(Truth_w2c (min $cAB $cBc)))) ;confidence TODO check
44+
(/ (* $sC (* (- 1 $sAB) (- 1 $sCB)))
45+
(- 1 $sB)))
46+
(Truth_w2c (min $cAB $cCB)))) ;confidence TODO check
4747

4848
;Modus Ponens: PLN book "5.7.1 Modus Ponens", page 111:
4949
(= (Truth_ModusPonens (stv $f1 $c1) (stv $f2 $c2))

src/Rules.metta

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@
2323
()))
2424

2525
;Deduction
26-
(= (|- ((Inheritance (Concept $A) (Concept $B)) $T1)
27-
((Inheritance (Concept $B) (Concept $C)) $T2))
28-
((Inheritance (Concept $A) (Concept $C))
26+
(= (|- ((Inheritance (Concept $A)
27+
(Concept $B)) $T1)
28+
((Inheritance (Concept $B)
29+
(Concept $C)) $T2))
30+
((Inheritance (Concept $A)
31+
(Concept $C))
2932
(Truth_Deduction (STV (Concept $A))
3033
(STV (Concept $B))
3134
(STV (Concept $C)) $T1 $T2)))

0 commit comments

Comments
 (0)