You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from problog.formula import LogicFormula, LogicDAG
from problog.logic import Term
from problog.ddnnf_formula import DDNNF
from problog.cnf_formula import CNF
p = PrologString("""
coin(c1). coin(c2).
0.4::heads(C); 0.6::tails(C) :- coin(C).
win :- heads(C).
evidence(heads(c1), false).
query(win).
""")
lf = LogicFormula.create_from(p) # ground the program
dag = LogicDAG.create_from(lf) # break cycles in the ground program
cnf = CNF.create_from(dag) # convert to CNF
ddnnf = DDNNF.create_from(cnf) # compile CNF to ddnnf
ddnnf.evaluate()
But I got this error:
Traceback (most recent call last):
File "/home/avi/thesis/problog.py", line 1, in
from problog.program import PrologString
File "/home/avi/thesis/problog.py", line 1, in
from problog.program import PrologString
ModuleNotFoundError: No module named 'problog.program'; 'problog' is not a package
After pip installing using: pip install problog
The text was updated successfully, but these errors were encountered:
I ran this code:
But I got this error:
Traceback (most recent call last):
File "/home/avi/thesis/problog.py", line 1, in
from problog.program import PrologString
File "/home/avi/thesis/problog.py", line 1, in
from problog.program import PrologString
ModuleNotFoundError: No module named 'problog.program'; 'problog' is not a package
After pip installing using:
pip install problog
The text was updated successfully, but these errors were encountered: