Skip to content

Commit 94010a9

Browse files
committed
V1.0.1
1 parent a1ad7e4 commit 94010a9

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

8puzzleProblm.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Writer of this code:
1+
# Written by
22
# Seyyed Ali Shohadaalhosseini
33

44
# We'll never forget that:
@@ -41,30 +41,30 @@
4141
Enter ASTAR as A Star Search\n
4242
Enter GREEDY as Greedy Search\n
4343
Enter HILL as Hill Climbing Search: \n
44-
Enter the name here: """)
44+
Enter the name here: """).lower()
4545

46-
if WhichAlgorithm == "DFS":
46+
if WhichAlgorithm == "DFS".lower():
4747
print(Search.searchDFS(initialState, GoalState))
4848

49-
elif WhichAlgorithm == "BFS":
49+
elif WhichAlgorithm == "BFS".lower():
5050
print(Search.searchBFS(initialState, GoalState))
5151

52-
elif WhichAlgorithm == "DLS":
52+
elif WhichAlgorithm == "DLS".lower():
5353
print(Search.searchDLS(initialState, GoalState, 28), sep=" === > \n\n")
5454

55-
elif WhichAlgorithm == "IDS":
55+
elif WhichAlgorithm == "IDS".lower():
5656
print(Search.searchIDS(initialState, GoalState), sep=" === > \n\n")
5757

58-
elif WhichAlgorithm == "UCS":
58+
elif WhichAlgorithm == "UCS".lower():
5959
print(Search.searchUCS(initialState, GoalState), sep=" === > \n\n")
6060

61-
elif WhichAlgorithm == "ASTAR":
61+
elif WhichAlgorithm == "ASTAR".lower():
6262
print(Search.searchAstar(initialState, GoalState), sep=" === > \n\n")
6363

64-
elif WhichAlgorithm == "GREEDY":
64+
elif WhichAlgorithm == "GREEDY".lower():
6565
print(Search.searchGreedy(initialState, GoalState), sep=" === > \n\n")
6666

67-
elif WhichAlgorithm == "HILL":
67+
elif WhichAlgorithm == "HILL".lower():
6868
print(Search.searchHillClimbing(initialState, GoalState), sep=" === > \n\n")
6969

7070
ans = input("Do you want to continue ? y/n ")

AISearchAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Writer of this code:
1+
# Written by
22
# Seyyed Ali Shohadaalhosseini
33

44
# We'll never forget that:
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)