Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 83bb6e4

Browse files
committed
Spelling/formatting/typo fixes.
1 parent e641ff2 commit 83bb6e4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

csp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def remove_inconsistent_values(csp, Xi, Xj):
210210
for x in csp.curr_domains[Xi][:]:
211211
# If Xi=x conflicts with Xj=y for every possible y, eliminate Xi=x
212212
if every(lambda y: not csp.constraints(Xi, x, Xj, y),
213-
csp.curr_domains[Xj]):
213+
csp.curr_domains[Xj]):
214214
csp.curr_domains[Xi].remove(x)
215215
removed = True
216216
return removed

games.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Games, or Adversarial Search. (Chapters 6)
1+
"""Games, or Adversarial Search. (Chapter 6)
22
33
"""
44

search.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def h(self, node):
457457

458458
class NQueensProblem(Problem):
459459
"""The problem of placing N queens on an NxN board with none attacking
460-
each other. A state is represented as an N-element array, where the
460+
each other. A state is represented as an N-element array, where
461461
a value of r in the c-th entry means there is a queen at column c,
462462
row r, and a value of None means that the c-th column has not been
463463
filled in yet. We fill in columns left to right."""
@@ -503,7 +503,7 @@ def goal_test(self, state):
503503

504504
#______________________________________________________________________________
505505
## Inverse Boggle: Search for a high-scoring Boggle board. A good domain for
506-
## iterative-repair and related search tehniques, as suggested by Justin Boyan.
506+
## iterative-repair and related search techniques, as suggested by Justin Boyan.
507507

508508
ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
509509

@@ -698,7 +698,7 @@ def __init__(self, problem):
698698

699699
def successor(self, state):
700700
"Return a list of (action, state) pairs reachable from this state."
701-
result = self.problem.successor(state)
701+
result = self.problem.successor(state)
702702
self.succs += 1; self.states += len(result)
703703
return result
704704

0 commit comments

Comments
 (0)