Skip to content

Commit 6746702

Browse files
Chipe1norvig
authored andcommitted
Fixed a typo in logic.py
1 parent 2ec72d4 commit 6746702

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

logic.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -922,12 +922,7 @@ def subst(s, x):
922922

923923

924924
def 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

933928
def standardize_variables(sentence, dic=None):
@@ -1018,7 +1013,7 @@ def fetch_rules_for_goal(self, goal):
10181013

10191014
def 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

0 commit comments

Comments
 (0)