Skip to content
Snippets Groups Projects
Commit e28116c3 authored by Michael Mutote's avatar Michael Mutote
Browse files

22202956

Create A* search algorithm and added to search algorithms.

Heuristics file with maze heuristics.

Moved puzzle goal to the top

Created test case for mazes
parent e65b4925
No related branches found
No related tags found
No related merge requests found
...@@ -11,14 +11,28 @@ def maze_opt(path): ...@@ -11,14 +11,28 @@ def maze_opt(path):
return (is_goal.MAZE_GOAL[0] - state[0])**2 + (is_goal.MAZE_GOAL[1] - state[1])**2 return (is_goal.MAZE_GOAL[0] - state[0])**2 + (is_goal.MAZE_GOAL[1] - state[1])**2
def puzzle_opt(paths): def puzzle_opt(path):
pass pass
def sudoku_opt(paths): def sudoku_opt(path):
# state = path[-1]
# box_value, row_value, col_value = 0, 0, 0
# # check each box to see the least empty
# for down in range(0, 9, 3):
# for across in range(0, 9, 3):
# box_value += 9 - ()
# box_value = 0
#
# # check each row for the one with the least zeros
# row_value = 0
#
# # check each column for the one with the least zeros
# col_value = 0
pass pass
def queens_opt(paths): def queens_opt(path):
pass pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment