Created
March 17, 2015 02:45
-
-
Save koo5/9b9aa29505a98670b2be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kook@databox ~/o/n/t/classes> | |
kook@databox ~/o/n/t/classes> java -jar ~/jython2.7b4/jython.jar test.py | |
SLF4J: The requested version 1.5.6 by your slf4j binding is not compatible with [1.6, 1.7] | |
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details. | |
[[u'=|>'], [u'=/>']] | |
[[u'$', <class '__main__.Word'>], [u'#', <__main__.optional object at 0x2>], [u'?', <__main__.optional object at 0x3>]] | |
[[u'$', <class '__main__.Word'>], [u'#'], [u'?', <__main__.optional object at 0x3>], [u'#', <class '__main__.Word'>]] | |
[[u'$', <class '__main__.Word'>], [u'#'], [u'?'], [u'#', <class '__main__.Word'>], [u'?', <class '__main__.Word'>]] | |
[[u'$', sym{u'type': <class '__main__.Number'>, u'name': 'priority'}, <__main__.optional object at 0x4>, u'$']] | |
[[u'$', sym{u'type': <class '__main__.Number'>, u'name': 'priority'}, u'$'], [u'$', sym{u'type': <class '__main__.Number'>, u'name': 'priority'}, u';', sym{u'type': <class '__main__.Number'>, u'name': 'durability'}, u'$']] | |
[[u'<', sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'subject'}, <class '__main__.Copula'>, sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'predicate'}, u'>']] | |
[[<type 'nars.logic.entity.Statement'>, u'.', <__main__.optional object at 0x5>, <__main__.optional object at 0x6>], [<type 'nars.logic.entity.Statement'>, u'?', <__main__.optional object at 0x7>], [<type 'nars.logic.entity.Statement'>, u'@', <__main__.optional object at 0x8>], [<type 'nars.logic.entity.Statement'>, u'!', <__main__.optional object at 0x9>]] | |
[[<type 'nars.logic.entity.Statement'>, u'.', <__main__.optional object at 0x6>], [<type 'nars.logic.entity.Statement'>, u'?', <__main__.optional object at 0x7>], [<type 'nars.logic.entity.Statement'>, u'@', <__main__.optional object at 0x8>], [<type 'nars.logic.entity.Statement'>, u'!', <__main__.optional object at 0x9>], [<type 'nars.logic.entity.Statement'>, u'.', <class '__main__.Tense'>, <__main__.optional object at 0x6>]] | |
[[<type 'nars.logic.entity.Statement'>, u'.'], [<type 'nars.logic.entity.Statement'>, u'?', <__main__.optional object at 0x7>], [<type 'nars.logic.entity.Statement'>, u'@', <__main__.optional object at 0x8>], [<type 'nars.logic.entity.Statement'>, u'!', <__main__.optional object at 0x9>], [<type 'nars.logic.entity.Statement'>, u'.', <class '__main__.Tense'>, <__main__.optional object at 0x6>], [<type 'nars.logic.entity.Statement'>, u'.', <type 'nars.logic.entity.TruthValue'>]] | |
[[<type 'nars.logic.entity.Statement'>, u'.'], [<type 'nars.logic.entity.Statement'>, u'?'], [<type 'nars.logic.entity.Statement'>, u'@', <__main__.optional object at 0x8>], [<type 'nars.logic.entity.Statement'>, u'!', <__main__.optional object at 0x9>], [<type 'nars.logic.entity.Statement'>, u'.', <class '__main__.Tense'>, <__main__.optional object at 0x6>], [<type 'nars.logic.entity.Statement'>, u'.', <type 'nars.logic.entity.TruthValue'>], [<type 'nars.logic.entity.Statement'>, u'?', <class '__main__.Tense'>]] | |
[[<type 'nars.logic.entity.Statement'>, u'.'], [<type 'nars.logic.entity.Statement'>, u'?'], [<type 'nars.logic.entity.Statement'>, u'@'], [<type 'nars.logic.entity.Statement'>, u'!', <__main__.optional object at 0x9>], [<type 'nars.logic.entity.Statement'>, u'.', <class '__main__.Tense'>, <__main__.optional object at 0x6>], [<type 'nars.logic.entity.Statement'>, u'.', <type 'nars.logic.entity.TruthValue'>], [<type 'nars.logic.entity.Statement'>, u'?', <class '__main__.Tense'>], [<type 'nars.logic.entity.Statement'>, u'@', <class '__main__.Tense'>]] | |
[[<type 'nars.logic.entity.Statement'>, u'.'], [<type 'nars.logic.entity.Statement'>, u'?'], [<type 'nars.logic.entity.Statement'>, u'@'], [<type 'nars.logic.entity.Statement'>, u'!'], [<type 'nars.logic.entity.Statement'>, u'.', <class '__main__.Tense'>, <__main__.optional object at 0x6>], [<type 'nars.logic.entity.Statement'>, u'.', <type 'nars.logic.entity.TruthValue'>], [<type 'nars.logic.entity.Statement'>, u'?', <class '__main__.Tense'>], [<type 'nars.logic.entity.Statement'>, u'@', <class '__main__.Tense'>], [<type 'nars.logic.entity.Statement'>, u'!', <type 'nars.logic.entity.TruthValue'>]] | |
[[<type 'nars.logic.entity.Statement'>, u'.'], [<type 'nars.logic.entity.Statement'>, u'?'], [<type 'nars.logic.entity.Statement'>, u'@'], [<type 'nars.logic.entity.Statement'>, u'!'], [<type 'nars.logic.entity.Statement'>, u'.', <class '__main__.Tense'>], [<type 'nars.logic.entity.Statement'>, u'.', <type 'nars.logic.entity.TruthValue'>], [<type 'nars.logic.entity.Statement'>, u'?', <class '__main__.Tense'>], [<type 'nars.logic.entity.Statement'>, u'@', <class '__main__.Tense'>], [<type 'nars.logic.entity.Statement'>, u'!', <type 'nars.logic.entity.TruthValue'>], [<type 'nars.logic.entity.Statement'>, u'.', <class '__main__.Tense'>, <type 'nars.logic.entity.TruthValue'>]] | |
[[u'eternal'], [u':/:'], [u':|:'], [u':\\:']] | |
[[sym{u'type': u'copuled', u'name': 'copuled'}], [<type 'nars.logic.entity.Term'>], [<type 'nars.logic.nal8.Operation'>]] | |
[[u'{', <type 'nars.logic.entity.Term'>, <__main__.oneormore object at 0xa>, u'}'], [u'[', <type 'nars.logic.entity.Term'>, <__main__.oneormore object at 0xb>, u']'], [u'(&,', <type 'nars.logic.entity.Term'>, <__main__.oneormore object at 0xc>, u')'], [u'(|,', <type 'nars.logic.entity.Term'>, <__main__.oneormore object at 0xd>, u')'], [u'(-,', <type 'nars.logic.entity.Term'>, u',', <type 'nars.logic.entity.Term'>, u')'], [u'(~,', <type 'nars.logic.entity.Term'>, u',', <type 'nars.logic.entity.Term'>, u')'], [u'(*,', <type 'nars.logic.entity.Term'>, <__main__.oneormore object at 0xe>, u')'], [u'(/,', <type 'nars.logic.entity.Term'>, <__main__.oneormore object at 0xf>, u')'], [u'(\\,', <type 'nars.logic.entity.Term'>, <__main__.oneormore object at 0x10>, u')'], [u'(--,', <type 'nars.logic.entity.Term'>, u')'], [u'(||,', <type 'nars.logic.entity.Term'>, <__main__.oneormore object at 0x11>, u')'], [u'(&&,', <type 'nars.logic.entity.Term'>, <__main__.oneormore object at 0x12>, u')'], [u'(&/,', <type 'nars.logic.entity.Term'>, <__main__.oneormore object at 0x13>, u')'], [u'(&|,', <type 'nars.logic.entity.Term'>, <__main__.oneormore object at 0x14>, u')']] | |
[[<class '__main__.Word'>], [<type 'nars.logic.entity.Variable'>], [<type 'nars.logic.entity.CompoundTerm'>], [<type 'nars.logic.entity.Statement'>]] | |
[[u'-->'], [u'<->'], [u'{--'], [u'--]'], [u'{-]'], [u'==>'], [u'=/>'], [u'=|>'], [u'=\\>'], [u'<=>'], [u'</>'], [u'<|>']] | |
[[u'%', sym{u'type': <class '__main__.Number'>, u'name': 'frequency'}, <__main__.optional object at 0x15>, u'%']] | |
[[u'%', sym{u'type': <class '__main__.Number'>, u'name': 'frequency'}, u'%'], [u'%', sym{u'type': <class '__main__.Number'>, u'name': 'frequency'}, u';', sym{u'type': <class '__main__.Number'>, u'name': 'confidence'}, u'%']] | |
[[<__main__.optional object at 0x16>, <type 'nars.logic.entity.Sentence'>]] | |
[[<type 'nars.logic.entity.Sentence'>], [<type 'nars.logic.entity.BudgetValue'>, <type 'nars.logic.entity.Sentence'>]] | |
[[u'(^', <class '__main__.Word'>, <__main__.oneormore object at 0x17>, u')']] | |
hi, output: | |
/home/kook/opennars/nal/conditioning/forward_conditioning.nal | |
input://innate goal: if cheese is here, pick it | |
input:<<{cheese} --> [here]> =|> (^pick,cheese)>! | |
nars:$0.90;0.90;0.95$ <<{cheese} --> [here]> =|> (^pick,cheese,SELF)>! %1.00;0.90% | |
node:{ | |
"kids": { | |
"budget": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x1e>", | |
"priority": "<__main__.Number object at 0x1f>" | |
}, | |
"rule": "<type 'nars.logic.entity.BudgetValue'>", | |
"self": "<__main__.Syntaxed object at 0x1b>" | |
}, | |
"sentence": { | |
"kids": { | |
"statement": { | |
"kids": {}, | |
"rule": "<type 'nars.logic.nal5.Implication'>", | |
"self": "<__main__.Syntaxed object at 0x24>" | |
}, | |
"tense": { | |
"kids": {}, | |
"rule": "<class '__main__.Tense'>", | |
"self": "<__main__.Syntaxed object at 0x27>" | |
}, | |
"truth": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x2d>", | |
"priority": "<__main__.Number object at 0x2e>" | |
}, | |
"rule": "<type 'nars.logic.entity.TruthValue'>", | |
"self": "<__main__.Syntaxed object at 0x2a>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Sentence'>", | |
"self": "<__main__.Syntaxed object at 0x21>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Task'>", | |
"self": "<__main__.Syntaxed object at 0x18>" | |
} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Sentence'>, u'name': 'sentence'} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Statement'>, u'name': 'statement'} | |
verbalizing u'=|>' | |
verbalizing u'.' | |
back:=|>. | |
input://light is on, cheese is here | |
input:<{light} --> [on]>. :|: | |
nars:$0.80;0.50;0.95$ <{light} --> [on]>. %1.00;0.90% {-2147483647+2147483647} | |
node:{ | |
"kids": { | |
"budget": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x38>", | |
"priority": "<__main__.Number object at 0x39>" | |
}, | |
"rule": "<type 'nars.logic.entity.BudgetValue'>", | |
"self": "<__main__.Syntaxed object at 0x35>" | |
}, | |
"sentence": { | |
"kids": { | |
"statement": { | |
"kids": { | |
"copula": { | |
"kids": {}, | |
"rule": "<class '__main__.Copula'>", | |
"self": "<__main__.Syntaxed object at 0x40>" | |
}, | |
"predicate": { | |
"kids": { | |
"term": "<__main__.Word object at 0x46>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0x43>" | |
}, | |
"subject": { | |
"kids": { | |
"term": "<__main__.Word object at 0x4b>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0x48>" | |
} | |
}, | |
"rule": "copuled", | |
"self": "<__main__.Syntaxed object at 0x3d>" | |
}, | |
"tense": { | |
"kids": {}, | |
"rule": "<class '__main__.Tense'>", | |
"self": "<__main__.Syntaxed object at 0x4c>" | |
}, | |
"truth": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x51>", | |
"priority": "<__main__.Number object at 0x52>" | |
}, | |
"rule": "<type 'nars.logic.entity.TruthValue'>", | |
"self": "<__main__.Syntaxed object at 0x4e>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Sentence'>", | |
"self": "<__main__.Syntaxed object at 0x3a>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Task'>", | |
"self": "<__main__.Syntaxed object at 0x32>" | |
} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Sentence'>, u'name': 'sentence'} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Statement'>, u'name': 'statement'} | |
verbalizing u'<' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'subject'} | |
verbalizing u'{' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xa> | |
verbalizing u'}' | |
verbalizing sym{u'type': <class '__main__.Copula'>, u'name': 'copula'} | |
verbalizing u'-->' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'predicate'} | |
verbalizing u'[' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xb> | |
verbalizing u']' | |
verbalizing u'>' | |
verbalizing u'.' | |
back:<{light}-->[on]>. | |
input:6 | |
input:<{cheese} --> [here]>. :|: | |
nars:$0.80;0.50;0.95$ <{cheese} --> [here]>. %1.00;0.90% {-2147483647+2147483647} | |
node:{ | |
"kids": { | |
"budget": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x59>", | |
"priority": "<__main__.Number object at 0x5a>" | |
}, | |
"rule": "<type 'nars.logic.entity.BudgetValue'>", | |
"self": "<__main__.Syntaxed object at 0x56>" | |
}, | |
"sentence": { | |
"kids": { | |
"statement": { | |
"kids": { | |
"copula": { | |
"kids": {}, | |
"rule": "<class '__main__.Copula'>", | |
"self": "<__main__.Syntaxed object at 0x61>" | |
}, | |
"predicate": { | |
"kids": { | |
"term": "<__main__.Word object at 0x66>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0x63>" | |
}, | |
"subject": { | |
"kids": { | |
"term": "<__main__.Word object at 0x6a>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0x67>" | |
} | |
}, | |
"rule": "copuled", | |
"self": "<__main__.Syntaxed object at 0x5e>" | |
}, | |
"tense": { | |
"kids": {}, | |
"rule": "<class '__main__.Tense'>", | |
"self": "<__main__.Syntaxed object at 0x6b>" | |
}, | |
"truth": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x70>", | |
"priority": "<__main__.Number object at 0x71>" | |
}, | |
"rule": "<type 'nars.logic.entity.TruthValue'>", | |
"self": "<__main__.Syntaxed object at 0x6d>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Sentence'>", | |
"self": "<__main__.Syntaxed object at 0x5b>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Task'>", | |
"self": "<__main__.Syntaxed object at 0x53>" | |
} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Sentence'>, u'name': 'sentence'} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Statement'>, u'name': 'statement'} | |
verbalizing u'<' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'subject'} | |
verbalizing u'{' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xa> | |
verbalizing u'}' | |
verbalizing sym{u'type': <class '__main__.Copula'>, u'name': 'copula'} | |
verbalizing u'-->' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'predicate'} | |
verbalizing u'[' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xb> | |
verbalizing u']' | |
verbalizing u'>' | |
verbalizing u'.' | |
back:<{cheese}-->[here]>. | |
input:20 | |
input://light is on: | |
input:<{light} --> [on]>. :|: | |
nars:$0.80;0.50;0.95$ <{light} --> [on]>. %1.00;0.90% {-2147483647+2147483647} | |
node:{ | |
"kids": { | |
"budget": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x78>", | |
"priority": "<__main__.Number object at 0x79>" | |
}, | |
"rule": "<type 'nars.logic.entity.BudgetValue'>", | |
"self": "<__main__.Syntaxed object at 0x75>" | |
}, | |
"sentence": { | |
"kids": { | |
"statement": { | |
"kids": { | |
"copula": { | |
"kids": {}, | |
"rule": "<class '__main__.Copula'>", | |
"self": "<__main__.Syntaxed object at 0x80>" | |
}, | |
"predicate": { | |
"kids": { | |
"term": "<__main__.Word object at 0x85>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0x82>" | |
}, | |
"subject": { | |
"kids": { | |
"term": "<__main__.Word object at 0x89>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0x86>" | |
} | |
}, | |
"rule": "copuled", | |
"self": "<__main__.Syntaxed object at 0x7d>" | |
}, | |
"tense": { | |
"kids": {}, | |
"rule": "<class '__main__.Tense'>", | |
"self": "<__main__.Syntaxed object at 0x8a>" | |
}, | |
"truth": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x8f>", | |
"priority": "<__main__.Number object at 0x90>" | |
}, | |
"rule": "<type 'nars.logic.entity.TruthValue'>", | |
"self": "<__main__.Syntaxed object at 0x8c>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Sentence'>", | |
"self": "<__main__.Syntaxed object at 0x7a>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Task'>", | |
"self": "<__main__.Syntaxed object at 0x72>" | |
} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Sentence'>, u'name': 'sentence'} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Statement'>, u'name': 'statement'} | |
verbalizing u'<' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'subject'} | |
verbalizing u'{' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xa> | |
verbalizing u'}' | |
verbalizing sym{u'type': <class '__main__.Copula'>, u'name': 'copula'} | |
verbalizing u'-->' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'predicate'} | |
verbalizing u'[' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xb> | |
verbalizing u']' | |
verbalizing u'>' | |
verbalizing u'.' | |
back:<{light}-->[on]>. | |
input:100 | |
input://todo: this check is not sufficient, check trace for | |
input:// | |
input:''outputMustContain('^pick([cheese, SELF])=null') | |
input:''outputMustContain('(^pick,cheese)! %1.00;0.06%') | |
input://TODO allow check trace: ''outputMustContain('(^pick,cheese)! %1.00;0.06% {35 : 1;2;2;1;2;0<<{cheese} --> [here]> =\> (&/,<{light} --> [on]>,+3)>;(&/,<{light} --> [on]>,+3)}') | |
input://cheese is expected | |
input:''outputMustContain('<{cheese} --> [here]>. :/: %1.00;0.21%') | |
input://''outputMustContain('<{cheese} --> [here]>. :/: %1.00;0.22% {43|55 : 1;3;1;2<{light} --> [on]>;<(&/,<{light} --> [on]>,+3) =/> <{cheese} --> [here]>>}') | |
input://disappointment: | |
input://''outputMustContain('<(&/,<{light} --> [on]>,+3) =/> <{cheese} --> [here]>>. %1.00;0.31%') | |
/home/kook/opennars/nal/conditioning/simultaneous_conditioning.nal | |
input://innate goal: if cheese is here, pick it | |
input:<<{cheese} --> [here]> =|> (^pick,cheese)>! | |
nars:$0.90;0.90;0.95$ <<{cheese} --> [here]> =|> (^pick,cheese,SELF)>! %1.00;0.90% | |
node:{ | |
"kids": { | |
"budget": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x97>", | |
"priority": "<__main__.Number object at 0x98>" | |
}, | |
"rule": "<type 'nars.logic.entity.BudgetValue'>", | |
"self": "<__main__.Syntaxed object at 0x94>" | |
}, | |
"sentence": { | |
"kids": { | |
"statement": { | |
"kids": {}, | |
"rule": "<type 'nars.logic.nal5.Implication'>", | |
"self": "<__main__.Syntaxed object at 0x9c>" | |
}, | |
"tense": { | |
"kids": {}, | |
"rule": "<class '__main__.Tense'>", | |
"self": "<__main__.Syntaxed object at 0x9e>" | |
}, | |
"truth": { | |
"kids": { | |
"durability": "<__main__.Number object at 0xa3>", | |
"priority": "<__main__.Number object at 0xa4>" | |
}, | |
"rule": "<type 'nars.logic.entity.TruthValue'>", | |
"self": "<__main__.Syntaxed object at 0xa0>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Sentence'>", | |
"self": "<__main__.Syntaxed object at 0x99>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Task'>", | |
"self": "<__main__.Syntaxed object at 0x91>" | |
} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Sentence'>, u'name': 'sentence'} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Statement'>, u'name': 'statement'} | |
verbalizing u'=|>' | |
verbalizing u'.' | |
back:=|>. | |
input://light is on, cheese is here | |
input:<{light} --> [on]>. :|: | |
nars:$0.80;0.50;0.95$ <{light} --> [on]>. %1.00;0.90% {-2147483647+2147483647} | |
node:{ | |
"kids": { | |
"budget": { | |
"kids": { | |
"durability": "<__main__.Number object at 0xab>", | |
"priority": "<__main__.Number object at 0xac>" | |
}, | |
"rule": "<type 'nars.logic.entity.BudgetValue'>", | |
"self": "<__main__.Syntaxed object at 0xa8>" | |
}, | |
"sentence": { | |
"kids": { | |
"statement": { | |
"kids": { | |
"copula": { | |
"kids": {}, | |
"rule": "<class '__main__.Copula'>", | |
"self": "<__main__.Syntaxed object at 0xb3>" | |
}, | |
"predicate": { | |
"kids": { | |
"term": "<__main__.Word object at 0xb8>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0xb5>" | |
}, | |
"subject": { | |
"kids": { | |
"term": "<__main__.Word object at 0xbc>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0xb9>" | |
} | |
}, | |
"rule": "copuled", | |
"self": "<__main__.Syntaxed object at 0xb0>" | |
}, | |
"tense": { | |
"kids": {}, | |
"rule": "<class '__main__.Tense'>", | |
"self": "<__main__.Syntaxed object at 0xbd>" | |
}, | |
"truth": { | |
"kids": { | |
"durability": "<__main__.Number object at 0xc2>", | |
"priority": "<__main__.Number object at 0xc3>" | |
}, | |
"rule": "<type 'nars.logic.entity.TruthValue'>", | |
"self": "<__main__.Syntaxed object at 0xbf>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Sentence'>", | |
"self": "<__main__.Syntaxed object at 0xad>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Task'>", | |
"self": "<__main__.Syntaxed object at 0xa5>" | |
} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Sentence'>, u'name': 'sentence'} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Statement'>, u'name': 'statement'} | |
verbalizing u'<' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'subject'} | |
verbalizing u'{' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xa> | |
verbalizing u'}' | |
verbalizing sym{u'type': <class '__main__.Copula'>, u'name': 'copula'} | |
verbalizing u'-->' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'predicate'} | |
verbalizing u'[' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xb> | |
verbalizing u']' | |
verbalizing u'>' | |
verbalizing u'.' | |
back:<{light}-->[on]>. | |
input:<{cheese} --> [here]>. :|: | |
nars:$0.80;0.50;0.95$ <{cheese} --> [here]>. %1.00;0.90% {-2147483647+2147483647} | |
node:{ | |
"kids": { | |
"budget": { | |
"kids": { | |
"durability": "<__main__.Number object at 0xca>", | |
"priority": "<__main__.Number object at 0xcb>" | |
}, | |
"rule": "<type 'nars.logic.entity.BudgetValue'>", | |
"self": "<__main__.Syntaxed object at 0xc7>" | |
}, | |
"sentence": { | |
"kids": { | |
"statement": { | |
"kids": { | |
"copula": { | |
"kids": {}, | |
"rule": "<class '__main__.Copula'>", | |
"self": "<__main__.Syntaxed object at 0xd2>" | |
}, | |
"predicate": { | |
"kids": { | |
"term": "<__main__.Word object at 0xd7>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0xd4>" | |
}, | |
"subject": { | |
"kids": { | |
"term": "<__main__.Word object at 0xdb>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0xd8>" | |
} | |
}, | |
"rule": "copuled", | |
"self": "<__main__.Syntaxed object at 0xcf>" | |
}, | |
"tense": { | |
"kids": {}, | |
"rule": "<class '__main__.Tense'>", | |
"self": "<__main__.Syntaxed object at 0xdc>" | |
}, | |
"truth": { | |
"kids": { | |
"durability": "<__main__.Number object at 0xe1>", | |
"priority": "<__main__.Number object at 0xe2>" | |
}, | |
"rule": "<type 'nars.logic.entity.TruthValue'>", | |
"self": "<__main__.Syntaxed object at 0xde>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Sentence'>", | |
"self": "<__main__.Syntaxed object at 0xcc>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Task'>", | |
"self": "<__main__.Syntaxed object at 0xc4>" | |
} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Sentence'>, u'name': 'sentence'} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Statement'>, u'name': 'statement'} | |
verbalizing u'<' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'subject'} | |
verbalizing u'{' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xa> | |
verbalizing u'}' | |
verbalizing sym{u'type': <class '__main__.Copula'>, u'name': 'copula'} | |
verbalizing u'-->' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'predicate'} | |
verbalizing u'[' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xb> | |
verbalizing u']' | |
verbalizing u'>' | |
verbalizing u'.' | |
back:<{cheese}-->[here]>. | |
input:20 | |
input://light is on: | |
input:<{light} --> [on]>. :|: | |
nars:$0.80;0.50;0.95$ <{light} --> [on]>. %1.00;0.90% {-2147483647+2147483647} | |
node:{ | |
"kids": { | |
"budget": { | |
"kids": { | |
"durability": "<__main__.Number object at 0xe9>", | |
"priority": "<__main__.Number object at 0xea>" | |
}, | |
"rule": "<type 'nars.logic.entity.BudgetValue'>", | |
"self": "<__main__.Syntaxed object at 0xe6>" | |
}, | |
"sentence": { | |
"kids": { | |
"statement": { | |
"kids": { | |
"copula": { | |
"kids": {}, | |
"rule": "<class '__main__.Copula'>", | |
"self": "<__main__.Syntaxed object at 0xf1>" | |
}, | |
"predicate": { | |
"kids": { | |
"term": "<__main__.Word object at 0xf6>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0xf3>" | |
}, | |
"subject": { | |
"kids": { | |
"term": "<__main__.Word object at 0xfa>" | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0xf7>" | |
} | |
}, | |
"rule": "copuled", | |
"self": "<__main__.Syntaxed object at 0xee>" | |
}, | |
"tense": { | |
"kids": {}, | |
"rule": "<class '__main__.Tense'>", | |
"self": "<__main__.Syntaxed object at 0xfb>" | |
}, | |
"truth": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x100>", | |
"priority": "<__main__.Number object at 0x101>" | |
}, | |
"rule": "<type 'nars.logic.entity.TruthValue'>", | |
"self": "<__main__.Syntaxed object at 0xfd>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Sentence'>", | |
"self": "<__main__.Syntaxed object at 0xeb>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Task'>", | |
"self": "<__main__.Syntaxed object at 0xe3>" | |
} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Sentence'>, u'name': 'sentence'} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Statement'>, u'name': 'statement'} | |
verbalizing u'<' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'subject'} | |
verbalizing u'{' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xa> | |
verbalizing u'}' | |
verbalizing sym{u'type': <class '__main__.Copula'>, u'name': 'copula'} | |
verbalizing u'-->' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'predicate'} | |
verbalizing u'[' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing <__main__.oneormore object at 0xb> | |
verbalizing u']' | |
verbalizing u'>' | |
verbalizing u'.' | |
back:<{light}-->[on]>. | |
input:20 | |
input://todo: this check is not sufficient, check trace for | |
input:// | |
input:''outputMustContain('^pick([cheese, SELF])=null') | |
input:''outputMustContain('(^pick,cheese)! %1.00;0.07%') | |
input://TODO allow check trace: ''outputMustContain('(^pick,cheese)! %1.00;0.07% {21 : 11;11;12;10<<{light} --> [on]> =|> <{cheese} --> [here]>>;<{light} --> [on]>}') | |
/home/kook/opennars/nal/decisionmaking/SequenceGoalSimple.nal | |
input:(--,<goal --> reached>). :|: | |
nars:$0.80;0.50;0.95$ (--,<goal --> reached>). %1.00;0.90% {-2147483647+2147483647} | |
node:{ | |
"kids": { | |
"budget": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x108>", | |
"priority": "<__main__.Number object at 0x109>" | |
}, | |
"rule": "<type 'nars.logic.entity.BudgetValue'>", | |
"self": "<__main__.Syntaxed object at 0x105>" | |
}, | |
"sentence": { | |
"kids": { | |
"statement": { | |
"kids": { | |
"term": { | |
"kids": { | |
"copula": { | |
"kids": {}, | |
"rule": "<class '__main__.Copula'>", | |
"self": "<__main__.Syntaxed object at 0x113>" | |
}, | |
"predicate": "<__main__.Word object at 0x115>", | |
"subject": "<__main__.Word object at 0x116>" | |
}, | |
"rule": "copuled", | |
"self": "<__main__.Syntaxed object at 0x110>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.CompoundTerm'>", | |
"self": "<__main__.Syntaxed object at 0x10d>" | |
}, | |
"tense": { | |
"kids": {}, | |
"rule": "<class '__main__.Tense'>", | |
"self": "<__main__.Syntaxed object at 0x117>" | |
}, | |
"truth": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x11c>", | |
"priority": "<__main__.Number object at 0x11d>" | |
}, | |
"rule": "<type 'nars.logic.entity.TruthValue'>", | |
"self": "<__main__.Syntaxed object at 0x119>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Sentence'>", | |
"self": "<__main__.Syntaxed object at 0x10a>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Task'>", | |
"self": "<__main__.Syntaxed object at 0x102>" | |
} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Sentence'>, u'name': 'sentence'} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Statement'>, u'name': 'statement'} | |
verbalizing u'(--,' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'term'} | |
verbalizing u'<' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'subject'} | |
verbalizing sym{u'type': <class '__main__.Copula'>, u'name': 'copula'} | |
verbalizing u'-->' | |
verbalizing sym{u'type': <type 'nars.logic.entity.Term'>, u'name': 'predicate'} | |
verbalizing u'>' | |
verbalizing u')' | |
verbalizing u'.' | |
back:(--,<goal-->reached>). | |
input:(^go-to,a). :|: | |
nars:$0.80;0.50;0.95$ (^go-to,a,SELF). %1.00;0.90% {-2147483647+2147483647} | |
node:{ | |
"kids": { | |
"budget": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x124>", | |
"priority": "<__main__.Number object at 0x125>" | |
}, | |
"rule": "<type 'nars.logic.entity.BudgetValue'>", | |
"self": "<__main__.Syntaxed object at 0x121>" | |
}, | |
"sentence": { | |
"kids": { | |
"statement": { | |
"kids": {}, | |
"rule": "<type 'nars.logic.nal8.Operation'>", | |
"self": "<__main__.Syntaxed object at 0x129>" | |
}, | |
"tense": { | |
"kids": {}, | |
"rule": "<class '__main__.Tense'>", | |
"self": "<__main__.Syntaxed object at 0x12c>" | |
}, | |
"truth": { | |
"kids": { | |
"durability": "<__main__.Number object at 0x131>", | |
"priority": "<__main__.Number object at 0x132>" | |
}, | |
"rule": "<type 'nars.logic.entity.TruthValue'>", | |
"self": "<__main__.Syntaxed object at 0x12e>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Sentence'>", | |
"self": "<__main__.Syntaxed object at 0x126>" | |
} | |
}, | |
"rule": "<type 'nars.logic.entity.Task'>", | |
"self": "<__main__.Syntaxed object at 0x11e>" | |
} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Sentence'>, u'name': 'sentence'} | |
verbalizing sym{u'type': <type 'nars.logic.entity.Statement'>, u'name': 'statement'} | |
verbalizing u'(^' | |
verbalizing sym{u'type': <class '__main__.Word'>, u'name': 'word'} | |
Traceback (most recent call last): | |
File "test.py", line 364, in <module> | |
main() | |
File "test.py", line 214, in main | |
print "back:"+"".join(node.verbalize()) | |
File "test.py", line 88, in verbalize | |
for j in s.kids[i.name].verbalize(): | |
File "test.py", line 88, in verbalize | |
for j in s.kids[i.name].verbalize(): | |
File "test.py", line 90, in verbalize | |
else: raise Exception(str(i) + " not in " + str(s.dump())) | |
Exception: sym{u'type': <class '__main__.Word'>, u'name': 'word'} not in {u'rule': <type 'nars.logic.nal8.Operation'>, u'self': u'<__main__.Syntaxed object at 0x129>', u'kids': {}} | |
kook@databox ~/o/n/t/classes> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment