-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.py
44 lines (32 loc) · 950 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from inputHandler import inputReader
from node import node
from node import state
from algorithms import bfs, ids, heuristic
import configs
IR = inputReader.InputReader(configs.TEST_FILE_ADDRESS)
initState = state.State(IR.snakePrimaryPosition, IR.bounuses, IR.mapSize[0], IR.mapSize[1])
initNode = node.Node(initState)
bfsObj = bfs.BFS(initNode)
bfsObj.run()
bfsObj.printSolution()
idsObj = ids.IDS(initNode)
idsObj.run()
idsObj.printSolution()
aStarObj = heuristic.AStar(initNode, 1)
aStarObj.run()
aStarObj.printSolution()
aStarObj = heuristic.AStar(initNode, 2)
aStarObj.run()
aStarObj.printSolution()
aStarObj = heuristic.AStar(initNode, 1, 2)
aStarObj.run()
aStarObj.printSolution()
aStarObj = heuristic.AStar(initNode, 2, 2)
aStarObj.run()
aStarObj.printSolution()
aStarObj = heuristic.AStar(initNode, 1, 5)
aStarObj.run()
aStarObj.printSolution()
aStarObj = heuristic.AStar(initNode, 2, 5)
aStarObj.run()
aStarObj.printSolution()