pyDatalog
pyDatalog copied to clipboard
Rule that uses unasserted fact blows up.
I have a rule that fires if a fact exists, so A(X,Y) <= has_fact(X) & other_stuff(X,Y)
If I load up my WME and none of them happen to assert has_fact(), the rule throws an exception.
I can get around it by asserting and retracting a dummy rule like this:
+ has_fact('dummy')
- has_fact('dummy')