Skip to content

Commit

Permalink
Changed formation desirability to 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
bcorfman committed May 23, 2015
1 parent 6741c28 commit e6745ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions evaluators.py
Expand Up @@ -49,7 +49,7 @@ def calculate_desirability(self):
long_dyke_csp = formation_csp(self.thinker.board.short_dyke, self.thinker.board)
# all formations are desirable if they can be achieved, and undesirable if they can't.
if backtracking_search(long_dyke_csp, select_unassigned_variable=mrv, inference=forward_checking):
return 1.0
return 0.9
else:
return 0.0

Expand All @@ -69,7 +69,7 @@ def calculate_desirability(self):
pyramid_csp = formation_csp(self.thinker.board.pyramid, self.thinker.board)
# all formations are desirable if they can be achieved, and undesirable if they can't.
if backtracking_search(pyramid_csp, select_unassigned_variable=mrv, inference=forward_checking):
return 1.0
return 0.9
else:
return 0.0

Expand All @@ -89,7 +89,7 @@ def calculate_desirability(self):
phalanx_csp = formation_csp(self.thinker.board.phalanx, self.thinker.board)
# all formations are desirable if they can be achieved, and undesirable if they can't.
if backtracking_search(phalanx_csp, select_unassigned_variable=mrv, inference=forward_checking):
return 1.0
return 0.9
else:
return 0.0

Expand All @@ -113,7 +113,7 @@ def calculate_desirability(self):
mill_csp = formation_csp(self.thinker.board.mill, self.thinker.board)
# all formations are desirable if they can be achieved, and undesirable if they can't.
if backtracking_search(mill_csp, select_unassigned_variable=mrv, inference=forward_checking):
return 1.0
return 0.9
else:
return 0.0

Expand All @@ -133,7 +133,7 @@ def calculate_desirability(self):
echelon_csp = formation_csp(self.thinker.board.echelon, self.thinker.board)
# all formations are desirable if they can be achieved, and undesirable if they can't.
if backtracking_search(echelon_csp, select_unassigned_variable=mrv, inference=forward_checking):
return 1.0
return 0.9
else:
return 0.0

Expand Down

0 comments on commit e6745ab

Please sign in to comment.