@@ -111,7 +111,7 @@ def retract(self, sentence):
111111
112112
113113def KB_AgentProgram (KB ):
114- """A generic logical knowledge-based agent program. [Fig. 7.1]"""
114+ """A generic logical knowledge-based agent program. [Figure 7.1]"""
115115 steps = itertools .count ()
116116
117117 def program (percept ):
@@ -191,7 +191,7 @@ def parse_definite_clause(s):
191191
192192def tt_entails (kb , alpha ):
193193 """Does kb entail the sentence alpha? Use truth tables. For propositional
194- kb's and sentences. [Fig. 7.10]. Note that the 'kb' should be an
194+ kb's and sentences. [Figure 7.10]. Note that the 'kb' should be an
195195 Expr which is a conjunction of clauses.
196196 >>> tt_entails(expr('P & Q'), expr('Q'))
197197 True
@@ -434,7 +434,7 @@ def disjuncts(s):
434434
435435
436436def pl_resolution (KB , alpha ):
437- "Propositional-logic resolution: say if alpha follows from KB. [Fig. 7.12]"
437+ "Propositional-logic resolution: say if alpha follows from KB. [Figure 7.12]"
438438 clauses = KB .clauses + conjuncts (to_cnf (~ alpha ))
439439 new = set ()
440440 while True :
@@ -493,7 +493,7 @@ def clauses_with_premise(self, p):
493493
494494def pl_fc_entails (KB , q ):
495495 """Use forward chaining to see if a PropDefiniteKB entails symbol q.
496- [Fig. 7.15]
496+ [Figure 7.15]
497497 >>> pl_fc_entails(horn_clauses_KB, expr('Q'))
498498 True
499499 """
@@ -527,7 +527,7 @@ def pl_fc_entails(KB, q):
527527 horn_clauses_KB .tell (expr (s ))
528528
529529# ______________________________________________________________________________
530- # DPLL-Satisfiable [Fig. 7.17]
530+ # DPLL-Satisfiable [Figure 7.17]
531531
532532
533533def dpll_satisfiable (s ):
@@ -633,7 +633,7 @@ def inspect_literal(literal):
633633 return literal , True
634634
635635# ______________________________________________________________________________
636- # Walk-SAT [Fig. 7.18]
636+ # Walk-SAT [Figure 7.18]
637637
638638
639639def WalkSAT (clauses , p = 0.5 , max_flips = 10000 ):
@@ -670,7 +670,7 @@ def sat_count(sym):
670670
671671class HybridWumpusAgent (agents .Agent ):
672672
673- "An agent for the wumpus world that does logical inference. [Fig. 7.20]" ""
673+ "An agent for the wumpus world that does logical inference. [Figure 7.20]" ""
674674
675675 def __init__ (self ):
676676 unimplemented ()
@@ -684,7 +684,7 @@ def plan_route(current, goals, allowed):
684684
685685def SAT_plan (init , transition , goal , t_max , SAT_solver = dpll_satisfiable ):
686686 """Converts a planning problem to Satisfaction problem by translating it to a cnf sentence.
687- [Fig. 7.22]"""
687+ [Figure 7.22]"""
688688
689689 #Functions used by SAT_plan
690690 def translate_to_SAT (init , transition , goal , time ):
@@ -767,7 +767,7 @@ def extract_solution(model):
767767def unify (x , y , s ):
768768 """Unify expressions x,y with substitution s; return a substitution that
769769 would make x,y equal, or None if x,y can not unify. x and y can be
770- variables (e.g. Expr('x')), constants, lists, or Exprs. [Fig. 9.1]"""
770+ variables (e.g. Expr('x')), constants, lists, or Exprs. [Figure 9.1]"""
771771 if s is None :
772772 return None
773773 elif x == y :
@@ -933,7 +933,7 @@ def fetch_rules_for_goal(self, goal):
933933
934934
935935def fol_bc_ask (KB , query ):
936- """A simple backward-chaining algorithm for first-order logic. [Fig. 9.6]
936+ """A simple backward-chaining algorithm for first-order logic. [Figure 9.6]
937937 KB should be an instance of FolKB, and query an atomic sentence. """
938938 return fol_bc_or (KB , query , {})
939939
0 commit comments