File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -922,12 +922,7 @@ def subst(s, x):
922922
923923
924924def fol_fc_ask (KB , alpha ):
925- """Inefficient forward chaining for first-order logic. [Fig. 9.3]
926- KB is a FolKB and alpha must be an atomic sentence."""
927- while True :
928- for r in KB .clauses :
929- ps , q = parse_definite_clause (standardize_variables (r ))
930- raise NotImplementedError
925+ unimplemented ()
931926
932927
933928def standardize_variables (sentence , dic = None ):
@@ -1018,7 +1013,7 @@ def fetch_rules_for_goal(self, goal):
10181013
10191014def fol_bc_ask (KB , query ):
10201015 """A simple backward-chaining algorithm for first-order logic. [Fig. 9.6]
1021- KB should be an instance of FolKB, and goals a list of literals . """
1016+ KB should be an instance of FolKB, and query an atomic sentence . """
10221017 return fol_bc_or (KB , query , {})
10231018
10241019
You can’t perform that action at this time.
0 commit comments