├── Project1
├── VERSION
├── test_cases
│ ├── CONFIG
│ ├── q4
│ │ ├── CONFIG
│ │ ├── astar_0.solution
│ │ ├── astar_1_graph_heuristic.solution
│ │ ├── graph_backtrack.solution
│ │ ├── astar_3_goalAtDequeue.solution
│ │ ├── graph_manypaths.solution
│ │ ├── astar_3_goalAtDequeue.test
│ │ ├── graph_backtrack.test
│ │ ├── astar_2_manhattan.test
│ │ ├── astar_0.test
│ │ ├── astar_2_manhattan.solution
│ │ ├── graph_manypaths.test
│ │ └── astar_1_graph_heuristic.test
│ ├── q8
│ │ ├── CONFIG
│ │ ├── closest_dot_1.solution
│ │ ├── closest_dot_10.solution
│ │ ├── closest_dot_11.solution
│ │ ├── closest_dot_12.solution
│ │ ├── closest_dot_13.solution
│ │ ├── closest_dot_2.solution
│ │ ├── closest_dot_3.solution
│ │ ├── closest_dot_4.solution
│ │ ├── closest_dot_5.solution
│ │ ├── closest_dot_6.solution
│ │ ├── closest_dot_7.solution
│ │ ├── closest_dot_8.solution
│ │ ├── closest_dot_9.solution
│ │ ├── closest_dot_1.test
│ │ ├── closest_dot_2.test
│ │ ├── closest_dot_4.test
│ │ ├── closest_dot_5.test
│ │ ├── closest_dot_3.test
│ │ ├── closest_dot_12.test
│ │ ├── closest_dot_6.test
│ │ ├── closest_dot_7.test
│ │ ├── closest_dot_8.test
│ │ ├── closest_dot_9.test
│ │ ├── closest_dot_13.test
│ │ ├── closest_dot_10.test
│ │ └── closest_dot_11.test
│ ├── q1
│ │ ├── CONFIG
│ │ ├── graph_backtrack.solution
│ │ ├── graph_bfs_vs_dfs.solution
│ │ ├── graph_infinite.solution
│ │ ├── graph_manypaths.solution
│ │ ├── graph_bfs_vs_dfs.test
│ │ ├── graph_infinite.test
│ │ ├── graph_backtrack.test
│ │ ├── pacman_1.test
│ │ └── graph_manypaths.test
│ ├── q2
│ │ ├── CONFIG
│ │ ├── graph_bfs_vs_dfs.solution
│ │ ├── graph_backtrack.solution
│ │ ├── graph_infinite.solution
│ │ ├── graph_manypaths.solution
│ │ ├── graph_bfs_vs_dfs.test
│ │ ├── graph_infinite.test
│ │ ├── graph_backtrack.test
│ │ ├── pacman_1.test
│ │ ├── pacman_1.solution
│ │ └── graph_manypaths.test
│ ├── q3
│ │ ├── CONFIG
│ │ ├── graph_bfs_vs_dfs.solution
│ │ ├── graph_backtrack.solution
│ │ ├── ucs_0_graph.solution
│ │ ├── graph_infinite.solution
│ │ ├── ucs_5_goalAtDequeue.solution
│ │ ├── ucs_4_testSearch.test
│ │ ├── graph_manypaths.solution
│ │ ├── ucs_4_testSearch.solution
│ │ ├── graph_bfs_vs_dfs.test
│ │ ├── graph_infinite.test
│ │ ├── ucs_5_goalAtDequeue.test
│ │ ├── graph_backtrack.test
│ │ ├── ucs_1_problemC.test
│ │ ├── ucs_2_problemE.test
│ │ ├── ucs_3_problemW.test
│ │ ├── ucs_0_graph.test
│ │ ├── ucs_1_problemC.solution
│ │ ├── graph_manypaths.test
│ │ ├── ucs_2_problemE.solution
│ │ └── ucs_3_problemW.solution
│ ├── q5
│ │ ├── CONFIG
│ │ ├── corner_tiny_corner.solution
│ │ └── corner_tiny_corner.test
│ ├── q7
│ │ ├── CONFIG
│ │ ├── food_heuristic_1.solution
│ │ ├── food_heuristic_10.solution
│ │ ├── food_heuristic_11.solution
│ │ ├── food_heuristic_12.solution
│ │ ├── food_heuristic_13.solution
│ │ ├── food_heuristic_14.solution
│ │ ├── food_heuristic_15.solution
│ │ ├── food_heuristic_16.solution
│ │ ├── food_heuristic_17.solution
│ │ ├── food_heuristic_2.solution
│ │ ├── food_heuristic_3.solution
│ │ ├── food_heuristic_4.solution
│ │ ├── food_heuristic_5.solution
│ │ ├── food_heuristic_6.solution
│ │ ├── food_heuristic_7.solution
│ │ ├── food_heuristic_8.solution
│ │ ├── food_heuristic_9.solution
│ │ ├── food_heuristic_grade_tricky.solution
│ │ ├── food_heuristic_1.test
│ │ ├── food_heuristic_5.test
│ │ ├── food_heuristic_6.test
│ │ ├── food_heuristic_8.test
│ │ ├── food_heuristic_9.test
│ │ ├── food_heuristic_7.test
│ │ ├── food_heuristic_10.test
│ │ ├── food_heuristic_11.test
│ │ ├── food_heuristic_12.test
│ │ ├── food_heuristic_13.test
│ │ ├── food_heuristic_16.test
│ │ ├── food_heuristic_3.test
│ │ ├── food_heuristic_4.test
│ │ ├── food_heuristic_17.test
│ │ ├── food_heuristic_14.test
│ │ ├── food_heuristic_15.test
│ │ ├── food_heuristic_2.test
│ │ └── food_heuristic_grade_tricky.test
│ └── q6
│ │ ├── CONFIG
│ │ ├── corner_sanity_1.test
│ │ ├── corner_sanity_2.test
│ │ ├── corner_sanity_3.test
│ │ ├── corner_sanity_1.solution
│ │ ├── corner_sanity_2.solution
│ │ ├── corner_sanity_3.solution
│ │ ├── medium_corners.test
│ │ └── medium_corners.solution
├── layouts
│ ├── testMaze.lay
│ ├── testSearch.lay
│ ├── trappedClassic.lay
│ ├── minimaxClassic.lay
│ ├── tinyMaze.lay
│ ├── greedySearch.lay
│ ├── tinySafeSearch.lay
│ ├── tinySearch.lay
│ ├── tinyCorners.lay
│ ├── testClassic.lay
│ ├── smallSearch.lay
│ ├── capsuleClassic.lay
│ ├── oddSearch.lay
│ ├── openSearch.lay
│ ├── powerClassic.lay
│ ├── smallClassic.lay
│ ├── trickySearch.lay
│ ├── mediumSafeSearch.lay
│ ├── smallSafeSearch.lay
│ ├── contestClassic.lay
│ ├── smallMaze.lay
│ ├── boxSearch.lay
│ ├── openClassic.lay
│ ├── bigSafeSearch.lay
│ ├── mediumClassic.lay
│ ├── mediumSearch.lay
│ ├── contoursMaze.lay
│ ├── trickyClassic.lay
│ ├── mediumCorners.lay
│ ├── bigSearch.lay
│ ├── mediumMaze.lay
│ ├── mediumDottedMaze.lay
│ ├── mediumScaryMaze.lay
│ ├── originalClassic.lay
│ ├── openMaze.lay
│ ├── bigCorners.lay
│ └── bigMaze.lay
├── game.pyc
├── layout.pyc
├── pacman.pyc
├── search.pyc
├── util.pyc
├── grading.pyc
├── ghostAgents.pyc
├── testClasses.pyc
├── testParser.pyc
├── textDisplay.pyc
├── graphicsUtils.pyc
├── pacmanAgents.pyc
├── projectParams.pyc
├── searchAgents.pyc
├── graphicsDisplay.pyc
├── keyboardAgents.pyc
├── searchTestClasses.pyc
├── projectParams.py
└── commands.txt
├── Project2
├── VERSION
├── test_cases
│ ├── CONFIG
│ ├── q2
│ │ ├── CONFIG
│ │ ├── 6-tied-root.solution
│ │ ├── 2-1a-vary-depth.solution
│ │ ├── 2-2a-vary-depth.solution
│ │ ├── 2-3a-vary-depth.solution
│ │ ├── 2-4a-vary-depth.solution
│ │ ├── 1-1-minmax.solution
│ │ ├── 1-2-minmax.solution
│ │ ├── 1-3-minmax.solution
│ │ ├── 1-4-minmax.solution
│ │ ├── 2-1b-vary-depth.solution
│ │ ├── 2-2b-vary-depth.solution
│ │ ├── 2-3b-vary-depth.solution
│ │ ├── 2-4b-vary-depth.solution
│ │ ├── 0-small-tree.solution
│ │ ├── 0-lecture-6-tree.solution
│ │ ├── 1-5-minmax.solution
│ │ ├── 1-6-minmax.solution
│ │ ├── 1-7-minmax.solution
│ │ ├── 1-8-minmax.solution
│ │ ├── 7-1a-check-depth-one-ghost.solution
│ │ ├── 2-one-ghost-3level.solution
│ │ ├── 4-two-ghosts-3level.solution
│ │ ├── 7-2a-check-depth-two-ghosts.solution
│ │ ├── 7-1b-check-depth-one-ghost.solution
│ │ ├── 3-one-ghost-4level.solution
│ │ ├── 7-1c-check-depth-one-ghost.solution
│ │ ├── 7-2b-check-depth-two-ghosts.solution
│ │ ├── 5-two-ghosts-4level.solution
│ │ ├── 7-2c-check-depth-two-ghosts.solution
│ │ ├── 8-pacman-game.test
│ │ ├── 6-tied-root.test
│ │ ├── 0-small-tree.test
│ │ ├── 1-1-minmax.test
│ │ ├── 1-2-minmax.test
│ │ ├── 0-lecture-6-tree.test
│ │ ├── 1-3-minmax.test
│ │ ├── 1-4-minmax.test
│ │ ├── 2-one-ghost-3level.test
│ │ ├── 4-two-ghosts-3level.test
│ │ ├── 2-1a-vary-depth.test
│ │ ├── 2-1b-vary-depth.test
│ │ ├── 2-2a-vary-depth.test
│ │ ├── 2-2b-vary-depth.test
│ │ ├── 2-3a-vary-depth.test
│ │ ├── 2-3b-vary-depth.test
│ │ ├── 2-4a-vary-depth.test
│ │ ├── 2-4b-vary-depth.test
│ │ ├── 1-5-minmax.test
│ │ ├── 1-6-minmax.test
│ │ ├── 1-7-minmax.test
│ │ ├── 1-8-minmax.test
│ │ ├── 3-one-ghost-4level.test
│ │ ├── 5-two-ghosts-4level.test
│ │ ├── 7-1a-check-depth-one-ghost.test
│ │ ├── 7-1b-check-depth-one-ghost.test
│ │ ├── 7-1c-check-depth-one-ghost.test
│ │ ├── 7-2a-check-depth-two-ghosts.test
│ │ ├── 7-2b-check-depth-two-ghosts.test
│ │ └── 7-2c-check-depth-two-ghosts.test
│ ├── q3
│ │ ├── CONFIG
│ │ ├── 1-3-minmax.solution
│ │ ├── 6-tied-root.solution
│ │ ├── 2-1a-vary-depth.solution
│ │ ├── 2-2a-vary-depth.solution
│ │ ├── 2-3a-vary-depth.solution
│ │ ├── 2-4a-vary-depth.solution
│ │ ├── 1-1-minmax.solution
│ │ ├── 1-2-minmax.solution
│ │ ├── 1-4-minmax.solution
│ │ ├── 2-3b-vary-depth.solution
│ │ ├── 2-4b-vary-depth.solution
│ │ ├── 0-small-tree.solution
│ │ ├── 2-1b-vary-depth.solution
│ │ ├── 2-2b-vary-depth.solution
│ │ ├── 1-6-minmax.solution
│ │ ├── 1-7-minmax.solution
│ │ ├── 1-8-minmax.solution
│ │ ├── 2-one-ghost-3level.solution
│ │ ├── 0-lecture-6-tree.solution
│ │ ├── 1-5-minmax.solution
│ │ ├── 7-1a-check-depth-one-ghost.solution
│ │ ├── 4-two-ghosts-3level.solution
│ │ ├── 7-2a-check-depth-two-ghosts.solution
│ │ ├── 3-one-ghost-4level.solution
│ │ ├── 5-two-ghosts-4level.solution
│ │ ├── 7-1b-check-depth-one-ghost.solution
│ │ ├── 7-1c-check-depth-one-ghost.solution
│ │ ├── 7-2b-check-depth-two-ghosts.solution
│ │ ├── 7-2c-check-depth-two-ghosts.solution
│ │ ├── 8-pacman-game.test
│ │ ├── 6-tied-root.test
│ │ ├── 0-small-tree.test
│ │ ├── 1-1-minmax.test
│ │ ├── 1-2-minmax.test
│ │ ├── 0-lecture-6-tree.test
│ │ ├── 1-3-minmax.test
│ │ ├── 1-4-minmax.test
│ │ ├── 2-one-ghost-3level.test
│ │ ├── 4-two-ghosts-3level.test
│ │ ├── 2-1a-vary-depth.test
│ │ ├── 2-1b-vary-depth.test
│ │ ├── 2-2a-vary-depth.test
│ │ ├── 2-2b-vary-depth.test
│ │ ├── 2-3a-vary-depth.test
│ │ ├── 2-3b-vary-depth.test
│ │ ├── 2-4a-vary-depth.test
│ │ ├── 2-4b-vary-depth.test
│ │ ├── 1-5-minmax.test
│ │ ├── 1-6-minmax.test
│ │ ├── 1-7-minmax.test
│ │ ├── 1-8-minmax.test
│ │ ├── 3-one-ghost-4level.test
│ │ ├── 5-two-ghosts-4level.test
│ │ ├── 7-1a-check-depth-one-ghost.test
│ │ ├── 7-1b-check-depth-one-ghost.test
│ │ ├── 7-1c-check-depth-one-ghost.test
│ │ ├── 7-2a-check-depth-two-ghosts.test
│ │ ├── 7-2b-check-depth-two-ghosts.test
│ │ └── 7-2c-check-depth-two-ghosts.test
│ ├── q4
│ │ ├── CONFIG
│ │ ├── 0-expectimax1.solution
│ │ ├── 1-expectimax2.solution
│ │ ├── 6-1a-check-depth-one-ghost.solution
│ │ ├── 2-one-ghost-3level.solution
│ │ ├── 4-two-ghosts-3level.solution
│ │ ├── 6-2a-check-depth-two-ghosts.solution
│ │ ├── 6-1b-check-depth-one-ghost.solution
│ │ ├── 3-one-ghost-4level.solution
│ │ ├── 6-1c-check-depth-one-ghost.solution
│ │ ├── 6-2b-check-depth-two-ghosts.solution
│ │ ├── 5-two-ghosts-4level.solution
│ │ ├── 6-2c-check-depth-two-ghosts.solution
│ │ ├── 7-pacman-game.test
│ │ ├── 1-expectimax2.test
│ │ ├── 0-expectimax1.test
│ │ ├── 2-one-ghost-3level.test
│ │ ├── 4-two-ghosts-3level.test
│ │ ├── 3-one-ghost-4level.test
│ │ ├── 5-two-ghosts-4level.test
│ │ ├── 6-1a-check-depth-one-ghost.test
│ │ ├── 6-1c-check-depth-one-ghost.test
│ │ └── 6-1b-check-depth-one-ghost.test
│ ├── extra
│ │ ├── CONFIG
│ │ └── grade-agent.test
│ ├── q1
│ │ ├── CONFIG
│ │ ├── grade-agent.solution
│ │ └── grade-agent.test
│ └── q5
│ │ ├── CONFIG
│ │ ├── grade-agent.solution
│ │ └── grade-agent.test
├── layouts
│ ├── trappedClassic.lay
│ ├── minimaxClassic.lay
│ ├── testClassic.lay
│ ├── capsuleClassic.lay
│ ├── smallClassic.lay
│ ├── contestClassic.lay
│ ├── openClassic.lay
│ ├── mediumClassic.lay
│ ├── trickyClassic.lay
│ └── originalClassic.lay
└── projectParams.py
├── README.md
└── LICENSE
/Project1/VERSION:
--------------------------------------------------------------------------------
1 | v1.001
2 |
--------------------------------------------------------------------------------
/Project2/VERSION:
--------------------------------------------------------------------------------
1 | v1.002
2 |
--------------------------------------------------------------------------------
/Project1/test_cases/CONFIG:
--------------------------------------------------------------------------------
1 | order: "q1 q2 q3 q4 q5 q6 q7 q8"
--------------------------------------------------------------------------------
/Project2/test_cases/CONFIG:
--------------------------------------------------------------------------------
1 | order: "q1 q2 q3 q4 q5"
2 |
--------------------------------------------------------------------------------
/Project1/layouts/testMaze.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%
2 | %. P%
3 | %%%%%%%%%%
4 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/CONFIG:
--------------------------------------------------------------------------------
1 | class: "PassAllTestsQuestion"
2 | max_points: "3"
--------------------------------------------------------------------------------
/Project1/test_cases/q8/CONFIG:
--------------------------------------------------------------------------------
1 | class: "PassAllTestsQuestion"
2 | max_points: "3"
--------------------------------------------------------------------------------
/Project1/layouts/testSearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%
2 | %.P %
3 | %%% %
4 | %. %
5 | %%%%%
6 |
--------------------------------------------------------------------------------
/Project1/test_cases/q1/CONFIG:
--------------------------------------------------------------------------------
1 | max_points: "3"
2 | class: "PassAllTestsQuestion"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q2/CONFIG:
--------------------------------------------------------------------------------
1 | max_points: "3"
2 | class: "PassAllTestsQuestion"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/CONFIG:
--------------------------------------------------------------------------------
1 | class: "PassAllTestsQuestion"
2 | max_points: "3"
3 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/CONFIG:
--------------------------------------------------------------------------------
1 | max_points: "5"
2 | class: "PassAllTestsQuestion"
3 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/CONFIG:
--------------------------------------------------------------------------------
1 | max_points: "5"
2 | class: "PassAllTestsQuestion"
3 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/CONFIG:
--------------------------------------------------------------------------------
1 | max_points: "5"
2 | class: "PassAllTestsQuestion"
3 |
--------------------------------------------------------------------------------
/Project2/test_cases/extra/CONFIG:
--------------------------------------------------------------------------------
1 | max_points: "0"
2 | class: "PartialCreditQuestion"
3 |
--------------------------------------------------------------------------------
/Project2/test_cases/q1/CONFIG:
--------------------------------------------------------------------------------
1 | max_points: "4"
2 | class: "PartialCreditQuestion"
3 |
--------------------------------------------------------------------------------
/Project2/test_cases/q5/CONFIG:
--------------------------------------------------------------------------------
1 | max_points: "6"
2 | class: "PartialCreditQuestion"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q5/CONFIG:
--------------------------------------------------------------------------------
1 | class: "PassAllTestsQuestion"
2 | max_points: "3"
3 | depends: "q2"
--------------------------------------------------------------------------------
/Project1/test_cases/q7/CONFIG:
--------------------------------------------------------------------------------
1 | class: "PartialCreditQuestion"
2 | max_points: "4"
3 | depends: "q4"
--------------------------------------------------------------------------------
/Project1/layouts/trappedClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%
2 | % P G%
3 | %G%%%%%%
4 | %.... %
5 | %%%%%%%%
6 |
--------------------------------------------------------------------------------
/Project1/test_cases/q6/CONFIG:
--------------------------------------------------------------------------------
1 | class: "Q6PartialCreditQuestion"
2 | max_points: "3"
3 | depends: "q4"
--------------------------------------------------------------------------------
/Project2/layouts/trappedClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%
2 | % P G%
3 | %G%%%%%%
4 | %.... %
5 | %%%%%%%%
6 |
--------------------------------------------------------------------------------
/Project1/game.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/game.pyc
--------------------------------------------------------------------------------
/Project1/layout.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/layout.pyc
--------------------------------------------------------------------------------
/Project1/layouts/minimaxClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%
2 | %.P G%
3 | % %.%G%%%
4 | %G %%%
5 | %%%%%%%%%
6 |
--------------------------------------------------------------------------------
/Project1/layouts/tinyMaze.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%
2 | % P%
3 | % %%% %
4 | % % %
5 | %% %%
6 | %. %%%%
7 | %%%%%%%
8 |
--------------------------------------------------------------------------------
/Project1/pacman.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/pacman.pyc
--------------------------------------------------------------------------------
/Project1/search.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/search.pyc
--------------------------------------------------------------------------------
/Project1/util.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/util.pyc
--------------------------------------------------------------------------------
/Project2/layouts/minimaxClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%
2 | %.P G%
3 | % %.%G%%%
4 | %G %%%
5 | %%%%%%%%%
6 |
--------------------------------------------------------------------------------
/Project1/grading.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/grading.pyc
--------------------------------------------------------------------------------
/Project1/layouts/greedySearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%
2 | %....%
3 | % %%.%
4 | % %%.%
5 | %.P .%
6 | %.%%%%
7 | %....%
8 | %%%%%%
--------------------------------------------------------------------------------
/Project1/ghostAgents.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/ghostAgents.pyc
--------------------------------------------------------------------------------
/Project1/testClasses.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/testClasses.pyc
--------------------------------------------------------------------------------
/Project1/testParser.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/testParser.pyc
--------------------------------------------------------------------------------
/Project1/textDisplay.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/textDisplay.pyc
--------------------------------------------------------------------------------
/Project1/graphicsUtils.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/graphicsUtils.pyc
--------------------------------------------------------------------------------
/Project1/pacmanAgents.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/pacmanAgents.pyc
--------------------------------------------------------------------------------
/Project1/projectParams.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/projectParams.pyc
--------------------------------------------------------------------------------
/Project1/searchAgents.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/searchAgents.pyc
--------------------------------------------------------------------------------
/Project1/graphicsDisplay.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/graphicsDisplay.pyc
--------------------------------------------------------------------------------
/Project1/keyboardAgents.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/keyboardAgents.pyc
--------------------------------------------------------------------------------
/Project1/layouts/tinySafeSearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%
2 | % G %...%
3 | %%%%%%% %
4 | %Po %
5 | %.%%.%%.%
6 | %.%%....%
7 | %%%%%%%%%
8 |
--------------------------------------------------------------------------------
/Project1/layouts/tinySearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%
2 | %.. ..%
3 | %%%%.%% %
4 | % P %
5 | %.%% %%.%
6 | %.%. .%
7 | %%%%%%%%%
8 |
--------------------------------------------------------------------------------
/Project1/layouts/tinyCorners.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%
2 | %. .%
3 | % P %
4 | % %%%% %
5 | % % %
6 | % % %%%%
7 | %.% .%
8 | %%%%%%%%
9 |
--------------------------------------------------------------------------------
/Project1/searchTestClasses.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PetropoulakisPanagiotis/pacman-projects/HEAD/Project1/searchTestClasses.pyc
--------------------------------------------------------------------------------
/Project1/layouts/testClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%
2 | % . %
3 | %.G.%
4 | % . %
5 | %. .%
6 | % %
7 | % .%
8 | % %
9 | %P .%
10 | %%%%%
11 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_1.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_1.test.
2 | solution_length: "1"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_10.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_10.test.
2 | solution_length: "1"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_11.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_11.test.
2 | solution_length: "2"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_12.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_12.test.
2 | solution_length: "3"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_13.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_13.test.
2 | solution_length: "1"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_2.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_2.test.
2 | solution_length: "1"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_3.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_3.test.
2 | solution_length: "1"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_4.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_4.test.
2 | solution_length: "3"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_5.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_5.test.
2 | solution_length: "1"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_6.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_6.test.
2 | solution_length: "2"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_7.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_7.test.
2 | solution_length: "1"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_8.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_8.test.
2 | solution_length: "1"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_9.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q8/closest_dot_9.test.
2 | solution_length: "1"
3 |
--------------------------------------------------------------------------------
/Project2/layouts/testClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%
2 | % . %
3 | %.G.%
4 | % . %
5 | %. .%
6 | % %
7 | % .%
8 | % %
9 | %P .%
10 | %%%%%
11 |
--------------------------------------------------------------------------------
/Project2/test_cases/q1/grade-agent.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q1/grade-agent.test.
2 | # File intentionally blank.
3 |
--------------------------------------------------------------------------------
/Project2/test_cases/q5/grade-agent.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q5/grade-agent.test.
2 | # File intentionally blank.
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_1.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_1.test.
2 | solution_cost: "0"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_10.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_10.test.
2 | solution_cost: "7"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_11.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_11.test.
2 | solution_cost: "8"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_12.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_12.test.
2 | solution_cost: "1"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_13.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_13.test.
2 | solution_cost: "5"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_14.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_14.test.
2 | solution_cost: "31"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_15.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_15.test.
2 | solution_cost: "21"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_16.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_16.test.
2 | solution_cost: "7"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_17.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_17.test.
2 | solution_cost: "16"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_2.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_2.test.
2 | solution_cost: "0"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_3.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_3.test.
2 | solution_cost: "0"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_4.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_4.test.
2 | solution_cost: "0"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_5.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_5.test.
2 | solution_cost: "11"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_6.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_6.test.
2 | solution_cost: "5"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_7.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_7.test.
2 | solution_cost: "7"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_8.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_8.test.
2 | solution_cost: "5"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_9.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_9.test.
2 | solution_cost: "6"
3 |
--------------------------------------------------------------------------------
/Project1/test_cases/q5/corner_tiny_corner.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q5/corner_tiny_corner.test.
2 | solution_length: "28"
3 |
--------------------------------------------------------------------------------
/Project1/layouts/smallSearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %. ...P .%
3 | %.%%.%%.%%.%%.%% %.%
4 | % %% %..... %.%
5 | %%%%%%%%%%%%%%%%%%%%
6 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/6-tied-root.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/6-tied-root.test.
2 | action: "Left"
3 | generated: "A B C max min1 min2"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-3-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/1-3-minmax.test.
2 | action: "Left"
3 | generated: "a b1 b2 c3 cx d5 d6 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/6-tied-root.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/6-tied-root.test.
2 | action: "Left"
3 | generated: "A B C max min1 min2"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-1a-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/2-1a-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 cx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-2a-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/2-2a-vary-depth.test.
2 | action: "Right"
3 | generated: "a b1 b2 c1 c2 cx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-3a-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/2-3a-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c3 c4 cx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-4a-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/2-4a-vary-depth.test.
2 | action: "Right"
3 | generated: "a b1 b2 c3 c4 cx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-1a-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/2-1a-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 cx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-2a-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/2-2a-vary-depth.test.
2 | action: "Right"
3 | generated: "a b1 b2 c1 c2 cx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-3a-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/2-3a-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c3 c4 cx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-4a-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/2-4a-vary-depth.test.
2 | action: "Right"
3 | generated: "a b1 b2 c3 c4 cx"
4 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_grade_tricky.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q7/food_heuristic_grade_tricky.test.
2 | # File intentionally blank.
3 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-1-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/1-1-minmax.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 cx d1 d2 d3 d4 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-2-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/1-2-minmax.test.
2 | action: "Right"
3 | generated: "a b1 b2 c1 c2 cx d1 d2 d3 d4 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-3-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/1-3-minmax.test.
2 | action: "Left"
3 | generated: "a b1 b2 c3 c4 cx d5 d6 d7 d8 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-4-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/1-4-minmax.test.
2 | action: "Right"
3 | generated: "a b1 b2 c3 c4 cx d5 d6 d7 d8 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-1-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/1-1-minmax.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 cx d1 d2 d3 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-2-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/1-2-minmax.test.
2 | action: "Right"
3 | generated: "a b1 b2 c1 c2 cx d1 d2 d3 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-4-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/1-4-minmax.test.
2 | action: "Right"
3 | generated: "a b1 b2 c3 c4 cx d5 d6 d7 d8 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-3b-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/2-3b-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c3 cx d5 d6 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-4b-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/2-4b-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c3 cx d5 d6 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/0-small-tree.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/0-small-tree.test.
2 | action: "pacLeft"
3 | generated: "A B C minLeft minRight root"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-1b-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/2-1b-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 cx d1 d2 d3 d4 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-2b-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/2-2b-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 cx d1 d2 d3 d4 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-3b-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/2-3b-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c3 c4 cx d5 d6 d7 d8 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-4b-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/2-4b-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c3 c4 cx d5 d6 d7 d8 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-1b-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/2-1b-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 cx d1 d2 d3 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-2b-vary-depth.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/2-2b-vary-depth.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 cx d1 d2 d3 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/0-expectimax1.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/0-expectimax1.test.
2 | action: "Left"
3 | generated: "A B C D E F G H I exp1 exp2 exp3 max"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/1-expectimax2.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/1-expectimax2.test.
2 | action: "Left"
3 | generated: "A B C D E F G H I exp1 exp2 exp3 max"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/0-small-tree.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/0-small-tree.test.
2 | action: "pacLeft"
3 | generated: "A B C D deeper minLeft minRight root"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-6-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/1-6-minmax.test.
2 | action: "Left"
3 | generated: "A B C D E F G Z a b1 b2 c1 c2 cx d1 d2 d3 d4 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-7-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/1-7-minmax.test.
2 | action: "Left"
3 | generated: "I J K M O P Z a b1 b2 c3 c4 cx d5 d6 d7 d8 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-8-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/1-8-minmax.test.
2 | action: "Right"
3 | generated: "I J K M O P Z a b1 b2 c3 c4 cx d5 d6 d7 d8 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-one-ghost-3level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/2-one-ghost-3level.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 c3 d1 d2 d3 d5 d6"
4 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_1.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 1"
4 | layout: """
5 | %%%%%%
6 | %....%
7 | %....%
8 | %P...%
9 | %%%%%%
10 | """
11 |
12 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_2.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 2"
4 | layout: """
5 | %%%%%%
6 | % .%
7 | %.P..%
8 | % %
9 | %%%%%%
10 | """
11 |
12 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_4.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 4"
4 | layout: """
5 | %%%%%%
6 | % .%
7 | % .%
8 | %P .%
9 | %%%%%%
10 | """
11 |
12 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_5.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 5"
4 | layout: """
5 | %%%%%%
6 | % %. %
7 | % %%.%
8 | %P. .%
9 | %%%%%%
10 | """
11 |
12 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/0-lecture-6-tree.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/0-lecture-6-tree.test.
2 | action: "Center"
3 | generated: "A B C D E F G H I max min1 min2 min3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-5-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/1-5-minmax.test.
2 | action: "Right"
3 | generated: "A B C D E F G H Z a b1 b2 c1 c2 cx d1 d2 d3 d4 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-6-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/1-6-minmax.test.
2 | action: "Left"
3 | generated: "A B C D E F G H Z a b1 b2 c1 c2 cx d1 d2 d3 d4 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-7-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/1-7-minmax.test.
2 | action: "Left"
3 | generated: "I J K L M N O P Z a b1 b2 c3 c4 cx d5 d6 d7 d8 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-8-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/1-8-minmax.test.
2 | action: "Right"
3 | generated: "I J K L M N O P Z a b1 b2 c3 c4 cx d5 d6 d7 d8 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-1a-check-depth-one-ghost.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/7-1a-check-depth-one-ghost.test.
2 | action: "Left"
3 | generated: "a b1 b2 b3 c1 c2 c3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/0-lecture-6-tree.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/0-lecture-6-tree.test.
2 | action: "Center"
3 | generated: "A B C D E F G H max min1 min2 min3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-5-minmax.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/1-5-minmax.test.
2 | action: "Right"
3 | generated: "A B C D E F G Z a b1 b2 c1 c2 cx d1 d2 d3 d4 dx"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-1a-check-depth-one-ghost.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/7-1a-check-depth-one-ghost.test.
2 | action: "Left"
3 | generated: "a b1 b2 b3 c1 c2 c3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/6-1a-check-depth-one-ghost.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/6-1a-check-depth-one-ghost.test.
2 | action: "Left"
3 | generated: "a b1 b2 b3 c1 c2 c3"
4 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_3.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 3"
4 | layout: """
5 | %%%%%%%
6 | % .%
7 | %. P..%
8 | % %
9 | %%%%%%%
10 | """
11 |
12 |
--------------------------------------------------------------------------------
/Project1/layouts/capsuleClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%
2 | %G. G ....%
3 | %.% % %%%%%% %.%%.%
4 | %.%o% % o% %.o%.%
5 | %.%%%.% %%% %..%.%
6 | %..... P %..%G%
7 | %%%%%%%%%%%%%%%%%%%%
8 |
--------------------------------------------------------------------------------
/Project1/layouts/oddSearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %...%.........%%...%
3 | %.%.%.%%%%%%%%%%.%.%
4 | %..................%
5 | %%%%%%%%.%.%%%%%%%P%
6 | %%%%%%%%....... %
7 | %%%%%%%%%%%%%%%%%%%%
8 |
--------------------------------------------------------------------------------
/Project1/layouts/openSearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %..................%
3 | %..................%
4 | %........P.........%
5 | %..................%
6 | %..................%
7 | %%%%%%%%%%%%%%%%%%%%
8 |
--------------------------------------------------------------------------------
/Project1/layouts/powerClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %o....o%GGGG%o....o%
3 | %..%...%% %%...%..%
4 | %.%o.%........%.o%.%
5 | %.o%.%.%%%%%%.%.%o.%
6 | %........P.........%
7 | %%%%%%%%%%%%%%%%%%%%
8 |
--------------------------------------------------------------------------------
/Project1/layouts/smallClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %......%G G%......%
3 | %.%%...%% %%...%%.%
4 | %.%o.%........%.o%.%
5 | %.%%.%.%%%%%%.%.%%.%
6 | %........P.........%
7 | %%%%%%%%%%%%%%%%%%%%
8 |
--------------------------------------------------------------------------------
/Project1/layouts/trickySearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %. ..% %
3 | %.%%.%%.%%.%%.%% % %
4 | % P % %
5 | %%%%%%%%%%%%%%%%%% %
6 | %..... %
7 | %%%%%%%%%%%%%%%%%%%%
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_12.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 12"
4 | layout: """
5 | %%%%
6 | % .%
7 | % %
8 | %P %
9 | % %
10 | % .%
11 | %%%%
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_6.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 6"
4 | layout: """
5 | %%%%%%%%
6 | % %
7 | %. P .%
8 | % %
9 | %%%%%%%%
10 | """
11 |
12 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_7.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 7"
4 | layout: """
5 | %%%%%%%%
6 | % %
7 | % P %
8 | %. . .%
9 | %%%%%%%%
10 | """
11 |
12 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_8.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 8"
4 | layout: """
5 | %%%%%%%%
6 | % %
7 | % P.%
8 | % %
9 | %%%%%%%%
10 | """
11 |
12 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_9.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 9"
4 | layout: """
5 | %%%%%%%%
6 | % %
7 | %P. .%
8 | % %
9 | %%%%%%%%
10 | """
11 |
12 |
--------------------------------------------------------------------------------
/Project2/layouts/capsuleClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%
2 | %G. G ....%
3 | %.% % %%%%%% %.%%.%
4 | %.%o% % o% %.o%.%
5 | %.%%%.% %%% %..%.%
6 | %..... P %..%G%
7 | %%%%%%%%%%%%%%%%%%%%
8 |
--------------------------------------------------------------------------------
/Project2/layouts/smallClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %......%G G%......%
3 | %.%%...%% %%...%%.%
4 | %.%o.%........%.o%.%
5 | %.%%.%.%%%%%%.%.%%.%
6 | %........P.........%
7 | %%%%%%%%%%%%%%%%%%%%
8 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-one-ghost-3level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/2-one-ghost-3level.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 c3 c4 d1 d2 d3 d4 d5 d6 d7 d8"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/4-two-ghosts-3level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/4-two-ghosts-3level.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 c3 c4 d1 d2 d3 d4 d5 d6 d7 d8"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-2a-check-depth-two-ghosts.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/7-2a-check-depth-two-ghosts.test.
2 | action: "Left"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/4-two-ghosts-3level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/4-two-ghosts-3level.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 c3 c4 d1 d2 d3 d4 d5 d6 d7"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-2a-check-depth-two-ghosts.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/7-2a-check-depth-two-ghosts.test.
2 | action: "Left"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/2-one-ghost-3level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/2-one-ghost-3level.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 c3 c4 d1 d2 d3 d4 d5 d6 d7 d8"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/4-two-ghosts-3level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/4-two-ghosts-3level.test.
2 | action: "Left"
3 | generated: "a b1 b2 c1 c2 c3 c4 d1 d2 d3 d4 d5 d6 d7 d8"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/6-2a-check-depth-two-ghosts.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/6-2a-check-depth-two-ghosts.test.
2 | action: "Left"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/3-one-ghost-4level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/3-one-ghost-4level.test.
2 | action: "Left"
3 | generated: "A B C D E F I K a b1 b2 c1 c2 c3 d1 d2 d3 d5 d6"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/5-two-ghosts-4level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/5-two-ghosts-4level.test.
2 | action: "Left"
3 | generated: "A B C D E G H I J a b1 b2 c1 c2 c3 d1 d2 d3 d4 d5"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-1b-check-depth-one-ghost.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/7-1b-check-depth-one-ghost.test.
2 | action: "Center"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-1b-check-depth-one-ghost.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/7-1b-check-depth-one-ghost.test.
2 | action: "Center"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/6-1b-check-depth-one-ghost.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/6-1b-check-depth-one-ghost.test.
2 | action: "Center"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3"
4 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_13.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 13"
4 | layout: """
5 | %%%%%%%%
6 | %.%....%
7 | %.% %%.%
8 | %.%P%%.%
9 | %... .%
10 | %%%%%%%%
11 | """
12 |
13 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/3-one-ghost-4level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/3-one-ghost-4level.test.
2 | action: "Left"
3 | generated: "A B C D E F G H I J K L M N O P a b1 b2 c1 c2 c3 c4 d1 d2 d3 d4 d5 d6 d7 d8"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-1c-check-depth-one-ghost.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/7-1c-check-depth-one-ghost.test.
2 | action: "Right"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3 f1 f2 f3 g1 g2 g3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-2b-check-depth-two-ghosts.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/7-2b-check-depth-two-ghosts.test.
2 | action: "Center"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3 f1 f2 f3 g1 g2 g3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-1c-check-depth-one-ghost.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/7-1c-check-depth-one-ghost.test.
2 | action: "Right"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3 f1 f2 f3 g1 g2 g3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-2b-check-depth-two-ghosts.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/7-2b-check-depth-two-ghosts.test.
2 | action: "Center"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3 f1 f2 f3 g1 g2 g3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/3-one-ghost-4level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/3-one-ghost-4level.test.
2 | action: "Right"
3 | generated: "A B C D E F G H I J K L M N O P a b1 b2 c1 c2 c3 c4 d1 d2 d3 d4 d5 d6 d7 d8"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/6-1c-check-depth-one-ghost.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/6-1c-check-depth-one-ghost.test.
2 | action: "Right"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3 f1 f2 f3 g1 g2 g3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/6-2b-check-depth-two-ghosts.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/6-2b-check-depth-two-ghosts.test.
2 | action: "Center"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3 f1 f2 f3 g1 g2 g3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/5-two-ghosts-4level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/5-two-ghosts-4level.test.
2 | action: "Left"
3 | generated: "A B C D E F G H I J K L M N O P a b1 b2 c1 c2 c3 c4 d1 d2 d3 d4 d5 d6 d7 d8"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/5-two-ghosts-4level.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/5-two-ghosts-4level.test.
2 | action: "Left"
3 | generated: "A B C D E F G H I J K L M N O P a b1 b2 c1 c2 c3 c4 d1 d2 d3 d4 d5 d6 d7 d8"
4 |
--------------------------------------------------------------------------------
/Project1/layouts/mediumSafeSearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | %.% ....%% G %%%%%% o%%.%
3 | %.%o%%%%%%%.%%%%%%% %%%%%.%
4 | % %%%.%%%%%.%%%%%%%.%%%.%.%%%.%
5 | % ..........Po...%.........%
6 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 |
--------------------------------------------------------------------------------
/Project1/test_cases/q6/corner_sanity_1.test:
--------------------------------------------------------------------------------
1 | class: "CornerHeuristicSanity"
2 | points: "1"
3 |
4 | # The following specifies the layout to be used
5 | layout: """
6 | %%%%%%
7 | %. .%
8 | %P %
9 | %. .%
10 | %%%%%%
11 | """
12 |
13 |
--------------------------------------------------------------------------------
/Project1/test_cases/q6/corner_sanity_2.test:
--------------------------------------------------------------------------------
1 | class: "CornerHeuristicSanity"
2 | points: "1"
3 |
4 | # The following specifies the layout to be used
5 | layout: """
6 | %%%%%%
7 | %. .%
8 | % %% %
9 | %.P%.%
10 | %%%%%%
11 | """
12 |
13 |
--------------------------------------------------------------------------------
/Project1/layouts/smallSafeSearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%
2 | %.. % G %
3 | %%% %%%%%
4 | % %
5 | %%%%%%% %
6 | % %
7 | % %%%%% %
8 | % % %
9 | %%%%% % %
10 | % %o%
11 | % %%%%%%%
12 | % .%
13 | %%%%%%%.%
14 | %Po .%
15 | %%%%%%%%%
16 |
--------------------------------------------------------------------------------
/Project1/test_cases/q5/corner_tiny_corner.test:
--------------------------------------------------------------------------------
1 | class: "CornerProblemTest"
2 |
3 | layoutName: "tinyCorner"
4 | layout: """
5 | %%%%%%%%
6 | %. .%
7 | % P %
8 | % %%%% %
9 | % % %
10 | % % %%%%
11 | %.% .%
12 | %%%%%%%%
13 | """
14 |
15 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-2c-check-depth-two-ghosts.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/7-2c-check-depth-two-ghosts.test.
2 | action: "Right"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3 f1 f2 f3 g1 g2 g3 h1 h2 h3 i1 i2 i3 j1 j2 j3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-2c-check-depth-two-ghosts.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/7-2c-check-depth-two-ghosts.test.
2 | action: "Right"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3 f1 f2 f3 g1 g2 g3 h1 h2 h3 i1 i2 i3 j1 j2 j3"
4 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/6-2c-check-depth-two-ghosts.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/6-2c-check-depth-two-ghosts.test.
2 | action: "Right"
3 | generated: "a b1 b2 b3 c1 c2 c3 d1 d2 d3 e1 e2 e3 f1 f2 f3 g1 g2 g3 h1 h2 h3 i1 i2 i3 j1 j2 j3"
4 |
--------------------------------------------------------------------------------
/Project1/layouts/contestClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %o...%........%...o%
3 | %.%%.%.%%..%%.%.%%.%
4 | %...... G GG%......%
5 | %.%.%%.%% %%%.%%.%.%
6 | %.%....% ooo%.%..%.%
7 | %.%.%%.% %% %.%.%%.%
8 | %o%......P....%....%
9 | %%%%%%%%%%%%%%%%%%%%
10 |
--------------------------------------------------------------------------------
/Project2/layouts/contestClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %o...%........%...o%
3 | %.%%.%.%%..%%.%.%%.%
4 | %...... G GG%......%
5 | %.%.%%.%% %%%.%%.%.%
6 | %.%....% ooo%.%..%.%
7 | %.%.%%.% %% %.%.%%.%
8 | %o%......P....%....%
9 | %%%%%%%%%%%%%%%%%%%%
10 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_1.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 1"
6 | layout: """
7 | %%%%%%
8 | % %
9 | % %
10 | %P %
11 | %%%%%%
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_5.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 5"
6 | layout: """
7 | %%%%%%
8 | %....%
9 | %....%
10 | %P...%
11 | %%%%%%
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_6.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 6"
6 | layout: """
7 | %%%%%%
8 | % .%
9 | %.P..%
10 | % %
11 | %%%%%%
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_8.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 8"
6 | layout: """
7 | %%%%%%
8 | % .%
9 | % .%
10 | %P .%
11 | %%%%%%
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_9.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 9"
6 | layout: """
7 | %%%%%%
8 | % %. %
9 | % %%.%
10 | %P. .%
11 | %%%%%%
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_7.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 7"
6 | layout: """
7 | %%%%%%%
8 | % .%
9 | %. P..%
10 | % %
11 | %%%%%%%
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_10.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 10"
6 | layout: """
7 | %%%%%%%%
8 | % %
9 | %. P .%
10 | % %
11 | %%%%%%%%
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_11.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 11"
6 | layout: """
7 | %%%%%%%%
8 | % %
9 | % P %
10 | %. . .%
11 | %%%%%%%%
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_12.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 12"
6 | layout: """
7 | %%%%%%%%
8 | % %
9 | % P.%
10 | % %
11 | %%%%%%%%
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_13.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 13"
6 | layout: """
7 | %%%%%%%%
8 | % %
9 | %P. .%
10 | % %
11 | %%%%%%%%
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_16.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 16"
6 | layout: """
7 | %%%%
8 | % .%
9 | % %
10 | %P %
11 | % %
12 | % .%
13 | %%%%
14 | """
15 |
16 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_3.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 3"
6 | layout: """
7 | %%%%
8 | % %
9 | % %
10 | %P %
11 | % %
12 | % %
13 | %%%%
14 | """
15 |
16 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_4.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 4"
6 | layout: """
7 | %%%%%%%%
8 | % % %
9 | % % %% %
10 | % %P%% %
11 | % %
12 | %%%%%%%%
13 | """
14 |
15 |
--------------------------------------------------------------------------------
/Project1/test_cases/q6/corner_sanity_3.test:
--------------------------------------------------------------------------------
1 | class: "CornerHeuristicSanity"
2 | points: "1"
3 |
4 | # The following specifies the layout to be used
5 | layout: """
6 | %%%%%%%%
7 | %.% .%
8 | % % % %
9 | % % %P %
10 | % % %
11 | %%%%% %
12 | %. .%
13 | %%%%%%%%
14 | """
15 |
16 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_17.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 17"
6 | layout: """
7 | %%%%%%%%
8 | %.%....%
9 | %.% %%.%
10 | %.%P%%.%
11 | %... .%
12 | %%%%%%%%
13 | """
14 |
15 |
--------------------------------------------------------------------------------
/Project1/layouts/smallMaze.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%
2 | % %% % % %
3 | % %%%%%% % %%%%%% %
4 | %%%%%% P % %
5 | % % %%%%%% %% %%%%%
6 | % %%%% % % %
7 | % %%% %%% % %
8 | %%%%%%%%%% %%%%%% %
9 | %. %% %
10 | %%%%%%%%%%%%%%%%%%%%%%
--------------------------------------------------------------------------------
/Project1/layouts/boxSearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%
2 | %. . . . . % %
3 | % % %
4 | %. . . . . %G%
5 | % % %
6 | %. . . . . % %
7 | % % %
8 | %. . . . . % %
9 | % P %G%
10 | %. . . . . % %
11 | % % %
12 | %. . . . . % %
13 | % % %
14 | %%%%%%%%%%%%%%
15 |
--------------------------------------------------------------------------------
/Project1/layouts/openClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%
2 | %.. P .... .... %
3 | %.. ... ... ... ... %
4 | %.. ... ... ... ... %
5 | %.. .... .... G %
6 | %.. ... ... ... ... %
7 | %.. ... ... ... ... %
8 | %.. .... .... o%
9 | %%%%%%%%%%%%%%%%%%%%%%%%%
10 |
--------------------------------------------------------------------------------
/Project1/test_cases/q6/corner_sanity_1.solution:
--------------------------------------------------------------------------------
1 | # In order for a heuristic to be admissible, the value
2 | # of the heuristic must be less at each state than the
3 | # true cost of the optimal path from that state to a goal.
4 | cost: "8"
5 | path: """
6 | North South South East East East North North
7 | """
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q6/corner_sanity_2.solution:
--------------------------------------------------------------------------------
1 | # In order for a heuristic to be admissible, the value
2 | # of the heuristic must be less at each state than the
3 | # true cost of the optimal path from that state to a goal.
4 | cost: "8"
5 | path: """
6 | West North North East East East South South
7 | """
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_10.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 10"
4 | layout: """
5 | %%%%%%%%%%
6 | % %
7 | % ...%...%
8 | % .%.%.%.%
9 | % .%.%.%.%
10 | % .%.%.%.%
11 | % .%.%.%.%
12 | % .%.%.%.%
13 | %P.%...%.%
14 | % %
15 | %%%%%%%%%%
16 | """
17 |
18 |
--------------------------------------------------------------------------------
/Project2/layouts/openClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%
2 | %.. P .... .... %
3 | %.. ... ... ... ... %
4 | %.. ... ... ... ... %
5 | %.. .... .... G %
6 | %.. ... ... ... ... %
7 | %.. ... ... ... ... %
8 | %.. .... .... o%
9 | %%%%%%%%%%%%%%%%%%%%%%%%%
10 |
--------------------------------------------------------------------------------
/Project1/layouts/bigSafeSearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | %.%.........%% G % o%%%%.....%
3 | %.%.%%%%%%%.%%%%%% %%%%%%%.%%.%
4 | %............%...%............%
5 | %%%%%...%%%.. ..%.%...%.%%%
6 | %o%%%.%%%%%.%%%%%%%.%%%.%.%%%%%
7 | % ..........Po...%...%. o%
8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 |
--------------------------------------------------------------------------------
/Project1/layouts/mediumClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %o...%........%....%
3 | %.%%.%.%%%%%%.%.%%.%
4 | %.%..............%.%
5 | %.%.%%.%% %%.%%.%.%
6 | %......%G G%......%
7 | %.%.%%.%%%%%%.%%.%.%
8 | %.%..............%.%
9 | %.%%.%.%%%%%%.%.%%.%
10 | %....%...P....%...o%
11 | %%%%%%%%%%%%%%%%%%%%
12 |
--------------------------------------------------------------------------------
/Project1/layouts/mediumSearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | %............%%%%%............%
3 | %%%.%...%%%.........%.%...%.%%%
4 | %...%%%.%.%%%%.%.%%%%%%.%%%...%
5 | %.%.....%......%......%.....%.%
6 | %.%%%.%%%%%.%%%%%%%.%%%.%.%%%%%
7 | %.....%........P....%...%.....%
8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 |
--------------------------------------------------------------------------------
/Project2/layouts/mediumClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %o...%........%....%
3 | %.%%.%.%%%%%%.%.%%.%
4 | %.%..............%.%
5 | %.%.%%.%% %%.%%.%.%
6 | %......%G G%......%
7 | %.%.%%.%%%%%%.%%.%.%
8 | %.%..............%.%
9 | %.%%.%.%%%%%%.%.%%.%
10 | %....%...P....%...o%
11 | %%%%%%%%%%%%%%%%%%%%
12 |
--------------------------------------------------------------------------------
/Project1/layouts/contoursMaze.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%
2 | % %
3 | % %
4 | % %
5 | % %
6 | % P %
7 | % %
8 | % %
9 | % %
10 | %. %
11 | %%%%%%%%%%%%%%%%%%%%%
--------------------------------------------------------------------------------
/Project2/test_cases/extra/grade-agent.test:
--------------------------------------------------------------------------------
1 | class: "EvalAgentTest"
2 |
3 | agentName: "ContestAgent"
4 | layoutName: "contestClassic"
5 | maxTime: "180"
6 | numGames: "5"
7 |
8 | scoreThresholds: "2500 2900"
9 |
10 | randomSeed: "0"
11 | ghosts: "[DirectionalGhost(1), DirectionalGhost(2), DirectionalGhost(3)]"
12 |
--------------------------------------------------------------------------------
/Project1/test_cases/q2/graph_bfs_vs_dfs.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/graph_bfs_vs_dfs.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "1:A->G"
5 | expanded_states: "A B"
6 | rev_solution: "1:A->G"
7 | rev_expanded_states: "A D"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/graph_bfs_vs_dfs.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/graph_bfs_vs_dfs.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "1:A->G"
5 | expanded_states: "A B"
6 | rev_solution: "1:A->G"
7 | rev_expanded_states: "A B"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q1/graph_backtrack.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q1/graph_backtrack.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "1:A->C 0:C->G"
5 | expanded_states: "A D C"
6 | rev_solution: "1:A->C 0:C->G"
7 | rev_expanded_states: "A B C"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/astar_0.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/astar_0.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "Right Down Down"
5 | expanded_states: "A B D C G"
6 | rev_solution: "Right Down Down"
7 | rev_expanded_states: "A B D C G"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q2/graph_backtrack.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/graph_backtrack.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "1:A->C 0:C->G"
5 | expanded_states: "A B C D"
6 | rev_solution: "1:A->C 0:C->G"
7 | rev_expanded_states: "A D C B"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/graph_backtrack.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/graph_backtrack.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "1:A->C 0:C->G"
5 | expanded_states: "A B C D"
6 | rev_solution: "1:A->C 0:C->G"
7 | rev_expanded_states: "A B C D"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_0_graph.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/ucs_0_graph.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "Right Down Down"
5 | expanded_states: "A B D C G"
6 | rev_solution: "Right Down Down"
7 | rev_expanded_states: "A B D C G"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/astar_1_graph_heuristic.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/astar_1_graph_heuristic.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "0 0 2"
5 | expanded_states: "S A D C"
6 | rev_solution: "0 0 2"
7 | rev_expanded_states: "S A D C"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/graph_backtrack.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/graph_backtrack.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "1:A->C 0:C->G"
5 | expanded_states: "A B C D"
6 | rev_solution: "1:A->C 0:C->G"
7 | rev_expanded_states: "A B C D"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q8/closest_dot_11.test:
--------------------------------------------------------------------------------
1 | class: "ClosestDotTest"
2 |
3 | layoutName: "Test 11"
4 | layout: """
5 | %%%
6 | % %
7 | % %
8 | % %
9 | % %
10 | % %
11 | %.%
12 | %.%
13 | % %
14 | % %
15 | % %
16 | % %
17 | % %
18 | % %
19 | % %
20 | %.%
21 | % %
22 | %P%
23 | % %
24 | % %
25 | % %
26 | % %
27 | %.%
28 | %%%
29 | """
30 |
31 |
--------------------------------------------------------------------------------
/Project1/test_cases/q1/graph_bfs_vs_dfs.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q1/graph_bfs_vs_dfs.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "2:A->D 0:D->G"
5 | expanded_states: "A D"
6 | rev_solution: "0:A->B 0:B->D 0:D->G"
7 | rev_expanded_states: "A B D"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q1/graph_infinite.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q1/graph_infinite.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "0:A->B 1:B->C 1:C->G"
5 | expanded_states: "A B C"
6 | rev_solution: "0:A->B 1:B->C 1:C->G"
7 | rev_expanded_states: "A B C"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q2/graph_infinite.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/graph_infinite.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "0:A->B 1:B->C 1:C->G"
5 | expanded_states: "A B C"
6 | rev_solution: "0:A->B 1:B->C 1:C->G"
7 | rev_expanded_states: "A B C"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/graph_infinite.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/graph_infinite.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "0:A->B 1:B->C 1:C->G"
5 | expanded_states: "A B C"
6 | rev_solution: "0:A->B 1:B->C 1:C->G"
7 | rev_expanded_states: "A B C"
8 |
--------------------------------------------------------------------------------
/Project1/layouts/trickyClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %o...%........%...o%
3 | %.%%.%.%%..%%.%.%%.%
4 | %.%.....%..%.....%.%
5 | %.%.%%.%% %%.%%.%.%
6 | %...... GGGG%.%....%
7 | %.%....%%%%%%.%..%.%
8 | %.%....% oo%.%..%.%
9 | %.%....% %%%%.%..%.%
10 | %.%...........%..%.%
11 | %.%%.%.%%%%%%.%.%%.%
12 | %o...%...P....%...o%
13 | %%%%%%%%%%%%%%%%%%%%
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_5_goalAtDequeue.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/ucs_5_goalAtDequeue.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "1:A->B 0:B->C 0:C->G"
5 | expanded_states: "A B C"
6 | rev_solution: "1:A->B 0:B->C 0:C->G"
7 | rev_expanded_states: "A B C"
8 |
--------------------------------------------------------------------------------
/Project2/layouts/trickyClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%
2 | %o...%........%...o%
3 | %.%%.%.%%..%%.%.%%.%
4 | %.%.....%..%.....%.%
5 | %.%.%%.%% %%.%%.%.%
6 | %...... GGGG%.%....%
7 | %.%....%%%%%%.%..%.%
8 | %.%....% oo%.%..%.%
9 | %.%....% %%%%.%..%.%
10 | %.%...........%..%.%
11 | %.%%.%.%%%%%%.%.%%.%
12 | %o...%...P....%...o%
13 | %%%%%%%%%%%%%%%%%%%%
14 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_4_testSearch.test:
--------------------------------------------------------------------------------
1 | class: "PacmanSearchTest"
2 | algorithm: "uniformCostSearch"
3 | points: "0.5"
4 |
5 | # The following specifies the layout to be used
6 | layoutName: "testSearch"
7 | layout: """
8 | %%%%%
9 | %.P %
10 | %%% %
11 | %. %
12 | %%%%%
13 | """
14 | searchProblemClass: "FoodSearchProblem"
15 | leewayFactor: "2"
16 |
17 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/astar_3_goalAtDequeue.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/astar_3_goalAtDequeue.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "1:A->B 0:B->C 0:C->G"
5 | expanded_states: "A B C"
6 | rev_solution: "1:A->B 0:B->C 0:C->G"
7 | rev_expanded_states: "A B C"
8 |
--------------------------------------------------------------------------------
/Project2/test_cases/q1/grade-agent.test:
--------------------------------------------------------------------------------
1 | class: "EvalAgentTest"
2 |
3 | agentName: "ReflexAgent"
4 | layoutName: "openClassic"
5 | maxTime: "120"
6 | numGames: "10"
7 |
8 |
9 | nonTimeoutMinimum: "10"
10 |
11 | scoreThresholds: "500 1000"
12 |
13 | winsMinimum: "1"
14 | winsThresholds: "5 10"
15 |
16 |
17 | randomSeed: "0"
18 | ghosts: "[RandomGhost(1)]"
19 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_14.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 14"
6 | layout: """
7 | %%%%%%%%%%
8 | % %
9 | % ...%...%
10 | % .%.%.%.%
11 | % .%.%.%.%
12 | % .%.%.%.%
13 | % .%.%.%.%
14 | % .%.%.%.%
15 | %P.%...%.%
16 | % %
17 | %%%%%%%%%%
18 | """
19 |
20 |
--------------------------------------------------------------------------------
/Project1/test_cases/q2/graph_manypaths.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/graph_manypaths.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "1:A->C 0:C->D 1:D->F 0:F->G"
5 | expanded_states: "A B1 C B2 D E1 F E2"
6 | rev_solution: "1:A->C 0:C->D 1:D->F 0:F->G"
7 | rev_expanded_states: "A B2 C B1 D E2 F E1"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/graph_manypaths.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/graph_manypaths.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "1:A->C 0:C->D 1:D->F 0:F->G"
5 | expanded_states: "A B1 C B2 D E1 F E2"
6 | rev_solution: "1:A->C 0:C->D 1:D->F 0:F->G"
7 | rev_expanded_states: "A B1 C B2 D E1 F E2"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/graph_manypaths.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/graph_manypaths.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "1:A->C 0:C->D 1:D->F 0:F->G"
5 | expanded_states: "A B1 C B2 D E1 F E2"
6 | rev_solution: "1:A->C 0:C->D 1:D->F 0:F->G"
7 | rev_expanded_states: "A B1 C B2 D E1 F E2"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q1/graph_manypaths.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q1/graph_manypaths.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | solution: "2:A->B2 0:B2->C 0:C->D 2:D->E2 0:E2->F 0:F->G"
5 | expanded_states: "A B2 C D E2 F"
6 | rev_solution: "0:A->B1 0:B1->C 0:C->D 0:D->E1 0:E1->F 0:F->G"
7 | rev_expanded_states: "A B1 C D E1 F"
8 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_15.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 15"
6 | layout: """
7 | %%%
8 | % %
9 | % %
10 | % %
11 | % %
12 | % %
13 | %.%
14 | %.%
15 | % %
16 | % %
17 | % %
18 | % %
19 | % %
20 | % %
21 | % %
22 | %.%
23 | % %
24 | %P%
25 | % %
26 | % %
27 | % %
28 | % %
29 | %.%
30 | %%%
31 | """
32 |
33 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_2.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicTest"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "Test 2"
6 | layout: """
7 | %%%
8 | % %
9 | % %
10 | % %
11 | % %
12 | % %
13 | % %
14 | % %
15 | % %
16 | % %
17 | % %
18 | % %
19 | % %
20 | % %
21 | % %
22 | % %
23 | % %
24 | %P%
25 | % %
26 | % %
27 | % %
28 | % %
29 | % %
30 | %%%
31 | """
32 |
33 |
--------------------------------------------------------------------------------
/Project2/test_cases/q5/grade-agent.test:
--------------------------------------------------------------------------------
1 | class: "EvalAgentTest"
2 |
3 | agentName: "ExpectimaxAgent"
4 | agentArgs: "evalFn=better"
5 | layoutName: "smallClassic"
6 | maxTime: "120"
7 | numGames: "10"
8 |
9 | nonTimeoutMinimum: "0"
10 | nonTimeoutThresholds: "10"
11 |
12 | scoreThresholds: "500 1000"
13 |
14 | winsMinimum: "1"
15 | winsThresholds: "1 5 10"
16 |
17 | randomSeed: "0"
18 | ghosts: "[RandomGhost(1)]"
19 |
--------------------------------------------------------------------------------
/Project1/test_cases/q6/corner_sanity_3.solution:
--------------------------------------------------------------------------------
1 | # In order for a heuristic to be admissible, the value
2 | # of the heuristic must be less at each state than the
3 | # true cost of the optimal path from that state to a goal.
4 | cost: "28"
5 | path: """
6 | South South South West West West West East East East East East North
7 | North North North North West West West South South South West West
8 | North North North
9 | """
10 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/8-pacman-game.test:
--------------------------------------------------------------------------------
1 | class: "PacmanGameTreeTest"
2 | alg: "MinimaxAgent"
3 | seed: "0"
4 | depth: "2"
5 | max_points: "4"
6 |
7 | # The following specifies the layout to be used
8 | layoutName: "smallClassic"
9 | layout: """
10 | %%%%%%%%%%%%%%%%%%%%
11 | %......%G G%......%
12 | %.%%...%% %%...%%.%
13 | %.%o.%........%.o%.%
14 | %.%%.%.%%%%%%.%.%%.%
15 | %........P.........%
16 | %%%%%%%%%%%%%%%%%%%%
17 | """
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/8-pacman-game.test:
--------------------------------------------------------------------------------
1 | class: "PacmanGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | seed: "0"
4 | depth: "2"
5 | max_points: "4"
6 |
7 | # The following specifies the layout to be used
8 | layoutName: "smallClassic"
9 | layout: """
10 | %%%%%%%%%%%%%%%%%%%%
11 | %......%G G%......%
12 | %.%%...%% %%...%%.%
13 | %.%o.%........%.o%.%
14 | %.%%.%.%%%%%%.%.%%.%
15 | %........P.........%
16 | %%%%%%%%%%%%%%%%%%%%
17 | """
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/7-pacman-game.test:
--------------------------------------------------------------------------------
1 | class: "PacmanGameTreeTest"
2 | alg: "ExpectimaxAgent"
3 | seed: "0"
4 | depth: "2"
5 | max_points: "4"
6 |
7 | # The following specifies the layout to be used
8 | layoutName: "smallClassic"
9 | layout: """
10 | %%%%%%%%%%%%%%%%%%%%
11 | %......%G G%......%
12 | %.%%...%% %%...%%.%
13 | %.%o.%........%.o%.%
14 | %.%%.%.%%%%%%.%.%%.%
15 | %........P.........%
16 | %%%%%%%%%%%%%%%%%%%%
17 | """
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_4_testSearch.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/ucs_4_testSearch.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | # Number of nodes expanded must be with a factor of 2.0 of the numbers below.
5 | solution: """
6 | West East East South South West West
7 | """
8 | expanded_nodes: "14"
9 | rev_solution: """
10 | West East East South South West West
11 | """
12 | rev_expanded_nodes: "13"
13 |
--------------------------------------------------------------------------------
/Project1/layouts/mediumCorners.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | %. % % % %.%
3 | % % % %%%%%% %%%%%%% % %
4 | % % % % % %
5 | %%%%% %%%%% %%% %% %%%%% % %%%
6 | % % % % % % % % %
7 | % %%% % % % %%%%%%%% %%% %%% %
8 | % % %% % % % %
9 | %%% % %%%%%%% %%%% %%% % % % %
10 | % % %% % % %
11 | % % %%%%% % %%%% % %%% %%% % %
12 | % % % % % % %%% %
13 | %. %P%%%%% % %%% % .%
14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--------------------------------------------------------------------------------
/Project2/test_cases/q2/6-tied-root.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | max
7 | / \
8 | min1 min2
9 | | / \
10 | A B C
11 | 10 10 0
12 | """
13 | num_agents: "2"
14 |
15 | start_state: "max"
16 | win_states: "A B"
17 | lose_states: "C"
18 |
19 | successors: """
20 | max Left min1
21 | max Right min2
22 | min1 Down A
23 | min2 Left B
24 | min2 Right C
25 | """
26 |
27 | evaluation: """
28 | A 10.0
29 | B 10.0
30 | C 0.0
31 | """
32 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/6-tied-root.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | max
7 | / \
8 | min1 min2
9 | | / \
10 | A B C
11 | 10 10 0
12 | """
13 | num_agents: "2"
14 |
15 | start_state: "max"
16 | win_states: "A B"
17 | lose_states: "C"
18 |
19 | successors: """
20 | max Left min1
21 | max Right min2
22 | min1 Down A
23 | min2 Left B
24 | min2 Right C
25 | """
26 |
27 | evaluation: """
28 | A 10.0
29 | B 10.0
30 | C 0.0
31 | """
32 |
--------------------------------------------------------------------------------
/Project1/test_cases/q7/food_heuristic_grade_tricky.test:
--------------------------------------------------------------------------------
1 | class: "HeuristicGrade"
2 |
3 | heuristic: "foodHeuristic"
4 | searchProblemClass: "FoodSearchProblem"
5 | layoutName: "trickySearch"
6 | layout: """
7 | %%%%%%%%%%%%%%%%%%%%
8 | %. ..% %
9 | %.%%.%%.%%.%%.%% % %
10 | % P % %
11 | %%%%%%%%%%%%%%%%%% %
12 | %..... %
13 | %%%%%%%%%%%%%%%%%%%%
14 | """
15 | # One point always, an extra point for each
16 | # threshold passed.
17 | basePoints: "1"
18 | gradingThresholds: "15000 12000 9000 7000"
19 |
20 |
--------------------------------------------------------------------------------
/Project1/layouts/bigSearch.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | %.....%.................%.....%
3 | %.%%%.%.%%%.%%%%%%%.%%%.%.....%
4 | %.%...%.%......%......%.%.....%
5 | %...%%%.%.%%%%.%.%%%%...%%%...%
6 | %%%.%.%.%.%......%..%.%...%.%%%
7 | %...%.%%%.%.%%% %%%.%.%%%.%...%
8 | %.%%%.......% %.......%%%.%
9 | %...%.%%%%%.%%%%%%%.%.%%%.%...%
10 | %%%.%...%.%....%....%.%...%.%%%
11 | %...%%%.%.%%%%.%.%%%%.%.%%%...%
12 | %.......%......%......%.....%.%
13 | %.....%.%%%.%%%%%%%.%%%.%.%%%.%
14 | %.....%........P....%...%.....%
15 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://opensource.org/licenses/MIT)
2 | # Pacman project
3 |
4 |
5 |
6 |
7 |
8 | I have completed two Pacman projects of the UC Berkeley CS188 Intro to AI course, and you can find my solutions accompanied by comments.
9 |
10 | ## Links
11 | 1. http://ai.berkeley.edu/search.html
12 | 2. http://ai.berkeley.edu/multiagent.html
13 |
14 | ## Author
15 | * Petropoulakis Panagiotis petropoulakispanagiotis@gmail.com
16 |
--------------------------------------------------------------------------------
/Project1/test_cases/q6/medium_corners.test:
--------------------------------------------------------------------------------
1 | class: "CornerHeuristicPacman"
2 |
3 | # The following specifies the layout to be used
4 | layout: """
5 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 | %. % % % %.%
7 | % % % %%%%%% %%%%%%% % %
8 | % % % % % %
9 | %%%%% %%%%% %%% %% %%%%% % %%%
10 | % % % % % % % % %
11 | % %%% % % % %%%%%%%% %%% %%% %
12 | % % %% % % % %
13 | %%% % %%%%%%% %%%% %%% % % % %
14 | % % %% % % %
15 | % % %%%%% % %%%% % %%% %%% % %
16 | % % % % % % %%% %
17 | %. %P%%%%% % %%% % .%
18 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19 | """
20 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/0-small-tree.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | root
7 | / \
8 | minLeft minRight
9 | / \ / \
10 | A B C deeper
11 | 4 3 2 |
12 | D
13 | 1000
14 | """
15 | num_agents: "2"
16 |
17 | start_state: "root"
18 | win_states: "A C"
19 | lose_states: "B D"
20 |
21 | successors: """
22 | root pacLeft minLeft
23 | root pacRight minRight
24 | minLeft gLeft A
25 | minLeft gRight B
26 | minRight gLeft C
27 | minRight gRight deeper
28 | deeper pacLeft D
29 | """
30 |
31 | evaluation: """
32 | A 4.0
33 | B 3.0
34 | C 2.0
35 | D 1000.0
36 | """
37 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/0-small-tree.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | root
7 | / \
8 | minLeft minRight
9 | / \ / \
10 | A B C deeper
11 | 4 3 2 |
12 | D
13 | 1000
14 | """
15 | num_agents: "2"
16 |
17 | start_state: "root"
18 | win_states: "A C"
19 | lose_states: "B D"
20 |
21 | successors: """
22 | root pacLeft minLeft
23 | root pacRight minRight
24 | minLeft gLeft A
25 | minLeft gRight B
26 | minRight gLeft C
27 | minRight gRight deeper
28 | deeper pacLeft D
29 | """
30 |
31 | evaluation: """
32 | A 4.0
33 | B 3.0
34 | C 2.0
35 | D 1000.0
36 | """
37 |
--------------------------------------------------------------------------------
/Project1/layouts/mediumMaze.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % P%
3 | % %%%%%%%%%%%%%%%%%%%%%%% %%%%%%%% %
4 | % %% % % %%%%%%% %% %
5 | % %% % % % % %%%% %%%%%%%%% %% %%%%%
6 | % %% % % % % %% %% %
7 | % %% % % % % % %%%% %%% %%%%%% %
8 | % % % % % % %% %%%%%%%% %
9 | % %% % % %%%%%%%% %% %% %%%%%
10 | % %% % %% %%%%%%%%% %% %
11 | % %%%%%% %%%%%%% %% %%%%%% %
12 | %%%%%% % %%%% %% % %
13 | % %%%%%% %%%%% % %% %% %%%%%
14 | % %%%%%% % %%%%% %% %
15 | % %%%%%% %%%%%%%%%%% %% %% %
16 | %%%%%%%%%% %%%%%% %
17 | %. %%%%%%%%%%%%%%%% %
18 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--------------------------------------------------------------------------------
/Project1/layouts/mediumDottedMaze.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % P%
3 | % %%%%%%%%%%%%%%%%%%% %%% %%%%%%%% %
4 | % %% % % %%% %%% %% ... %
5 | % %% % % % % %%%% %%%%%%%%% %% %%%%%
6 | % %% % % % % % %% %% %% ... %
7 | % %% % % % % % %%%% %%% %%%%%% %
8 | % % % % % % %% %%%%%%%% ... %
9 | % %% % % %%%%%%%% %% %% %%%%%
10 | % %% % %% %%%%%%%%% %% ... %
11 | % %%%%%% %%%%%%% %% %%%%%% %
12 | %%%%%% % %%%% %% % ... %
13 | % %%%%%% %%%%% % %% %% %%%%%
14 | % %%%%%% % %%%%% %% %
15 | % %%%%%% %%%%%%%%%%% %% %% %
16 | %%%%%%%%%% %%%%%% %
17 | %. %%%%%%%%%%%%%%%% ...... %
18 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--------------------------------------------------------------------------------
/Project1/layouts/mediumScaryMaze.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % P%
3 | % %%%%%%%%%%%%%%%%%%% %%% %%%%%%%% %
4 | % %% % % %%% %%% %%GG %
5 | % %% % % % % %%%% %%%%%%%%% %% %%%%%
6 | % %% % % % % % %%GG %% %
7 | % %% % % % % % %%%%% %%% %%%%%% %
8 | % %% % % % % %% %%%%%%%%% %
9 | % %% % % %%%%%%%% %% %% %%%%%
10 | % %% % %% %%%%%%%%% %% %
11 | % %%% %% %%%%%%% %% %%%%%% %
12 | %%%%%% % % %% %% %
13 | % %%%%%% %% %% %% %% %%%%%
14 | % %%%%%% % %%%%% %% %
15 | % %%%% %%%%% %%%%%% %
16 | %%%%%%%% % %%%%%% %
17 | %. %%%%%%%%%%%%%%%% %
18 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--------------------------------------------------------------------------------
/Project1/test_cases/q1/graph_bfs_vs_dfs.test:
--------------------------------------------------------------------------------
1 | # Graph where BFS finds the optimal solution but DFS does not
2 | class: "GraphSearchTest"
3 | algorithm: "depthFirstSearch"
4 |
5 | diagram: """
6 | /-- B
7 | | ^
8 | | |
9 | | *A -->[G]
10 | | | ^
11 | | V |
12 | \-->D ----/
13 |
14 | A is the start state, G is the goal. Arrows
15 | mark possible transitions
16 | """
17 | # The following section specifies the search problem and the solution.
18 | # The graph is specified by first the set of start states, followed by
19 | # the set of goal states, and lastly by the state transitions which are
20 | # of the form:
21 | #
22 | graph: """
23 | start_state: A
24 | goal_states: G
25 | A 0:A->B B 1.0
26 | A 1:A->G G 2.0
27 | A 2:A->D D 4.0
28 | B 0:B->D D 8.0
29 | D 0:D->G G 16.0
30 | """
31 |
--------------------------------------------------------------------------------
/Project1/test_cases/q2/graph_bfs_vs_dfs.test:
--------------------------------------------------------------------------------
1 | # Graph where BFS finds the optimal solution but DFS does not
2 | class: "GraphSearchTest"
3 | algorithm: "breadthFirstSearch"
4 |
5 | diagram: """
6 | /-- B
7 | | ^
8 | | |
9 | | *A -->[G]
10 | | | ^
11 | | V |
12 | \-->D ----/
13 |
14 | A is the start state, G is the goal. Arrows
15 | mark possible transitions
16 | """
17 | # The following section specifies the search problem and the solution.
18 | # The graph is specified by first the set of start states, followed by
19 | # the set of goal states, and lastly by the state transitions which are
20 | # of the form:
21 | #
22 | graph: """
23 | start_state: A
24 | goal_states: G
25 | A 0:A->B B 1.0
26 | A 1:A->G G 2.0
27 | A 2:A->D D 4.0
28 | B 0:B->D D 8.0
29 | D 0:D->G G 16.0
30 | """
31 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/graph_bfs_vs_dfs.test:
--------------------------------------------------------------------------------
1 | # Graph where BFS finds the optimal solution but DFS does not
2 | class: "GraphSearchTest"
3 | algorithm: "uniformCostSearch"
4 |
5 | diagram: """
6 | /-- B
7 | | ^
8 | | |
9 | | *A -->[G]
10 | | | ^
11 | | V |
12 | \-->D ----/
13 |
14 | A is the start state, G is the goal. Arrows
15 | mark possible transitions
16 | """
17 | # The following section specifies the search problem and the solution.
18 | # The graph is specified by first the set of start states, followed by
19 | # the set of goal states, and lastly by the state transitions which are
20 | # of the form:
21 | #
22 | graph: """
23 | start_state: A
24 | goal_states: G
25 | A 0:A->B B 1.0
26 | A 1:A->G G 2.0
27 | A 2:A->D D 4.0
28 | B 0:B->D D 8.0
29 | D 0:D->G G 16.0
30 | """
31 |
--------------------------------------------------------------------------------
/Project1/test_cases/q1/graph_infinite.test:
--------------------------------------------------------------------------------
1 | # Graph where natural action choice leads to an infinite loop
2 | class: "GraphSearchTest"
3 | algorithm: "depthFirstSearch"
4 |
5 | diagram: """
6 | B <--> C
7 | ^ /|
8 | | / |
9 | V / V
10 | *A<-/ [G]
11 |
12 | A is the start state, G is the goal. Arrows mark
13 | possible state transitions.
14 | """
15 | # The following section specifies the search problem and the solution.
16 | # The graph is specified by first the set of start states, followed by
17 | # the set of goal states, and lastly by the state transitions which are
18 | # of the form:
19 | #
20 | graph: """
21 | start_state: A
22 | goal_states: G
23 | A 0:A->B B 1.0
24 | B 0:B->A A 2.0
25 | B 1:B->C C 4.0
26 | C 0:C->A A 8.0
27 | C 1:C->G G 16.0
28 | C 2:C->B B 32.0
29 | """
30 |
31 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/graph_infinite.test:
--------------------------------------------------------------------------------
1 | # Graph where natural action choice leads to an infinite loop
2 | class: "GraphSearchTest"
3 | algorithm: "uniformCostSearch"
4 |
5 | diagram: """
6 | B <--> C
7 | ^ /|
8 | | / |
9 | V / V
10 | *A<-/ [G]
11 |
12 | A is the start state, G is the goal. Arrows mark
13 | possible state transitions.
14 | """
15 | # The following section specifies the search problem and the solution.
16 | # The graph is specified by first the set of start states, followed by
17 | # the set of goal states, and lastly by the state transitions which are
18 | # of the form:
19 | #
20 | graph: """
21 | start_state: A
22 | goal_states: G
23 | A 0:A->B B 1.0
24 | B 0:B->A A 2.0
25 | B 1:B->C C 4.0
26 | C 0:C->A A 8.0
27 | C 1:C->G G 16.0
28 | C 2:C->B B 32.0
29 | """
30 |
31 |
--------------------------------------------------------------------------------
/Project1/test_cases/q2/graph_infinite.test:
--------------------------------------------------------------------------------
1 | # Graph where natural action choice leads to an infinite loop
2 | class: "GraphSearchTest"
3 | algorithm: "breadthFirstSearch"
4 |
5 | diagram: """
6 | B <--> C
7 | ^ /|
8 | | / |
9 | V / V
10 | *A<-/ [G]
11 |
12 | A is the start state, G is the goal. Arrows mark
13 | possible state transitions.
14 | """
15 | # The following section specifies the search problem and the solution.
16 | # The graph is specified by first the set of start states, followed by
17 | # the set of goal states, and lastly by the state transitions which are
18 | # of the form:
19 | #
20 | graph: """
21 | start_state: A
22 | goal_states: G
23 | A 0:A->B B 1.0
24 | B 0:B->A A 2.0
25 | B 1:B->C C 4.0
26 | C 0:C->A A 8.0
27 | C 1:C->G G 16.0
28 | C 2:C->B B 32.0
29 | """
30 |
31 |
--------------------------------------------------------------------------------
/Project1/test_cases/q6/medium_corners.solution:
--------------------------------------------------------------------------------
1 | # This solution file specifies the length of the optimal path
2 | # as well as the thresholds on number of nodes expanded to be
3 | # used in scoring.
4 | cost: "106"
5 | path: """
6 | North East East East East North North West West West West North North
7 | North North North North North North West West West West South South
8 | East East East East South South South South South South West West
9 | South South South West West East East North North North East East East
10 | East East East East East South South East East East East East North
11 | North East East North North East East North North East East East East
12 | South South South South East East North North East East South South
13 | South South South North North North North North North North West West
14 | North North East East North North
15 | """
16 | thresholds: "2000 1600 1200"
17 |
--------------------------------------------------------------------------------
/Project1/projectParams.py:
--------------------------------------------------------------------------------
1 | # projectParams.py
2 | # ----------------
3 | # Licensing Information: You are free to use or extend these projects for
4 | # educational purposes provided that (1) you do not distribute or publish
5 | # solutions, (2) you retain this notice, and (3) you provide clear
6 | # attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
7 | #
8 | # Attribution Information: The Pacman AI projects were developed at UC Berkeley.
9 | # The core projects and autograders were primarily created by John DeNero
10 | # (denero@cs.berkeley.edu) and Dan Klein (klein@cs.berkeley.edu).
11 | # Student side autograding was added by Brad Miller, Nick Hay, and
12 | # Pieter Abbeel (pabbeel@cs.berkeley.edu).
13 |
14 |
15 | STUDENT_CODE_DEFAULT = 'searchAgents.py,search.py'
16 | PROJECT_TEST_CLASSES = 'searchTestClasses.py'
17 | PROJECT_NAME = 'Project 1: Search'
18 | BONUS_PIC = False
19 |
--------------------------------------------------------------------------------
/Project2/projectParams.py:
--------------------------------------------------------------------------------
1 | # projectParams.py
2 | # ----------------
3 | # Licensing Information: You are free to use or extend these projects for
4 | # educational purposes provided that (1) you do not distribute or publish
5 | # solutions, (2) you retain this notice, and (3) you provide clear
6 | # attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
7 | #
8 | # Attribution Information: The Pacman AI projects were developed at UC Berkeley.
9 | # The core projects and autograders were primarily created by John DeNero
10 | # (denero@cs.berkeley.edu) and Dan Klein (klein@cs.berkeley.edu).
11 | # Student side autograding was added by Brad Miller, Nick Hay, and
12 | # Pieter Abbeel (pabbeel@cs.berkeley.edu).
13 |
14 |
15 | STUDENT_CODE_DEFAULT = 'multiAgents.py'
16 | PROJECT_TEST_CLASSES = 'multiagentTestClasses.py'
17 | PROJECT_NAME = 'Project 2: Multiagent search'
18 | BONUS_PIC = False
19 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/astar_3_goalAtDequeue.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "aStarSearch"
3 |
4 | diagram: """
5 | 1 1 1
6 | *A ---> B ---> C ---> [G]
7 | | ^
8 | | 10 |
9 | \---------------------/
10 |
11 | A is the start state, G is the goal. Arrows mark possible state
12 | transitions. The number next to the arrow is the cost of that transition.
13 |
14 | If you fail this test case, you may be incorrectly testing if a node is a goal
15 | before adding it into the queue, instead of testing when you remove the node
16 | from the queue. See the algorithm pseudocode in lecture.
17 | """
18 |
19 | graph: """
20 | start_state: A
21 | goal_states: G
22 | A 0:A->G G 10.0
23 | A 1:A->B B 1.0
24 | B 0:B->C C 1.0
25 | C 0:C->G G 1.0
26 | """
27 | # We only care about the solution, not the expansion order.
28 | exactExpansionOrder: "False"
29 |
30 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_5_goalAtDequeue.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "uniformCostSearch"
3 |
4 | diagram: """
5 | 1 1 1
6 | *A ---> B ---> C ---> [G]
7 | | ^
8 | | 10 |
9 | \---------------------/
10 |
11 | A is the start state, G is the goal. Arrows mark possible state
12 | transitions. The number next to the arrow is the cost of that transition.
13 |
14 | If you fail this test case, you may be incorrectly testing if a node is a goal
15 | before adding it into the queue, instead of testing when you remove the node
16 | from the queue. See the algorithm pseudocode in lecture.
17 | """
18 |
19 | graph: """
20 | start_state: A
21 | goal_states: G
22 | A 0:A->G G 10.0
23 | A 1:A->B B 1.0
24 | B 0:B->C C 1.0
25 | C 0:C->G G 1.0
26 | """
27 | # We only care about the solution, not the expansion order.
28 | exactExpansionOrder: "False"
29 |
30 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/1-expectimax2.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "ExpectimaxAgent"
3 | depth: "2"
4 |
5 | # Tree from lecture 7 slides
6 | diagram: """
7 | max
8 | /-/ | \--\
9 | / | \
10 | / | \
11 | exp1 exp2 exp3
12 | /|\ /|\ /|\
13 | / | \ / | \ / | \
14 | A B C D E F G H I
15 | 3 12 9 2 4 6 15 6 0
16 | """
17 | num_agents: "2"
18 |
19 | start_state: "max"
20 | win_states: "A B C D E F G H I"
21 | lose_states: ""
22 |
23 | successors: """
24 | max Left exp1
25 | max Center exp2
26 | max Right exp3
27 | exp1 Left A
28 | exp1 Center B
29 | exp1 Right C
30 | exp2 Left D
31 | exp2 Center E
32 | exp2 Right F
33 | exp3 Left G
34 | exp3 Center H
35 | exp3 Right I
36 | """
37 |
38 | evaluation: """
39 | A 3.0
40 | B 12.0
41 | C 9.0
42 | D 2.0
43 | E 4.0
44 | F 6.0
45 | G 15.0
46 | H 6.0
47 | I 0.0
48 | """
49 |
--------------------------------------------------------------------------------
/Project1/layouts/originalClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | %............%%............%
3 | %.%%%%.%%%%%.%%.%%%%%.%%%%.%
4 | %o%%%%.%%%%%.%%.%%%%%.%%%%o%
5 | %.%%%%.%%%%%.%%.%%%%%.%%%%.%
6 | %..........................%
7 | %.%%%%.%%.%%%%%%%%.%%.%%%%.%
8 | %.%%%%.%%.%%%%%%%%.%%.%%%%.%
9 | %......%%....%%....%%......%
10 | %%%%%%.%%%%% %% %%%%%.%%%%%%
11 | %%%%%%.%%%%% %% %%%%%.%%%%%%
12 | %%%%%%.% %.%%%%%%
13 | %%%%%%.% %%%% %%%% %.%%%%%%
14 | % . %G GG G% . %
15 | %%%%%%.% %%%%%%%%%% %.%%%%%%
16 | %%%%%%.% %.%%%%%%
17 | %%%%%%.% %%%%%%%%%% %.%%%%%%
18 | %............%%............%
19 | %.%%%%.%%%%%.%%.%%%%%.%%%%.%
20 | %.%%%%.%%%%%.%%.%%%%%.%%%%.%
21 | %o..%%....... .......%%..o%
22 | %%%.%%.%%.%%%%%%%%.%%.%%.%%%
23 | %%%.%%.%%.%%%%%%%%.%%.%%.%%%
24 | %......%%....%%....%%......%
25 | %.%%%%%%%%%%.%%.%%%%%%%%%%.%
26 | %.............P............%
27 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
28 |
--------------------------------------------------------------------------------
/Project2/layouts/originalClassic.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | %............%%............%
3 | %.%%%%.%%%%%.%%.%%%%%.%%%%.%
4 | %o%%%%.%%%%%.%%.%%%%%.%%%%o%
5 | %.%%%%.%%%%%.%%.%%%%%.%%%%.%
6 | %..........................%
7 | %.%%%%.%%.%%%%%%%%.%%.%%%%.%
8 | %.%%%%.%%.%%%%%%%%.%%.%%%%.%
9 | %......%%....%%....%%......%
10 | %%%%%%.%%%%% %% %%%%%.%%%%%%
11 | %%%%%%.%%%%% %% %%%%%.%%%%%%
12 | %%%%%%.% %.%%%%%%
13 | %%%%%%.% %%%% %%%% %.%%%%%%
14 | % . %G GG G% . %
15 | %%%%%%.% %%%%%%%%%% %.%%%%%%
16 | %%%%%%.% %.%%%%%%
17 | %%%%%%.% %%%%%%%%%% %.%%%%%%
18 | %............%%............%
19 | %.%%%%.%%%%%.%%.%%%%%.%%%%.%
20 | %.%%%%.%%%%%.%%.%%%%%.%%%%.%
21 | %o..%%....... .......%%..o%
22 | %%%.%%.%%.%%%%%%%%.%%.%%.%%%
23 | %%%.%%.%%.%%%%%%%%.%%.%%.%%%
24 | %......%%....%%....%%......%
25 | %.%%%%%%%%%%.%%.%%%%%%%%%%.%
26 | %.............P............%
27 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
28 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/0-expectimax1.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "ExpectimaxAgent"
3 | depth: "2"
4 |
5 | # Tree adapted from lecture 6 slides
6 | diagram: """
7 | max
8 | /-/ | \--\
9 | / | \
10 | / | \
11 | exp1 exp2 exp3
12 | /|\ /|\ /|\
13 | / | \ / | \ / | \
14 | A B C D E F G H I
15 | 3 12 8 2 4 6 14 5 2
16 | """
17 | num_agents: "2"
18 |
19 | start_state: "max"
20 | win_states: "A B C D E F G H I"
21 | lose_states: ""
22 |
23 | successors: """
24 | max Left exp1
25 | max Center exp2
26 | max Right exp3
27 | exp1 Left A
28 | exp1 Center B
29 | exp1 Right C
30 | exp2 Left D
31 | exp2 Center E
32 | exp2 Right F
33 | exp3 Left G
34 | exp3 Center H
35 | exp3 Right I
36 | """
37 |
38 | evaluation: """
39 | A 3.0
40 | B 12.0
41 | C 8.0
42 | D 2.0
43 | E 4.0
44 | F 6.0
45 | G 14.0
46 | H 5.0
47 | I 2.0
48 | """
49 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-1-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | c1 c2 cx
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -3.01
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3.
21 | """
22 | num_agents: "2"
23 |
24 | start_state: "a"
25 | win_states: "d1 d2 d3 d4 dx"
26 | lose_states: ""
27 |
28 | successors: """
29 | a Left b1
30 | a Right b2
31 | b1 Left c1
32 | b1 Right c2
33 | b2 Down cx
34 | c1 Left d1
35 | c1 Right d2
36 | c2 Left d3
37 | c2 Right d4
38 | cx Down dx
39 | """
40 |
41 | evaluation: """
42 | d1 -3.0
43 | d2 -9.0
44 | d3 10.0
45 | d4 6.0
46 | dx -3.01
47 | """
48 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-2-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | c1 c2 cx
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -2.99
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3.
21 | """
22 | num_agents: "2"
23 |
24 | start_state: "a"
25 | win_states: "d1 d2 d3 d4 dx"
26 | lose_states: ""
27 |
28 | successors: """
29 | a Left b1
30 | a Right b2
31 | b1 Left c1
32 | b1 Right c2
33 | b2 Down cx
34 | c1 Left d1
35 | c1 Right d2
36 | c2 Left d3
37 | c2 Right d4
38 | cx Down dx
39 | """
40 |
41 | evaluation: """
42 | d1 -3.0
43 | d2 -9.0
44 | d3 10.0
45 | d4 6.0
46 | dx -2.99
47 | """
48 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-1-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | c1 c2 cx
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -3.01
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3.
21 | """
22 | num_agents: "2"
23 |
24 | start_state: "a"
25 | win_states: "d1 d2 d3 d4 dx"
26 | lose_states: ""
27 |
28 | successors: """
29 | a Left b1
30 | a Right b2
31 | b1 Left c1
32 | b1 Right c2
33 | b2 Down cx
34 | c1 Left d1
35 | c1 Right d2
36 | c2 Left d3
37 | c2 Right d4
38 | cx Down dx
39 | """
40 |
41 | evaluation: """
42 | d1 -3.0
43 | d2 -9.0
44 | d3 10.0
45 | d4 6.0
46 | dx -3.01
47 | """
48 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-2-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | c1 c2 cx
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -2.99
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3.
21 | """
22 | num_agents: "2"
23 |
24 | start_state: "a"
25 | win_states: "d1 d2 d3 d4 dx"
26 | lose_states: ""
27 |
28 | successors: """
29 | a Left b1
30 | a Right b2
31 | b1 Left c1
32 | b1 Right c2
33 | b2 Down cx
34 | c1 Left d1
35 | c1 Right d2
36 | c2 Left d3
37 | c2 Right d4
38 | cx Down dx
39 | """
40 |
41 | evaluation: """
42 | d1 -3.0
43 | d2 -9.0
44 | d3 10.0
45 | d4 6.0
46 | dx -2.99
47 | """
48 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/0-lecture-6-tree.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "2"
4 |
5 | # Tree from lecture 6 slides
6 | diagram: """
7 | max
8 | /-/ | \--\
9 | / | \
10 | / | \
11 | min1 min2 min3
12 | /|\ /|\ /|\
13 | / | \ / | \ / | \
14 | A B C D E F G H I
15 | 3 12 8 5 4 6 14 1 11
16 | """
17 |
18 | num_agents: "2"
19 |
20 | start_state: "max"
21 | win_states: "A B C D E F G H I"
22 | lose_states: ""
23 |
24 | successors: """
25 | max Left min1
26 | max Center min2
27 | max Right min3
28 | min1 Left A
29 | min1 Center B
30 | min1 Right C
31 | min2 Left D
32 | min2 Center E
33 | min2 Right F
34 | min3 Left G
35 | min3 Center H
36 | min3 Right I
37 | """
38 |
39 |
40 | evaluation: """
41 | A 3.0
42 | B 12.0
43 | C 8.0
44 | D 5.0
45 | E 4.0
46 | F 6.0
47 | G 14.0
48 | H 1.0
49 | I 11.0
50 | """
51 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/0-lecture-6-tree.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "2"
4 |
5 | # Tree from lecture 6 slides
6 | diagram: """
7 | max
8 | /-/ | \--\
9 | / | \
10 | / | \
11 | min1 min2 min3
12 | /|\ /|\ /|\
13 | / | \ / | \ / | \
14 | A B C D E F G H I
15 | 3 12 8 5 4 6 14 1 11
16 | """
17 |
18 | num_agents: "2"
19 |
20 | start_state: "max"
21 | win_states: "A B C D E F G H I"
22 | lose_states: ""
23 |
24 | successors: """
25 | max Left min1
26 | max Center min2
27 | max Right min3
28 | min1 Left A
29 | min1 Center B
30 | min1 Right C
31 | min2 Left D
32 | min2 Center E
33 | min2 Right F
34 | min3 Left G
35 | min3 Center H
36 | min3 Right I
37 | """
38 |
39 |
40 | evaluation: """
41 | A 3.0
42 | B 12.0
43 | C 8.0
44 | D 5.0
45 | E 4.0
46 | F 6.0
47 | G 14.0
48 | H 1.0
49 | I 11.0
50 | """
51 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/graph_backtrack.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "aStarSearch"
3 |
4 | diagram: """
5 | B
6 | ^
7 | |
8 | *A --> C --> G
9 | |
10 | V
11 | D
12 |
13 | A is the start state, G is the goal. Arrows mark
14 | possible state transitions. This tests whether
15 | you extract the sequence of actions correctly even
16 | if your search backtracks. If you fail this, your
17 | nodes are not correctly tracking the sequences of
18 | actions required to reach them.
19 | """
20 | # The following section specifies the search problem and the solution.
21 | # The graph is specified by first the set of start states, followed by
22 | # the set of goal states, and lastly by the state transitions which are
23 | # of the form:
24 | #
25 | graph: """
26 | start_state: A
27 | goal_states: G
28 | A 0:A->B B 1.0
29 | A 1:A->C C 2.0
30 | A 2:A->D D 4.0
31 | C 0:C->G G 8.0
32 | """
33 |
--------------------------------------------------------------------------------
/Project1/test_cases/q1/graph_backtrack.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "depthFirstSearch"
3 |
4 | diagram: """
5 | B
6 | ^
7 | |
8 | *A --> C --> G
9 | |
10 | V
11 | D
12 |
13 | A is the start state, G is the goal. Arrows mark
14 | possible state transitions. This tests whether
15 | you extract the sequence of actions correctly even
16 | if your search backtracks. If you fail this, your
17 | nodes are not correctly tracking the sequences of
18 | actions required to reach them.
19 | """
20 | # The following section specifies the search problem and the solution.
21 | # The graph is specified by first the set of start states, followed by
22 | # the set of goal states, and lastly by the state transitions which are
23 | # of the form:
24 | #
25 | graph: """
26 | start_state: A
27 | goal_states: G
28 | A 0:A->B B 1.0
29 | A 1:A->C C 2.0
30 | A 2:A->D D 4.0
31 | C 0:C->G G 8.0
32 | """
33 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/graph_backtrack.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "uniformCostSearch"
3 |
4 | diagram: """
5 | B
6 | ^
7 | |
8 | *A --> C --> G
9 | |
10 | V
11 | D
12 |
13 | A is the start state, G is the goal. Arrows mark
14 | possible state transitions. This tests whether
15 | you extract the sequence of actions correctly even
16 | if your search backtracks. If you fail this, your
17 | nodes are not correctly tracking the sequences of
18 | actions required to reach them.
19 | """
20 | # The following section specifies the search problem and the solution.
21 | # The graph is specified by first the set of start states, followed by
22 | # the set of goal states, and lastly by the state transitions which are
23 | # of the form:
24 | #
25 | graph: """
26 | start_state: A
27 | goal_states: G
28 | A 0:A->B B 1.0
29 | A 1:A->C C 2.0
30 | A 2:A->D D 4.0
31 | C 0:C->G G 8.0
32 | """
33 |
--------------------------------------------------------------------------------
/Project1/test_cases/q2/graph_backtrack.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "breadthFirstSearch"
3 |
4 | diagram: """
5 | B
6 | ^
7 | |
8 | *A --> C --> G
9 | |
10 | V
11 | D
12 |
13 | A is the start state, G is the goal. Arrows mark
14 | possible state transitions. This tests whether
15 | you extract the sequence of actions correctly even
16 | if your search backtracks. If you fail this, your
17 | nodes are not correctly tracking the sequences of
18 | actions required to reach them.
19 | """
20 | # The following section specifies the search problem and the solution.
21 | # The graph is specified by first the set of start states, followed by
22 | # the set of goal states, and lastly by the state transitions which are
23 | # of the form:
24 | #
25 | graph: """
26 | start_state: A
27 | goal_states: G
28 | A 0:A->B B 1.0
29 | A 1:A->C C 2.0
30 | A 2:A->D D 4.0
31 | C 0:C->G G 8.0
32 | """
33 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-3-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | cx c3 c4
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 4.01 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b2 is 4.
21 | """
22 | num_agents: "2"
23 |
24 | start_state: "a"
25 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
26 | lose_states: ""
27 |
28 | successors: """
29 | a Left b1
30 | a Right b2
31 | b1 Down cx
32 | b2 Left c3
33 | b2 Right c4
34 | c3 Left d5
35 | c3 Right d6
36 | c4 Left d7
37 | c4 Right d8
38 | cx Down dx
39 | """
40 |
41 | evaluation: """
42 | d5 4.0
43 | d6 -7.0
44 | d7 0.0
45 | d8 5.0
46 | dx 4.01
47 | """
48 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-4-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | cx c3 c4
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 3.99 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b2 is 4.
21 | """
22 | num_agents: "2"
23 |
24 | start_state: "a"
25 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
26 | lose_states: ""
27 |
28 | successors: """
29 | a Left b1
30 | a Right b2
31 | b1 Down cx
32 | b2 Left c3
33 | b2 Right c4
34 | c3 Left d5
35 | c3 Right d6
36 | c4 Left d7
37 | c4 Right d8
38 | cx Down dx
39 | """
40 |
41 | evaluation: """
42 | d5 4.0
43 | d6 -7.0
44 | d7 0.0
45 | d8 5.0
46 | dx 3.99
47 | """
48 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-3-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | cx c3 c4
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 4.01 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b2 is 4.
21 | """
22 | num_agents: "2"
23 |
24 | start_state: "a"
25 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
26 | lose_states: ""
27 |
28 | successors: """
29 | a Left b1
30 | a Right b2
31 | b1 Down cx
32 | b2 Left c3
33 | b2 Right c4
34 | c3 Left d5
35 | c3 Right d6
36 | c4 Left d7
37 | c4 Right d8
38 | cx Down dx
39 | """
40 |
41 | evaluation: """
42 | d5 4.0
43 | d6 -7.0
44 | d7 0.0
45 | d8 5.0
46 | dx 4.01
47 | """
48 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-4-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | cx c3 c4
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 3.99 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b2 is 4.
21 | """
22 | num_agents: "2"
23 |
24 | start_state: "a"
25 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
26 | lose_states: ""
27 |
28 | successors: """
29 | a Left b1
30 | a Right b2
31 | b1 Down cx
32 | b2 Left c3
33 | b2 Right c4
34 | c3 Left d5
35 | c3 Right d6
36 | c4 Left d7
37 | c4 Right d8
38 | cx Down dx
39 | """
40 |
41 | evaluation: """
42 | d5 4.0
43 | d6 -7.0
44 | d7 0.0
45 | d8 5.0
46 | dx 3.99
47 | """
48 |
--------------------------------------------------------------------------------
/Project1/layouts/openMaze.lay:
--------------------------------------------------------------------------------
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 | % P%
3 | % % %
4 | % % %
5 | % % %
6 | % % %
7 | % % %
8 | % % % %
9 | % % % %
10 | % % % %
11 | % % % %
12 | % % % %
13 | % % % %
14 | % % % %
15 | %%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%
16 | % % %
17 | % % %
18 | % % %
19 | % %
20 | % %
21 | % %
22 | %. %
23 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--------------------------------------------------------------------------------
/Project1/test_cases/q1/pacman_1.test:
--------------------------------------------------------------------------------
1 | # This is a basic depth first search test
2 | class: "PacmanSearchTest"
3 | algorithm: "depthFirstSearch"
4 |
5 | # The following specifies the layout to be used
6 | layoutName: "mediumMaze"
7 | layout: """
8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 | % P%
10 | % %%%%%%%%%%%%%%%%%%%%%%% %%%%%%%% %
11 | % %% % % %%%%%%% %% %
12 | % %% % % % % %%%% %%%%%%%%% %% %%%%%
13 | % %% % % % % %% %% %
14 | % %% % % % % % %%%% %%% %%%%%% %
15 | % % % % % % %% %%%%%%%% %
16 | % %% % % %%%%%%%% %% %% %%%%%
17 | % %% % %% %%%%%%%%% %% %
18 | % %%%%%% %%%%%%% %% %%%%%% %
19 | %%%%%% % %%%% %% % %
20 | % %%%%%% %%%%% % %% %% %%%%%
21 | % %%%%%% % %%%%% %% %
22 | % %%%%%% %%%%%%%%%%% %% %% %
23 | %%%%%%%%%% %%%%%% %
24 | %. %%%%%%%%%%%%%%%% %
25 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 | """
27 |
28 |
--------------------------------------------------------------------------------
/Project1/test_cases/q2/pacman_1.test:
--------------------------------------------------------------------------------
1 | # This is a basic breadth first search test
2 | class: "PacmanSearchTest"
3 | algorithm: "breadthFirstSearch"
4 |
5 | # The following specifies the layout to be used
6 | layoutName: "mediumMaze"
7 | layout: """
8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 | % P%
10 | % %%%%%%%%%%%%%%%%%%%%%%% %%%%%%%% %
11 | % %% % % %%%%%%% %% %
12 | % %% % % % % %%%% %%%%%%%%% %% %%%%%
13 | % %% % % % % %% %% %
14 | % %% % % % % % %%%% %%% %%%%%% %
15 | % % % % % % %% %%%%%%%% %
16 | % %% % % %%%%%%%% %% %% %%%%%
17 | % %% % %% %%%%%%%%% %% %
18 | % %%%%%% %%%%%%% %% %%%%%% %
19 | %%%%%% % %%%% %% % %
20 | % %%%%%% %%%%% % %% %% %%%%%
21 | % %%%%%% % %%%%% %% %
22 | % %%%%%% %%%%%%%%%%% %% %% %
23 | %%%%%%%%%% %%%%%% %
24 | %. %%%%%%%%%%%%%%%% %
25 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 | """
27 |
28 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/astar_2_manhattan.test:
--------------------------------------------------------------------------------
1 | class: "PacmanSearchTest"
2 | algorithm: "aStarSearch"
3 |
4 | # The following specifies the layout to be used
5 | layoutName: "mediumMaze"
6 | layout: """
7 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8 | % P%
9 | % %%%%%%%%%%%%%%%%%%%%%%% %%%%%%%% %
10 | % %% % % %%%%%%% %% %
11 | % %% % % % % %%%% %%%%%%%%% %% %%%%%
12 | % %% % % % % %% %% %
13 | % %% % % % % % %%%% %%% %%%%%% %
14 | % % % % % % %% %%%%%%%% %
15 | % %% % % %%%%%%%% %% %% %%%%%
16 | % %% % %% %%%%%%%%% %% %
17 | % %%%%%% %%%%%%% %% %%%%%% %
18 | %%%%%% % %%%% %% % %
19 | % %%%%%% %%%%% % %% %% %%%%%
20 | % %%%%%% % %%%%% %% %
21 | % %%%%%% %%%%%%%%%%% %% %% %
22 | %%%%%%%%%% %%%%%% %
23 | %. %%%%%%%%%%%%%%%% %
24 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25 | """
26 | leewayFactor: "1.1"
27 | heuristic: "manhattanHeuristic"
28 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-one-ghost-3level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | 3 9 10 6 4 7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 | """
20 | num_agents: "2"
21 |
22 | start_state: "a"
23 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8"
24 | lose_states: ""
25 |
26 | successors: """
27 | a Left b1
28 | a Right b2
29 | b1 Left c1
30 | b1 Right c2
31 | b2 Left c3
32 | b2 Right c4
33 | c1 Left d1
34 | c1 Right d2
35 | c2 Left d3
36 | c2 Right d4
37 | c3 Left d5
38 | c3 Right d6
39 | c4 Left d7
40 | c4 Right d8
41 | """
42 |
43 | evaluation: """
44 | d1 3.0
45 | d2 9.0
46 | d3 10.0
47 | d4 6.0
48 | d5 4.0
49 | d6 7.0
50 | d7 0.0
51 | d8 5.0
52 | """
53 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_1_problemC.test:
--------------------------------------------------------------------------------
1 | class: "PacmanSearchTest"
2 | algorithm: "uniformCostSearch"
3 | points: "0.5"
4 |
5 | # The following specifies the layout to be used
6 | layoutName: "mediumMaze"
7 | layout: """
8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 | % P%
10 | % %%%%%%%%%%%%%%%%%%%%%%% %%%%%%%% %
11 | % %% % % %%%%%%% %% %
12 | % %% % % % % %%%% %%%%%%%%% %% %%%%%
13 | % %% % % % % %% %% %
14 | % %% % % % % % %%%% %%% %%%%%% %
15 | % % % % % % %% %%%%%%%% %
16 | % %% % % %%%%%%%% %% %% %%%%%
17 | % %% % %% %%%%%%%%% %% %
18 | % %%%%%% %%%%%%% %% %%%%%% %
19 | %%%%%% % %%%% %% % %
20 | % %%%%%% %%%%% % %% %% %%%%%
21 | % %%%%%% % %%%%% %% %
22 | % %%%%%% %%%%%%%%%%% %% %% %
23 | %%%%%%%%%% %%%%%% %
24 | %. %%%%%%%%%%%%%%%% %
25 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 | """
27 | leewayFactor: "1.1"
28 | #costFn: "lambda pos: 1"
29 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/4-two-ghosts-3level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | 3 9 10 6 4 7 0 5
15 |
16 | a - max
17 | b - min
18 | c - min
19 | """
20 | num_agents: "3"
21 |
22 | start_state: "a"
23 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8"
24 | lose_states: ""
25 |
26 | successors: """
27 | a Left b1
28 | a Right b2
29 | b1 Left c1
30 | b1 Right c2
31 | b2 Left c3
32 | b2 Right c4
33 | c1 Left d1
34 | c1 Right d2
35 | c2 Left d3
36 | c2 Right d4
37 | c3 Left d5
38 | c3 Right d6
39 | c4 Left d7
40 | c4 Right d8
41 | """
42 |
43 | evaluation: """
44 | d1 3.0
45 | d2 9.0
46 | d3 10.0
47 | d4 6.0
48 | d5 4.0
49 | d6 7.0
50 | d7 0.0
51 | d8 5.0
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-one-ghost-3level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | 3 9 10 6 4 7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 | """
20 | num_agents: "2"
21 |
22 | start_state: "a"
23 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8"
24 | lose_states: ""
25 |
26 | successors: """
27 | a Left b1
28 | a Right b2
29 | b1 Left c1
30 | b1 Right c2
31 | b2 Left c3
32 | b2 Right c4
33 | c1 Left d1
34 | c1 Right d2
35 | c2 Left d3
36 | c2 Right d4
37 | c3 Left d5
38 | c3 Right d6
39 | c4 Left d7
40 | c4 Right d8
41 | """
42 |
43 | evaluation: """
44 | d1 3.0
45 | d2 9.0
46 | d3 10.0
47 | d4 6.0
48 | d5 4.0
49 | d6 7.0
50 | d7 0.0
51 | d8 5.0
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/4-two-ghosts-3level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | 3 9 10 6 4 7 0 5
15 |
16 | a - max
17 | b - min
18 | c - min
19 | """
20 | num_agents: "3"
21 |
22 | start_state: "a"
23 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8"
24 | lose_states: ""
25 |
26 | successors: """
27 | a Left b1
28 | a Right b2
29 | b1 Left c1
30 | b1 Right c2
31 | b2 Left c3
32 | b2 Right c4
33 | c1 Left d1
34 | c1 Right d2
35 | c2 Left d3
36 | c2 Right d4
37 | c3 Left d5
38 | c3 Right d6
39 | c4 Left d7
40 | c4 Right d8
41 | """
42 |
43 | evaluation: """
44 | d1 3.0
45 | d2 9.0
46 | d3 10.0
47 | d4 6.0
48 | d5 4.0
49 | d6 7.0
50 | d7 0.0
51 | d8 5.0
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/2-one-ghost-3level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "ExpectimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | 3 9 10 6 4 7 0 5
15 |
16 | a - max
17 | b - exp
18 | c - max
19 | """
20 | num_agents: "2"
21 |
22 | start_state: "a"
23 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8"
24 | lose_states: ""
25 |
26 | successors: """
27 | a Left b1
28 | a Right b2
29 | b1 Left c1
30 | b1 Right c2
31 | b2 Left c3
32 | b2 Right c4
33 | c1 Left d1
34 | c1 Right d2
35 | c2 Left d3
36 | c2 Right d4
37 | c3 Left d5
38 | c3 Right d6
39 | c4 Left d7
40 | c4 Right d8
41 | """
42 |
43 | evaluation: """
44 | d1 3.0
45 | d2 9.0
46 | d3 10.0
47 | d4 6.0
48 | d5 4.0
49 | d6 7.0
50 | d7 0.0
51 | d8 5.0
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/4-two-ghosts-3level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "ExpectimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | 3 9 10 6 4 7 0 5
15 |
16 | a - max
17 | b - exp
18 | c - exp
19 | """
20 | num_agents: "3"
21 |
22 | start_state: "a"
23 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8"
24 | lose_states: ""
25 |
26 | successors: """
27 | a Left b1
28 | a Right b2
29 | b1 Left c1
30 | b1 Right c2
31 | b2 Left c3
32 | b2 Right c4
33 | c1 Left d1
34 | c1 Right d2
35 | c2 Left d3
36 | c2 Right d4
37 | c3 Left d5
38 | c3 Right d6
39 | c4 Left d7
40 | c4 Right d8
41 | """
42 |
43 | evaluation: """
44 | d1 3.0
45 | d2 9.0
46 | d3 10.0
47 | d4 6.0
48 | d5 4.0
49 | d6 7.0
50 | d7 0.0
51 | d8 5.0
52 | """
53 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_2_problemE.test:
--------------------------------------------------------------------------------
1 | class: "PacmanSearchTest"
2 | algorithm: "uniformCostSearch"
3 | points: "0.5"
4 |
5 | # The following specifies the layout to be used
6 | layoutName: "mediumMaze"
7 | layout: """
8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 | % P%
10 | % %%%%%%%%%%%%%%%%%%%%%%% %%%%%%%% %
11 | % %% % % %%%%%%% %% %
12 | % %% % % % % %%%% %%%%%%%%% %% %%%%%
13 | % %% % % % % %% %% %
14 | % %% % % % % % %%%% %%% %%%%%% %
15 | % % % % % % %% %%%%%%%% %
16 | % %% % % %%%%%%%% %% %% %%%%%
17 | % %% % %% %%%%%%%%% %% %
18 | % %%%%%% %%%%%%% %% %%%%%% %
19 | %%%%%% % %%%% %% % %
20 | % %%%%%% %%%%% % %% %% %%%%%
21 | % %%%%%% % %%%%% %% %
22 | % %%%%%% %%%%%%%%%%% %% %% %
23 | %%%%%%%%%% %%%%%% %
24 | %. %%%%%%%%%%%%%%%% %
25 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 | """
27 | leewayFactor: "1.1"
28 | costFn: "lambda pos: .5 ** pos[0]"
29 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_3_problemW.test:
--------------------------------------------------------------------------------
1 | class: "PacmanSearchTest"
2 | algorithm: "uniformCostSearch"
3 | points: "0.5"
4 |
5 | # The following specifies the layout to be used
6 | layoutName: "mediumMaze"
7 | layout: """
8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 | % P%
10 | % %%%%%%%%%%%%%%%%%%%%%%% %%%%%%%% %
11 | % %% % % %%%%%%% %% %
12 | % %% % % % % %%%% %%%%%%%%% %% %%%%%
13 | % %% % % % % %% %% %
14 | % %% % % % % % %%%% %%% %%%%%% %
15 | % % % % % % %% %%%%%%%% %
16 | % %% % % %%%%%%%% %% %% %%%%%
17 | % %% % %% %%%%%%%%% %% %
18 | % %%%%%% %%%%%%% %% %%%%%% %
19 | %%%%%% % %%%% %% % %
20 | % %%%%%% %%%%% % %% %% %%%%%
21 | % %%%%%% % %%%%% %% %
22 | % %%%%%% %%%%%%%%%%% %% %% %
23 | %%%%%%%%%% %%%%%% %
24 | %. %%%%%%%%%%%%%%%% %
25 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 | """
27 | leewayFactor: "1.1"
28 | costFn: "lambda pos: 2 ** pos[0]"
29 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/astar_0.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "aStarSearch"
3 |
4 | diagram: """
5 | C
6 | ^
7 | | 2
8 | 2 V 4
9 | *A <----> B -----> [H]
10 | |
11 | 1.5 V 2.5
12 | G <----- D -----> E
13 | |
14 | 2 |
15 | V
16 | [F]
17 |
18 | A is the start state, F and H is the goal. Arrows mark possible state
19 | transitions. The number next to the arrow is the cost of that transition.
20 | """
21 | # The following section specifies the search problem and the solution.
22 | # The graph is specified by first the set of start states, followed by
23 | # the set of goal states, and lastly by the state transitions which are
24 | # of the form:
25 | #
26 | graph: """
27 | start_state: A
28 | goal_states: H F
29 | A Right B 2.0
30 | B Right H 4.0
31 | B Down D 1.0
32 | B Up C 2.0
33 | B Left A 2.0
34 | C Down B 2.0
35 | D Right E 2.5
36 | D Down F 2.0
37 | D Left G 1.5
38 | """
39 |
40 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_0_graph.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "uniformCostSearch"
3 |
4 | diagram: """
5 | C
6 | ^
7 | | 2
8 | 2 V 4
9 | *A <----> B -----> [H]
10 | |1
11 | 1.5 V 2.5
12 | G <----- D -----> E
13 | |
14 | 2 |
15 | V
16 | [F]
17 |
18 | A is the start state, F and H is the goal. Arrows mark possible state
19 | transitions. The number next to the arrow is the cost of that transition.
20 | """
21 | # The following section specifies the search problem and the solution.
22 | # The graph is specified by first the set of start states, followed by
23 | # the set of goal states, and lastly by the state transitions which are
24 | # of the form:
25 | #
26 | graph: """
27 | start_state: A
28 | goal_states: H F
29 | A Right B 2.0
30 | B Right H 4.0
31 | B Down D 1.0
32 | B Up C 2.0
33 | B Left A 2.0
34 | C Down B 2.0
35 | D Right E 2.5
36 | D Down F 2.0
37 | D Left G 1.5
38 | """
39 |
40 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-1a-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | -4 c1 c2 9 cx -4.01
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -4.01
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3, but the depth=1 limited value is -4.
21 | The values next to c1, c2, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Left c1
34 | b1 Right c2
35 | b2 Down cx
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c1 -4.0
45 | c2 9.0
46 | cx -4.01
47 | d1 -3.0
48 | d2 -9.0
49 | d3 10.0
50 | d4 6.0
51 | dx -4.01
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-1b-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | -4 c1 c2 9 cx -4.01
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -4.01
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3, but the depth=1 limited value is -4.
21 | The values next to c1, c2, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Left c1
34 | b1 Right c2
35 | b2 Down cx
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c1 -4.0
45 | c2 9.0
46 | cx -4.01
47 | d1 -3.0
48 | d2 -9.0
49 | d3 10.0
50 | d4 6.0
51 | dx -4.01
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-2a-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | -4 c1 c2 9 cx -3.99
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -3.99
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3, but the depth=1 limited value is -4.
21 | The values next to c1, c2, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Left c1
34 | b1 Right c2
35 | b2 Down cx
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c1 -4.0
45 | c2 9.0
46 | cx -3.99
47 | d1 -3.0
48 | d2 -9.0
49 | d3 10.0
50 | d4 6.0
51 | dx -3.99
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-2b-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | -4 c1 c2 9 cx -3.99
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -3.99
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3, but the depth=1 limited value is -4.
21 | The values next to c1, c2, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Left c1
34 | b1 Right c2
35 | b2 Down cx
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c1 -4.0
45 | c2 9.0
46 | cx -3.99
47 | d1 -3.0
48 | d2 -9.0
49 | d3 10.0
50 | d4 6.0
51 | dx -3.99
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-1a-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | -4 c1 c2 9 cx -4.01
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -4.01
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3, but the depth=1 limited value is -4.
21 | The values next to c1, c2, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Left c1
34 | b1 Right c2
35 | b2 Down cx
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c1 -4.0
45 | c2 9.0
46 | cx -4.01
47 | d1 -3.0
48 | d2 -9.0
49 | d3 10.0
50 | d4 6.0
51 | dx -4.01
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-1b-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | -4 c1 c2 9 cx -4.01
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -4.01
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3, but the depth=1 limited value is -4.
21 | The values next to c1, c2, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Left c1
34 | b1 Right c2
35 | b2 Down cx
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c1 -4.0
45 | c2 9.0
46 | cx -4.01
47 | d1 -3.0
48 | d2 -9.0
49 | d3 10.0
50 | d4 6.0
51 | dx -4.01
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-2a-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | -4 c1 c2 9 cx -3.99
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -3.99
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3, but the depth=1 limited value is -4.
21 | The values next to c1, c2, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Left c1
34 | b1 Right c2
35 | b2 Down cx
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c1 -4.0
45 | c2 9.0
46 | cx -3.99
47 | d1 -3.0
48 | d2 -9.0
49 | d3 10.0
50 | d4 6.0
51 | dx -3.99
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-2b-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | -4 c1 c2 9 cx -3.99
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | -3 -9 10 6 -3.99
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is -3, but the depth=1 limited value is -4.
21 | The values next to c1, c2, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Left c1
34 | b1 Right c2
35 | b2 Down cx
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c1 -4.0
45 | c2 9.0
46 | cx -3.99
47 | d1 -3.0
48 | d2 -9.0
49 | d3 10.0
50 | d4 6.0
51 | dx -3.99
52 | """
53 |
--------------------------------------------------------------------------------
/Project1/test_cases/q2/pacman_1.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q2/pacman_1.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | # Number of nodes expanded must be with a factor of 1.0 of the numbers below.
5 | solution: """
6 | West West West West West West West West West South South East East
7 | South South South West West West North West West West West South South
8 | South East East East East East East East South South South South South
9 | South South West West West West West West West West West West West
10 | West West West West West West South West West West West West West West
11 | West West
12 | """
13 | expanded_nodes: "269"
14 | rev_solution: """
15 | West West West West West West West West West South South East East
16 | South South South West West West North West West West West South South
17 | South East East East East East East East South South South South South
18 | South South West West West West West West West West West West West
19 | West West West West West West South West West West West West West West
20 | West West
21 | """
22 | rev_expanded_nodes: "269"
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Panagiotis Petropoulakis
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_1_problemC.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/ucs_1_problemC.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | # Number of nodes expanded must be with a factor of 1.1 of the numbers below.
5 | solution: """
6 | West West West West West West West West West South South East East
7 | South South South West West West North West West West West South South
8 | South East East East East East East East South South South South South
9 | South South West West West West West West West West West West West
10 | West West West West West West South West West West West West West West
11 | West West
12 | """
13 | expanded_nodes: "269"
14 | rev_solution: """
15 | West West West West West West West West West South South East East
16 | South South South West West West North West West West West South South
17 | South East East East East East East East South South South South South
18 | South South West West West West West West West West West West West
19 | West West West West West West South West West West West West West West
20 | West West
21 | """
22 | rev_expanded_nodes: "269"
23 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/astar_2_manhattan.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q4/astar_2_manhattan.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | # Number of nodes expanded must be with a factor of 1.1 of the numbers below.
5 | solution: """
6 | West West West West West West West West West South South East East
7 | South South South West West West North West West West West South South
8 | South East East East East East East East South South South South South
9 | South South West West West West West West West West West West West
10 | West West West West West West South West West West West West West West
11 | West West
12 | """
13 | expanded_nodes: "221"
14 | rev_solution: """
15 | West West West West West West West West West South South East East
16 | South South South West West West North West West West West South South
17 | South East East East East East East East South South South South South
18 | South South West West West West West West West West West West West
19 | West West West West West West South West West West West West West West
20 | West West
21 | """
22 | rev_expanded_nodes: "221"
23 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-3a-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | 5.01 cx 8 c3 c4 5
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 5.01 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is 4, but the depth=1 limited value is 5.
21 | The values next to c3, c4, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Down cx
34 | b2 Left c3
35 | b2 Right c4
36 | c3 Left d5
37 | c3 Right d6
38 | c4 Left d7
39 | c4 Right d8
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c3 8.0
45 | c4 5.0
46 | cx 5.01
47 | d5 4.0
48 | d6 -7.0
49 | d7 0.0
50 | d8 5.0
51 | dx 5.01
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-3b-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | 5.01 cx 8 c3 c4 5
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 5.01 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is 4, but the depth=1 limited value is 5.
21 | The values next to c3, c4, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Down cx
34 | b2 Left c3
35 | b2 Right c4
36 | c3 Left d5
37 | c3 Right d6
38 | c4 Left d7
39 | c4 Right d8
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c3 8.0
45 | c4 5.0
46 | cx 5.01
47 | d5 4.0
48 | d6 -7.0
49 | d7 0.0
50 | d8 5.0
51 | dx 5.01
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-4a-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | 4.99 cx 8 c3 c4 5
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 4.99 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is 4, but the depth=1 limited value is 5.
21 | The values next to c3, c4, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Down cx
34 | b2 Left c3
35 | b2 Right c4
36 | c3 Left d5
37 | c3 Right d6
38 | c4 Left d7
39 | c4 Right d8
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c3 8.0
45 | c4 5.0
46 | cx 4.99
47 | d5 4.0
48 | d6 -7.0
49 | d7 0.0
50 | d8 5.0
51 | dx 4.99
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/2-4b-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | 4.99 cx 8 c3 c4 5
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 4.99 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is 4, but the depth=1 limited value is 5.
21 | The values next to c3, c4, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Down cx
34 | b2 Left c3
35 | b2 Right c4
36 | c3 Left d5
37 | c3 Right d6
38 | c4 Left d7
39 | c4 Right d8
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c3 8.0
45 | c4 5.0
46 | cx 4.99
47 | d5 4.0
48 | d6 -7.0
49 | d7 0.0
50 | d8 5.0
51 | dx 4.99
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-3a-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | 5.01 cx 8 c3 c4 5
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 5.01 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is 4, but the depth=1 limited value is 5.
21 | The values next to c3, c4, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Down cx
34 | b2 Left c3
35 | b2 Right c4
36 | c3 Left d5
37 | c3 Right d6
38 | c4 Left d7
39 | c4 Right d8
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c3 8.0
45 | c4 5.0
46 | cx 5.01
47 | d5 4.0
48 | d6 -7.0
49 | d7 0.0
50 | d8 5.0
51 | dx 5.01
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-3b-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | 5.01 cx 8 c3 c4 5
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 5.01 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is 4, but the depth=1 limited value is 5.
21 | The values next to c3, c4, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Down cx
34 | b2 Left c3
35 | b2 Right c4
36 | c3 Left d5
37 | c3 Right d6
38 | c4 Left d7
39 | c4 Right d8
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c3 8.0
45 | c4 5.0
46 | cx 5.01
47 | d5 4.0
48 | d6 -7.0
49 | d7 0.0
50 | d8 5.0
51 | dx 5.01
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-4a-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | 4.99 cx 8 c3 c4 5
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 4.99 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is 4, but the depth=1 limited value is 5.
21 | The values next to c3, c4, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Down cx
34 | b2 Left c3
35 | b2 Right c4
36 | c3 Left d5
37 | c3 Right d6
38 | c4 Left d7
39 | c4 Right d8
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c3 8.0
45 | c4 5.0
46 | cx 4.99
47 | d5 4.0
48 | d6 -7.0
49 | d7 0.0
50 | d8 5.0
51 | dx 4.99
52 | """
53 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/2-4b-vary-depth.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | 4.99 cx 8 c3 c4 5
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | 4.99 4 -7 0 5
15 |
16 | a - max
17 | b - min
18 | c - max
19 |
20 | Note that the minimax value of b1 is 4, but the depth=1 limited value is 5.
21 | The values next to c3, c4, and cx are the values of the evaluation function, not
22 | necessarily the correct minimax backup.
23 | """
24 | num_agents: "2"
25 |
26 | start_state: "a"
27 | win_states: "d1 d2 d3 d4 d5 d6 d7 d8 dx"
28 | lose_states: ""
29 |
30 | successors: """
31 | a Left b1
32 | a Right b2
33 | b1 Down cx
34 | b2 Left c3
35 | b2 Right c4
36 | c3 Left d5
37 | c3 Right d6
38 | c4 Left d7
39 | c4 Right d8
40 | cx Down dx
41 | """
42 |
43 | evaluation: """
44 | c3 8.0
45 | c4 5.0
46 | cx 4.99
47 | d5 4.0
48 | d6 -7.0
49 | d7 0.0
50 | d8 5.0
51 | dx 4.99
52 | """
53 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/graph_manypaths.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "aStarSearch"
3 |
4 | diagram: """
5 | B1 E1
6 | ^ \ ^ \
7 | / V / V
8 | *A --> C --> D --> F --> [G]
9 | \ ^ \ ^
10 | V / V /
11 | B2 E2
12 |
13 | A is the start state, G is the goal. Arrows mark
14 | possible state transitions. This graph has multiple
15 | paths to the goal, where nodes with the same state
16 | are added to the fringe multiple times before they
17 | are expanded.
18 | """
19 | # The following section specifies the search problem and the solution.
20 | # The graph is specified by first the set of start states, followed by
21 | # the set of goal states, and lastly by the state transitions which are
22 | # of the form:
23 | #
24 | graph: """
25 | start_state: A
26 | goal_states: G
27 | A 0:A->B1 B1 1.0
28 | A 1:A->C C 2.0
29 | A 2:A->B2 B2 4.0
30 | B1 0:B1->C C 8.0
31 | B2 0:B2->C C 16.0
32 | C 0:C->D D 32.0
33 | D 0:D->E1 E1 64.0
34 | D 1:D->F F 128.0
35 | D 2:D->E2 E2 256.0
36 | E1 0:E1->F F 512.0
37 | E2 0:E2->F F 1024.0
38 | F 0:F->G G 2048.0
39 | """
40 |
--------------------------------------------------------------------------------
/Project1/test_cases/q1/graph_manypaths.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "depthFirstSearch"
3 |
4 | diagram: """
5 | B1 E1
6 | ^ \ ^ \
7 | / V / V
8 | *A --> C --> D --> F --> [G]
9 | \ ^ \ ^
10 | V / V /
11 | B2 E2
12 |
13 | A is the start state, G is the goal. Arrows mark
14 | possible state transitions. This graph has multiple
15 | paths to the goal, where nodes with the same state
16 | are added to the fringe multiple times before they
17 | are expanded.
18 | """
19 | # The following section specifies the search problem and the solution.
20 | # The graph is specified by first the set of start states, followed by
21 | # the set of goal states, and lastly by the state transitions which are
22 | # of the form:
23 | #
24 | graph: """
25 | start_state: A
26 | goal_states: G
27 | A 0:A->B1 B1 1.0
28 | A 1:A->C C 2.0
29 | A 2:A->B2 B2 4.0
30 | B1 0:B1->C C 8.0
31 | B2 0:B2->C C 16.0
32 | C 0:C->D D 32.0
33 | D 0:D->E1 E1 64.0
34 | D 1:D->F F 128.0
35 | D 2:D->E2 E2 256.0
36 | E1 0:E1->F F 512.0
37 | E2 0:E2->F F 1024.0
38 | F 0:F->G G 2048.0
39 | """
40 |
--------------------------------------------------------------------------------
/Project1/test_cases/q2/graph_manypaths.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "breadthFirstSearch"
3 |
4 | diagram: """
5 | B1 E1
6 | ^ \ ^ \
7 | / V / V
8 | *A --> C --> D --> F --> [G]
9 | \ ^ \ ^
10 | V / V /
11 | B2 E2
12 |
13 | A is the start state, G is the goal. Arrows mark
14 | possible state transitions. This graph has multiple
15 | paths to the goal, where nodes with the same state
16 | are added to the fringe multiple times before they
17 | are expanded.
18 | """
19 | # The following section specifies the search problem and the solution.
20 | # The graph is specified by first the set of start states, followed by
21 | # the set of goal states, and lastly by the state transitions which are
22 | # of the form:
23 | #
24 | graph: """
25 | start_state: A
26 | goal_states: G
27 | A 0:A->B1 B1 1.0
28 | A 1:A->C C 2.0
29 | A 2:A->B2 B2 4.0
30 | B1 0:B1->C C 8.0
31 | B2 0:B2->C C 16.0
32 | C 0:C->D D 32.0
33 | D 0:D->E1 E1 64.0
34 | D 1:D->F F 128.0
35 | D 2:D->E2 E2 256.0
36 | E1 0:E1->F F 512.0
37 | E2 0:E2->F F 1024.0
38 | F 0:F->G G 2048.0
39 | """
40 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/graph_manypaths.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "uniformCostSearch"
3 |
4 | diagram: """
5 | B1 E1
6 | ^ \ ^ \
7 | / V / V
8 | *A --> C --> D --> F --> [G]
9 | \ ^ \ ^
10 | V / V /
11 | B2 E2
12 |
13 | A is the start state, G is the goal. Arrows mark
14 | possible state transitions. This graph has multiple
15 | paths to the goal, where nodes with the same state
16 | are added to the fringe multiple times before they
17 | are expanded.
18 | """
19 | # The following section specifies the search problem and the solution.
20 | # The graph is specified by first the set of start states, followed by
21 | # the set of goal states, and lastly by the state transitions which are
22 | # of the form:
23 | #
24 | graph: """
25 | start_state: A
26 | goal_states: G
27 | A 0:A->B1 B1 1.0
28 | A 1:A->C C 2.0
29 | A 2:A->B2 B2 4.0
30 | B1 0:B1->C C 8.0
31 | B2 0:B2->C C 16.0
32 | C 0:C->D D 32.0
33 | D 0:D->E1 E1 64.0
34 | D 1:D->F F 128.0
35 | D 2:D->E2 E2 256.0
36 | E1 0:E1->F F 512.0
37 | E2 0:E2->F F 1024.0
38 | F 0:F->G G 2048.0
39 | """
40 |
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_2_problemE.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/ucs_2_problemE.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | # Number of nodes expanded must be with a factor of 1.1 of the numbers below.
5 | solution: """
6 | South South West West West West South South East East East East South
7 | South West West West West South South East East East East South South
8 | West West West West South South East East East East South South South
9 | West West West West West West West North West West West West West West
10 | West West West West West West West West West West West South West West
11 | West West West West West West West
12 | """
13 | expanded_nodes: "260"
14 | rev_solution: """
15 | South South West West West West South South East East East East South
16 | South West West West West South South East East East East South South
17 | West West West West South South East East East East South South South
18 | West West West West West West West North West West West West West West
19 | West West West West West West West West West West West South West West
20 | West West West West West West West
21 | """
22 | rev_expanded_nodes: "260"
23 |
--------------------------------------------------------------------------------
/Project1/test_cases/q4/astar_1_graph_heuristic.test:
--------------------------------------------------------------------------------
1 | class: "GraphSearchTest"
2 | algorithm: "aStarSearch"
3 |
4 | diagram: """
5 | 2 3 2
6 | S --- A --- C ---> G
7 | | \ / ^
8 | 3 | \ 5 / 1 /
9 | | \ / /
10 | B --- D -------/
11 | 4 5
12 |
13 | S is the start state, G is the goal. Arrows mark possible state
14 | transitions. The number next to the arrow is the cost of that transition.
15 |
16 | The heuristic value of each state is:
17 | S 6.0
18 | A 2.5
19 | B 5.25
20 | C 1.125
21 | D 1.0625
22 | G 0
23 | """
24 | # The following section specifies the search problem and the solution.
25 | # The graph is specified by first the set of start states, followed by
26 | # the set of goal states, and lastly by the state transitions which are
27 | # of the form:
28 | #
29 | graph: """
30 | start_state: S
31 | goal_states: G
32 | S 0 A 2.0
33 | S 1 B 3.0
34 | S 2 D 5.0
35 | A 0 C 3.0
36 | A 1 S 2.0
37 | B 0 D 4.0
38 | B 1 S 3.0
39 | C 0 A 3.0
40 | C 1 D 1.0
41 | C 2 G 2.0
42 | D 0 B 4.0
43 | D 1 C 1.0
44 | D 2 G 5.0
45 | D 3 S 5.0
46 | """
47 | heuristic: """
48 | S 6.0
49 | A 2.5
50 | B 5.25
51 | C 1.125
52 | D 1.0625
53 | G 0
54 | """
55 |
--------------------------------------------------------------------------------
/Project1/commands.txt:
--------------------------------------------------------------------------------
1 | python pacman.py
2 | python pacman.py --layout testMaze --pacman GoWestAgent
3 | python pacman.py --layout tinyMaze --pacman GoWestAgent
4 | python pacman.py -h
5 | python pacman.py -l tinyMaze -p SearchAgent -a fn=tinyMazeSearch
6 | python pacman.py -l tinyMaze -p SearchAgent
7 | python pacman.py -l mediumMaze -p SearchAgent
8 | python pacman.py -l bigMaze -z .5 -p SearchAgent
9 | python pacman.py -l mediumMaze -p SearchAgent -a fn=bfs
10 | python pacman.py -l bigMaze -p SearchAgent -a fn=bfs -z .5
11 | python eightpuzzle.py
12 | python pacman.py -l mediumMaze -p SearchAgent -a fn=ucs
13 | python pacman.py -l mediumDottedMaze -p StayEastSearchAgent
14 | python pacman.py -l mediumScaryMaze -p StayWestSearchAgent
15 | python pacman.py -l bigMaze -z .5 -p SearchAgent -a fn=astar,heuristic=manhattanHeuristic
16 | python pacman.py -l tinyCorners -p SearchAgent -a fn=bfs,prob=CornersProblem
17 | python pacman.py -l mediumCorners -p SearchAgent -a fn=bfs,prob=CornersProblem
18 | python pacman.py -l mediumCorners -p AStarCornersAgent -z 0.5
19 | python pacman.py -l testSearch -p AStarFoodSearchAgent
20 | python pacman.py -l trickySearch -p AStarFoodSearchAgent
21 | python pacman.py -l bigSearch -p ClosestDotSearchAgent -z .5
22 | python pacman.py -l bigSearch -p ApproximateSearchAgent -z .5 -q
23 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-5-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | c1 c2 cx
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | / \ / \ / \ / \ |
15 | A B C D E F G H Z
16 | -3 13 5 9 10 3 -6 8 3.01
17 |
18 | a - max
19 | b - min
20 | c - max
21 | d - min
22 |
23 | Note the minimax value of b1 is 3.
24 | """
25 | num_agents: "2"
26 |
27 | start_state: "a"
28 | win_states: "A B C D E F G H I J K L M N O P Z"
29 | lose_states: ""
30 |
31 | successors: """
32 | a Left b1
33 | a Right b2
34 | b1 Left c1
35 | b1 Right c2
36 | b2 Down cx
37 | c1 Left d1
38 | c1 Right d2
39 | c2 Left d3
40 | c2 Right d4
41 | c3 Left d5
42 | c3 Right d6
43 | c4 Left d7
44 | c4 Right d8
45 | cx Down dx
46 | d1 Left A
47 | d1 Right B
48 | d2 Left C
49 | d2 Right D
50 | d3 Left E
51 | d3 Right F
52 | d4 Left G
53 | d4 Right H
54 | d5 Left I
55 | d5 Right J
56 | d6 Left K
57 | d6 Right L
58 | d7 Left M
59 | d7 Right N
60 | d8 Left O
61 | d8 Right P
62 | dx Down Z
63 | """
64 |
65 | evaluation: """
66 | A -3.0
67 | B 13.0
68 | C 5.0
69 | D 9.0
70 | E 10.0
71 | F 3.0
72 | G -6.0
73 | H 8.0
74 | Z 3.01
75 | """
76 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-6-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | c1 c2 cx
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | / \ / \ / \ / \ |
15 | A B C D E F G H Z
16 | -3 13 5 9 10 3 -6 8 2.99
17 |
18 | a - max
19 | b - min
20 | c - max
21 | d - min
22 |
23 | Note the minimax value of b1 is 3.
24 | """
25 | num_agents: "2"
26 |
27 | start_state: "a"
28 | win_states: "A B C D E F G H I J K L M N O P Z"
29 | lose_states: ""
30 |
31 | successors: """
32 | a Left b1
33 | a Right b2
34 | b1 Left c1
35 | b1 Right c2
36 | b2 Down cx
37 | c1 Left d1
38 | c1 Right d2
39 | c2 Left d3
40 | c2 Right d4
41 | c3 Left d5
42 | c3 Right d6
43 | c4 Left d7
44 | c4 Right d8
45 | cx Down dx
46 | d1 Left A
47 | d1 Right B
48 | d2 Left C
49 | d2 Right D
50 | d3 Left E
51 | d3 Right F
52 | d4 Left G
53 | d4 Right H
54 | d5 Left I
55 | d5 Right J
56 | d6 Left K
57 | d6 Right L
58 | d7 Left M
59 | d7 Right N
60 | d8 Left O
61 | d8 Right P
62 | dx Down Z
63 | """
64 |
65 | evaluation: """
66 | A -3.0
67 | B 13.0
68 | C 5.0
69 | D 9.0
70 | E 10.0
71 | F 3.0
72 | G -6.0
73 | H 8.0
74 | Z 2.99
75 | """
76 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-5-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | c1 c2 cx
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | / \ / \ / \ / \ |
15 | A B C D E F G H Z
16 | -3 13 5 9 10 3 -6 8 3.01
17 |
18 | a - max
19 | b - min
20 | c - max
21 | d - min
22 |
23 | Note the minimax value of b1 is 3.
24 | """
25 | num_agents: "2"
26 |
27 | start_state: "a"
28 | win_states: "A B C D E F G H I J K L M N O P Z"
29 | lose_states: ""
30 |
31 | successors: """
32 | a Left b1
33 | a Right b2
34 | b1 Left c1
35 | b1 Right c2
36 | b2 Down cx
37 | c1 Left d1
38 | c1 Right d2
39 | c2 Left d3
40 | c2 Right d4
41 | c3 Left d5
42 | c3 Right d6
43 | c4 Left d7
44 | c4 Right d8
45 | cx Down dx
46 | d1 Left A
47 | d1 Right B
48 | d2 Left C
49 | d2 Right D
50 | d3 Left E
51 | d3 Right F
52 | d4 Left G
53 | d4 Right H
54 | d5 Left I
55 | d5 Right J
56 | d6 Left K
57 | d6 Right L
58 | d7 Left M
59 | d7 Right N
60 | d8 Left O
61 | d8 Right P
62 | dx Down Z
63 | """
64 |
65 | evaluation: """
66 | A -3.0
67 | B 13.0
68 | C 5.0
69 | D 9.0
70 | E 10.0
71 | F 3.0
72 | G -6.0
73 | H 8.0
74 | Z 3.01
75 | """
76 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-6-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ |
11 | c1 c2 cx
12 | / \ / \ |
13 | d1 d2 d3 d4 dx
14 | / \ / \ / \ / \ |
15 | A B C D E F G H Z
16 | -3 13 5 9 10 3 -6 8 2.99
17 |
18 | a - max
19 | b - min
20 | c - max
21 | d - min
22 |
23 | Note the minimax value of b1 is 3.
24 | """
25 | num_agents: "2"
26 |
27 | start_state: "a"
28 | win_states: "A B C D E F G H I J K L M N O P Z"
29 | lose_states: ""
30 |
31 | successors: """
32 | a Left b1
33 | a Right b2
34 | b1 Left c1
35 | b1 Right c2
36 | b2 Down cx
37 | c1 Left d1
38 | c1 Right d2
39 | c2 Left d3
40 | c2 Right d4
41 | c3 Left d5
42 | c3 Right d6
43 | c4 Left d7
44 | c4 Right d8
45 | cx Down dx
46 | d1 Left A
47 | d1 Right B
48 | d2 Left C
49 | d2 Right D
50 | d3 Left E
51 | d3 Right F
52 | d4 Left G
53 | d4 Right H
54 | d5 Left I
55 | d5 Right J
56 | d6 Left K
57 | d6 Right L
58 | d7 Left M
59 | d7 Right N
60 | d8 Left O
61 | d8 Right P
62 | dx Down Z
63 | """
64 |
65 | evaluation: """
66 | A -3.0
67 | B 13.0
68 | C 5.0
69 | D 9.0
70 | E 10.0
71 | F 3.0
72 | G -6.0
73 | H 8.0
74 | Z 2.99
75 | """
76 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-7-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | cx c3 c4
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | | / \ / \ / \ / \
15 | Z I J K L M N O P
16 | -1.99 -1 -9 4 7 2 5 -3 -2
17 |
18 | a - max
19 | b - min
20 | c - min
21 | d - max
22 |
23 | Note that the minimax value of b2 is -2
24 | """
25 | num_agents: "3"
26 |
27 | start_state: "a"
28 | win_states: "A B C D E F G H I J K L M N O P Z"
29 | lose_states: ""
30 |
31 | successors: """
32 | a Left b1
33 | a Right b2
34 | b1 Down cx
35 | b2 Left c3
36 | b2 Right c4
37 | c1 Left d1
38 | c1 Right d2
39 | c2 Left d3
40 | c2 Right d4
41 | c3 Left d5
42 | c3 Right d6
43 | c4 Left d7
44 | c4 Right d8
45 | cx Down dx
46 | d1 Left A
47 | d1 Right B
48 | d2 Left C
49 | d2 Right D
50 | d3 Left E
51 | d3 Right F
52 | d4 Left G
53 | d4 Right H
54 | d5 Left I
55 | d5 Right J
56 | d6 Left K
57 | d6 Right L
58 | d7 Left M
59 | d7 Right N
60 | d8 Left O
61 | d8 Right P
62 | dx Down Z
63 | """
64 |
65 | evaluation: """
66 | I -1.0
67 | J -9.0
68 | K 4.0
69 | L 7.0
70 | M 2.0
71 | N 5.0
72 | O -3.0
73 | P -2.0
74 | Z -1.99
75 | """
76 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-7-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | cx c3 c4
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | | / \ / \ / \ / \
15 | Z I J K L M N O P
16 | -1.99 -1 -9 4 7 2 5 -3 -2
17 |
18 | a - max
19 | b - min
20 | c - min
21 | d - max
22 |
23 | Note that the minimax value of b2 is -2
24 | """
25 | num_agents: "3"
26 |
27 | start_state: "a"
28 | win_states: "A B C D E F G H I J K L M N O P Z"
29 | lose_states: ""
30 |
31 | successors: """
32 | a Left b1
33 | a Right b2
34 | b1 Down cx
35 | b2 Left c3
36 | b2 Right c4
37 | c1 Left d1
38 | c1 Right d2
39 | c2 Left d3
40 | c2 Right d4
41 | c3 Left d5
42 | c3 Right d6
43 | c4 Left d7
44 | c4 Right d8
45 | cx Down dx
46 | d1 Left A
47 | d1 Right B
48 | d2 Left C
49 | d2 Right D
50 | d3 Left E
51 | d3 Right F
52 | d4 Left G
53 | d4 Right H
54 | d5 Left I
55 | d5 Right J
56 | d6 Left K
57 | d6 Right L
58 | d7 Left M
59 | d7 Right N
60 | d8 Left O
61 | d8 Right P
62 | dx Down Z
63 | """
64 |
65 | evaluation: """
66 | I -1.0
67 | J -9.0
68 | K 4.0
69 | L 7.0
70 | M 2.0
71 | N 5.0
72 | O -3.0
73 | P -2.0
74 | Z -1.99
75 | """
76 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/1-8-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | cx c3 c4
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | | / \ / \ / \ / \
15 | Z I J K L M N O P
16 | -2.01 -1 -9 4 7 2 5 -3 -2
17 |
18 | a - max
19 | b - min
20 | c - min
21 | d - max
22 |
23 | Note that the minimax value of b2 is -2.01
24 | """
25 | num_agents: "3"
26 |
27 | start_state: "a"
28 | win_states: "A B C D E F G H I J K L M N O P Z"
29 | lose_states: ""
30 |
31 | successors: """
32 | a Left b1
33 | a Right b2
34 | b1 Down cx
35 | b2 Left c3
36 | b2 Right c4
37 | c1 Left d1
38 | c1 Right d2
39 | c2 Left d3
40 | c2 Right d4
41 | c3 Left d5
42 | c3 Right d6
43 | c4 Left d7
44 | c4 Right d8
45 | cx Down dx
46 | d1 Left A
47 | d1 Right B
48 | d2 Left C
49 | d2 Right D
50 | d3 Left E
51 | d3 Right F
52 | d4 Left G
53 | d4 Right H
54 | d5 Left I
55 | d5 Right J
56 | d6 Left K
57 | d6 Right L
58 | d7 Left M
59 | d7 Right N
60 | d8 Left O
61 | d8 Right P
62 | dx Down Z
63 | """
64 |
65 | evaluation: """
66 | I -1.0
67 | J -9.0
68 | K 4.0
69 | L 7.0
70 | M 2.0
71 | N 5.0
72 | O -3.0
73 | P -2.0
74 | Z -2.01
75 | """
76 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/1-8-minmax.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | | / \
11 | cx c3 c4
12 | | / \ / \
13 | dx d5 d6 d7 d8
14 | | / \ / \ / \ / \
15 | Z I J K L M N O P
16 | -2.01 -1 -9 4 7 2 5 -3 -2
17 |
18 | a - max
19 | b - min
20 | c - min
21 | d - max
22 |
23 | Note that the minimax value of b2 is -2.01
24 | """
25 | num_agents: "3"
26 |
27 | start_state: "a"
28 | win_states: "A B C D E F G H I J K L M N O P Z"
29 | lose_states: ""
30 |
31 | successors: """
32 | a Left b1
33 | a Right b2
34 | b1 Down cx
35 | b2 Left c3
36 | b2 Right c4
37 | c1 Left d1
38 | c1 Right d2
39 | c2 Left d3
40 | c2 Right d4
41 | c3 Left d5
42 | c3 Right d6
43 | c4 Left d7
44 | c4 Right d8
45 | cx Down dx
46 | d1 Left A
47 | d1 Right B
48 | d2 Left C
49 | d2 Right D
50 | d3 Left E
51 | d3 Right F
52 | d4 Left G
53 | d4 Right H
54 | d5 Left I
55 | d5 Right J
56 | d6 Left K
57 | d6 Right L
58 | d7 Left M
59 | d7 Right N
60 | d8 Left O
61 | d8 Right P
62 | dx Down Z
63 | """
64 |
65 | evaluation: """
66 | I -1.0
67 | J -9.0
68 | K 4.0
69 | L 7.0
70 | M 2.0
71 | N 5.0
72 | O -3.0
73 | P -2.0
74 | Z -2.01
75 | """
76 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/3-one-ghost-4level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | / \ / \ / \ / \ / \ / \ / \ / \
15 | A B C D E F G H I J K L M N O P
16 | 3 13 5 9 10 11 6 8 1 0 4 7 12 15 2 14
17 |
18 | a - max
19 | b - min
20 | c - max
21 | d - min
22 | """
23 | num_agents: "2"
24 |
25 | start_state: "a"
26 | win_states: "A B C D E F G H I J K L M N O P"
27 | lose_states: ""
28 |
29 | successors: """
30 | a Left b1
31 | a Right b2
32 | b1 Left c1
33 | b1 Right c2
34 | b2 Left c3
35 | b2 Right c4
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | c3 Left d5
41 | c3 Right d6
42 | c4 Left d7
43 | c4 Right d8
44 | d1 Left A
45 | d1 Right B
46 | d2 Left C
47 | d2 Right D
48 | d3 Left E
49 | d3 Right F
50 | d4 Left G
51 | d4 Right H
52 | d5 Left I
53 | d5 Right J
54 | d6 Left K
55 | d6 Right L
56 | d7 Left M
57 | d7 Right N
58 | d8 Left O
59 | d8 Right P
60 | """
61 |
62 | evaluation: """
63 | A 3.0
64 | B 13.0
65 | C 5.0
66 | D 9.0
67 | E 10.0
68 | F 11.0
69 | G 6.0
70 | H 8.0
71 | I 1.0
72 | J 0.0
73 | K 4.0
74 | L 7.0
75 | M 12.0
76 | N 15.0
77 | O 2.0
78 | P 14.0
79 | """
80 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/5-two-ghosts-4level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | / \ / \ / \ / \ / \ / \ / \ / \
15 | A B C D E F G H I J K L M N O P
16 | 3 13 5 9 10 11 6 8 1 0 4 7 12 15 2 14
17 |
18 | a - max
19 | b - min
20 | c - min
21 | d - max
22 | """
23 | num_agents: "3"
24 |
25 | start_state: "a"
26 | win_states: "A B C D E F G H I J K L M N O P"
27 | lose_states: ""
28 |
29 | successors: """
30 | a Left b1
31 | a Right b2
32 | b1 Left c1
33 | b1 Right c2
34 | b2 Left c3
35 | b2 Right c4
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | c3 Left d5
41 | c3 Right d6
42 | c4 Left d7
43 | c4 Right d8
44 | d1 Left A
45 | d1 Right B
46 | d2 Left C
47 | d2 Right D
48 | d3 Left E
49 | d3 Right F
50 | d4 Left G
51 | d4 Right H
52 | d5 Left I
53 | d5 Right J
54 | d6 Left K
55 | d6 Right L
56 | d7 Left M
57 | d7 Right N
58 | d8 Left O
59 | d8 Right P
60 | """
61 |
62 | evaluation: """
63 | A 3.0
64 | B 13.0
65 | C 5.0
66 | D 9.0
67 | E 10.0
68 | F 11.0
69 | G 6.0
70 | H 8.0
71 | I 1.0
72 | J 0.0
73 | K 4.0
74 | L 7.0
75 | M 12.0
76 | N 15.0
77 | O 2.0
78 | P 14.0
79 | """
80 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/3-one-ghost-4level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | / \ / \ / \ / \ / \ / \ / \ / \
15 | A B C D E F G H I J K L M N O P
16 | 3 13 5 9 10 11 6 8 1 0 4 7 12 15 2 14
17 |
18 | a - max
19 | b - min
20 | c - max
21 | d - min
22 | """
23 | num_agents: "2"
24 |
25 | start_state: "a"
26 | win_states: "A B C D E F G H I J K L M N O P"
27 | lose_states: ""
28 |
29 | successors: """
30 | a Left b1
31 | a Right b2
32 | b1 Left c1
33 | b1 Right c2
34 | b2 Left c3
35 | b2 Right c4
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | c3 Left d5
41 | c3 Right d6
42 | c4 Left d7
43 | c4 Right d8
44 | d1 Left A
45 | d1 Right B
46 | d2 Left C
47 | d2 Right D
48 | d3 Left E
49 | d3 Right F
50 | d4 Left G
51 | d4 Right H
52 | d5 Left I
53 | d5 Right J
54 | d6 Left K
55 | d6 Right L
56 | d7 Left M
57 | d7 Right N
58 | d8 Left O
59 | d8 Right P
60 | """
61 |
62 | evaluation: """
63 | A 3.0
64 | B 13.0
65 | C 5.0
66 | D 9.0
67 | E 10.0
68 | F 11.0
69 | G 6.0
70 | H 8.0
71 | I 1.0
72 | J 0.0
73 | K 4.0
74 | L 7.0
75 | M 12.0
76 | N 15.0
77 | O 2.0
78 | P 14.0
79 | """
80 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/5-two-ghosts-4level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | / \ / \ / \ / \ / \ / \ / \ / \
15 | A B C D E F G H I J K L M N O P
16 | 3 13 5 9 10 11 6 8 1 0 4 7 12 15 2 14
17 |
18 | a - max
19 | b - min
20 | c - min
21 | d - max
22 | """
23 | num_agents: "3"
24 |
25 | start_state: "a"
26 | win_states: "A B C D E F G H I J K L M N O P"
27 | lose_states: ""
28 |
29 | successors: """
30 | a Left b1
31 | a Right b2
32 | b1 Left c1
33 | b1 Right c2
34 | b2 Left c3
35 | b2 Right c4
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | c3 Left d5
41 | c3 Right d6
42 | c4 Left d7
43 | c4 Right d8
44 | d1 Left A
45 | d1 Right B
46 | d2 Left C
47 | d2 Right D
48 | d3 Left E
49 | d3 Right F
50 | d4 Left G
51 | d4 Right H
52 | d5 Left I
53 | d5 Right J
54 | d6 Left K
55 | d6 Right L
56 | d7 Left M
57 | d7 Right N
58 | d8 Left O
59 | d8 Right P
60 | """
61 |
62 | evaluation: """
63 | A 3.0
64 | B 13.0
65 | C 5.0
66 | D 9.0
67 | E 10.0
68 | F 11.0
69 | G 6.0
70 | H 8.0
71 | I 1.0
72 | J 0.0
73 | K 4.0
74 | L 7.0
75 | M 12.0
76 | N 15.0
77 | O 2.0
78 | P 14.0
79 | """
80 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/3-one-ghost-4level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "ExpectimaxAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | / \ / \ / \ / \ / \ / \ / \ / \
15 | A B C D E F G H I J K L M N O P
16 | 3 13 5 9 10 11 6 8 1 0 4 7 12 15 2 14
17 |
18 | a - max
19 | b - exp
20 | c - max
21 | d - exp
22 | """
23 | num_agents: "2"
24 |
25 | start_state: "a"
26 | win_states: "A B C D E F G H I J K L M N O P"
27 | lose_states: ""
28 |
29 | successors: """
30 | a Left b1
31 | a Right b2
32 | b1 Left c1
33 | b1 Right c2
34 | b2 Left c3
35 | b2 Right c4
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | c3 Left d5
41 | c3 Right d6
42 | c4 Left d7
43 | c4 Right d8
44 | d1 Left A
45 | d1 Right B
46 | d2 Left C
47 | d2 Right D
48 | d3 Left E
49 | d3 Right F
50 | d4 Left G
51 | d4 Right H
52 | d5 Left I
53 | d5 Right J
54 | d6 Left K
55 | d6 Right L
56 | d7 Left M
57 | d7 Right N
58 | d8 Left O
59 | d8 Right P
60 | """
61 |
62 | evaluation: """
63 | A 3.0
64 | B 13.0
65 | C 5.0
66 | D 9.0
67 | E 10.0
68 | F 11.0
69 | G 6.0
70 | H 8.0
71 | I 1.0
72 | J 0.0
73 | K 4.0
74 | L 7.0
75 | M 12.0
76 | N 15.0
77 | O 2.0
78 | P 14.0
79 | """
80 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/5-two-ghosts-4level.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "ExpectimaxAgent"
3 | depth: "4"
4 |
5 | diagram: """
6 | /-----a------\
7 | / \
8 | / \
9 | b1 b2
10 | / \ / \
11 | c1 c2 c3 c4
12 | / \ / \ / \ / \
13 | d1 d2 d3 d4 d5 d6 d7 d8
14 | / \ / \ / \ / \ / \ / \ / \ / \
15 | A B C D E F G H I J K L M N O P
16 | 3 13 5 9 10 11 6 8 1 0 4 7 12 15 2 14
17 |
18 | a - max
19 | b - exp
20 | c - exp
21 | d - max
22 | """
23 | num_agents: "3"
24 |
25 | start_state: "a"
26 | win_states: "A B C D E F G H I J K L M N O P"
27 | lose_states: ""
28 |
29 | successors: """
30 | a Left b1
31 | a Right b2
32 | b1 Left c1
33 | b1 Right c2
34 | b2 Left c3
35 | b2 Right c4
36 | c1 Left d1
37 | c1 Right d2
38 | c2 Left d3
39 | c2 Right d4
40 | c3 Left d5
41 | c3 Right d6
42 | c4 Left d7
43 | c4 Right d8
44 | d1 Left A
45 | d1 Right B
46 | d2 Left C
47 | d2 Right D
48 | d3 Left E
49 | d3 Right F
50 | d4 Left G
51 | d4 Right H
52 | d5 Left I
53 | d5 Right J
54 | d6 Left K
55 | d6 Right L
56 | d7 Left M
57 | d7 Right N
58 | d8 Left O
59 | d8 Right P
60 | """
61 |
62 | evaluation: """
63 | A 3.0
64 | B 13.0
65 | C 5.0
66 | D 9.0
67 | E 10.0
68 | F 11.0
69 | G 6.0
70 | H 8.0
71 | I 1.0
72 | J 0.0
73 | K 4.0
74 | L 7.0
75 | M 12.0
76 | N 15.0
77 | O 2.0
78 | P 14.0
79 | """
80 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-1a-check-depth-one-ghost.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 10 c1 0 c2 c3 8
12 | | | |
13 | 0 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 10 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | g1 g2 g3
20 | 0 0 8
21 |
22 | a - max
23 | b - min
24 | c - max
25 | d - min
26 | e - max
27 | f - min
28 |
29 | At depth 1, the evaluation function is called at level c,
30 | so Left should be returned. If your algorithm is returning a
31 | different action, check how you implemented your depth.
32 | """
33 |
34 | num_agents: "2"
35 |
36 | start_state: "a"
37 | win_states: "g1 g2 g3"
38 | lose_states: ""
39 |
40 | successors: """
41 | a Left b1
42 | a Center b2
43 | a Right b3
44 | b1 Center c1
45 | b2 Center c2
46 | b3 Center c3
47 | c1 Center d1
48 | c2 Center d2
49 | c3 Center d3
50 | d1 Center e1
51 | d2 Center e2
52 | d3 Center e3
53 | e1 Center f1
54 | e2 Center f2
55 | e3 Center f3
56 | f1 Center g1
57 | f2 Center g2
58 | f3 Center g3
59 | """
60 |
61 |
62 | evaluation: """
63 | b1 0.0
64 | b2 0.0
65 | b3 8.0
66 | c1 10.0
67 | c2 0.0
68 | c3 8.0
69 | d1 0.0
70 | d2 0.0
71 | d3 8.0
72 | e1 0.0
73 | e2 10.0
74 | e3 8.0
75 | f1 0.0
76 | f2 0.0
77 | f3 8.0
78 | g1 0.0
79 | g2 0.0
80 | g3 8.0
81 | """
82 |
83 |
84 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-1b-check-depth-one-ghost.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 10 c1 0 c2 c3 8
12 | | | |
13 | 0 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 10 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | g1 g2 g3
20 | 0 0 8
21 |
22 | a - max
23 | b - min
24 | c - max
25 | d - min
26 | e - max
27 | f - min
28 |
29 | At depth 2, the evaluation function is called at level e,
30 | so Center should be returned. If your algorithm is returning a
31 | different action, check how you implemented your depth.
32 | """
33 |
34 | num_agents: "2"
35 |
36 | start_state: "a"
37 | win_states: "g1 g2 g3"
38 | lose_states: ""
39 |
40 | successors: """
41 | a Left b1
42 | a Center b2
43 | a Right b3
44 | b1 Center c1
45 | b2 Center c2
46 | b3 Center c3
47 | c1 Center d1
48 | c2 Center d2
49 | c3 Center d3
50 | d1 Center e1
51 | d2 Center e2
52 | d3 Center e3
53 | e1 Center f1
54 | e2 Center f2
55 | e3 Center f3
56 | f1 Center g1
57 | f2 Center g2
58 | f3 Center g3
59 | """
60 |
61 |
62 | evaluation: """
63 | b1 0.0
64 | b2 0.0
65 | b3 8.0
66 | c1 10.0
67 | c2 0.0
68 | c3 8.0
69 | d1 0.0
70 | d2 0.0
71 | d3 8.0
72 | e1 0.0
73 | e2 10.0
74 | e3 8.0
75 | f1 0.0
76 | f2 0.0
77 | f3 8.0
78 | g1 0.0
79 | g2 0.0
80 | g3 8.0
81 | """
82 |
83 |
84 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-1c-check-depth-one-ghost.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 10 c1 0 c2 c3 8
12 | | | |
13 | 0 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 10 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | g1 g2 g3
20 | 0 0 8
21 |
22 | a - max
23 | b - min
24 | c - max
25 | d - min
26 | e - max
27 | f - min
28 |
29 | At depth 3, the evaluation function is called at level g,
30 | so Right should be returned. If your algorithm is returning a
31 | different action, check how you implemented your depth.
32 | """
33 |
34 | num_agents: "2"
35 |
36 | start_state: "a"
37 | win_states: "g1 g2 g3"
38 | lose_states: ""
39 |
40 | successors: """
41 | a Left b1
42 | a Center b2
43 | a Right b3
44 | b1 Center c1
45 | b2 Center c2
46 | b3 Center c3
47 | c1 Center d1
48 | c2 Center d2
49 | c3 Center d3
50 | d1 Center e1
51 | d2 Center e2
52 | d3 Center e3
53 | e1 Center f1
54 | e2 Center f2
55 | e3 Center f3
56 | f1 Center g1
57 | f2 Center g2
58 | f3 Center g3
59 | """
60 |
61 |
62 | evaluation: """
63 | b1 0.0
64 | b2 0.0
65 | b3 8.0
66 | c1 10.0
67 | c2 0.0
68 | c3 8.0
69 | d1 0.0
70 | d2 0.0
71 | d3 8.0
72 | e1 0.0
73 | e2 10.0
74 | e3 8.0
75 | f1 0.0
76 | f2 0.0
77 | f3 8.0
78 | g1 0.0
79 | g2 0.0
80 | g3 8.0
81 | """
82 |
83 |
84 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-1a-check-depth-one-ghost.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 10 c1 0 c2 c3 8
12 | | | |
13 | 0 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 10 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | g1 g2 g3
20 | 0 0 8
21 |
22 | a - max
23 | b - min
24 | c - max
25 | d - min
26 | e - max
27 | f - min
28 |
29 | At depth 1, the evaluation function is called at level c,
30 | so Left should be returned. If your algorithm is returning a
31 | different action, check how you implemented your depth.
32 | """
33 |
34 | num_agents: "2"
35 |
36 | start_state: "a"
37 | win_states: "g1 g2 g3"
38 | lose_states: ""
39 |
40 | successors: """
41 | a Left b1
42 | a Center b2
43 | a Right b3
44 | b1 Center c1
45 | b2 Center c2
46 | b3 Center c3
47 | c1 Center d1
48 | c2 Center d2
49 | c3 Center d3
50 | d1 Center e1
51 | d2 Center e2
52 | d3 Center e3
53 | e1 Center f1
54 | e2 Center f2
55 | e3 Center f3
56 | f1 Center g1
57 | f2 Center g2
58 | f3 Center g3
59 | """
60 |
61 |
62 | evaluation: """
63 | b1 0.0
64 | b2 0.0
65 | b3 8.0
66 | c1 10.0
67 | c2 0.0
68 | c3 8.0
69 | d1 0.0
70 | d2 0.0
71 | d3 8.0
72 | e1 0.0
73 | e2 10.0
74 | e3 8.0
75 | f1 0.0
76 | f2 0.0
77 | f3 8.0
78 | g1 0.0
79 | g2 0.0
80 | g3 8.0
81 | """
82 |
83 |
84 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-1b-check-depth-one-ghost.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 10 c1 0 c2 c3 8
12 | | | |
13 | 0 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 10 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | g1 g2 g3
20 | 0 0 8
21 |
22 | a - max
23 | b - min
24 | c - max
25 | d - min
26 | e - max
27 | f - min
28 |
29 | At depth 2, the evaluation function is called at level e,
30 | so Center should be returned. If your algorithm is returning a
31 | different action, check how you implemented your depth.
32 | """
33 |
34 | num_agents: "2"
35 |
36 | start_state: "a"
37 | win_states: "g1 g2 g3"
38 | lose_states: ""
39 |
40 | successors: """
41 | a Left b1
42 | a Center b2
43 | a Right b3
44 | b1 Center c1
45 | b2 Center c2
46 | b3 Center c3
47 | c1 Center d1
48 | c2 Center d2
49 | c3 Center d3
50 | d1 Center e1
51 | d2 Center e2
52 | d3 Center e3
53 | e1 Center f1
54 | e2 Center f2
55 | e3 Center f3
56 | f1 Center g1
57 | f2 Center g2
58 | f3 Center g3
59 | """
60 |
61 |
62 | evaluation: """
63 | b1 0.0
64 | b2 0.0
65 | b3 8.0
66 | c1 10.0
67 | c2 0.0
68 | c3 8.0
69 | d1 0.0
70 | d2 0.0
71 | d3 8.0
72 | e1 0.0
73 | e2 10.0
74 | e3 8.0
75 | f1 0.0
76 | f2 0.0
77 | f3 8.0
78 | g1 0.0
79 | g2 0.0
80 | g3 8.0
81 | """
82 |
83 |
84 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-1c-check-depth-one-ghost.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 10 c1 0 c2 c3 8
12 | | | |
13 | 0 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 10 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | g1 g2 g3
20 | 0 0 8
21 |
22 | a - max
23 | b - min
24 | c - max
25 | d - min
26 | e - max
27 | f - min
28 |
29 | At depth 3, the evaluation function is called at level g,
30 | so Right should be returned. If your algorithm is returning a
31 | different action, check how you implemented your depth.
32 | """
33 |
34 | num_agents: "2"
35 |
36 | start_state: "a"
37 | win_states: "g1 g2 g3"
38 | lose_states: ""
39 |
40 | successors: """
41 | a Left b1
42 | a Center b2
43 | a Right b3
44 | b1 Center c1
45 | b2 Center c2
46 | b3 Center c3
47 | c1 Center d1
48 | c2 Center d2
49 | c3 Center d3
50 | d1 Center e1
51 | d2 Center e2
52 | d3 Center e3
53 | e1 Center f1
54 | e2 Center f2
55 | e3 Center f3
56 | f1 Center g1
57 | f2 Center g2
58 | f3 Center g3
59 | """
60 |
61 |
62 | evaluation: """
63 | b1 0.0
64 | b2 0.0
65 | b3 8.0
66 | c1 10.0
67 | c2 0.0
68 | c3 8.0
69 | d1 0.0
70 | d2 0.0
71 | d3 8.0
72 | e1 0.0
73 | e2 10.0
74 | e3 8.0
75 | f1 0.0
76 | f2 0.0
77 | f3 8.0
78 | g1 0.0
79 | g2 0.0
80 | g3 8.0
81 | """
82 |
83 |
84 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/6-1a-check-depth-one-ghost.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "ExpectimaxAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 10 c1 0 c2 c3 8
12 | | | |
13 | 0 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 10 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | g1 g2 g3
20 | 0 0 8
21 |
22 | a - max
23 | b - min
24 | c - max
25 | d - min
26 | e - max
27 | f - min
28 |
29 | At depth 1, the evaluation function is called at level c,
30 | so Left should be returned. If your algorithm is returning a
31 | different action, check how you implemented your depth.
32 | """
33 |
34 | num_agents: "2"
35 |
36 | start_state: "a"
37 | win_states: "g1 g2 g3"
38 | lose_states: ""
39 |
40 | successors: """
41 | a Left b1
42 | a Center b2
43 | a Right b3
44 | b1 Center c1
45 | b2 Center c2
46 | b3 Center c3
47 | c1 Center d1
48 | c2 Center d2
49 | c3 Center d3
50 | d1 Center e1
51 | d2 Center e2
52 | d3 Center e3
53 | e1 Center f1
54 | e2 Center f2
55 | e3 Center f3
56 | f1 Center g1
57 | f2 Center g2
58 | f3 Center g3
59 | """
60 |
61 |
62 | evaluation: """
63 | b1 0.0
64 | b2 0.0
65 | b3 8.0
66 | c1 10.0
67 | c2 0.0
68 | c3 8.0
69 | d1 0.0
70 | d2 0.0
71 | d3 8.0
72 | e1 0.0
73 | e2 10.0
74 | e3 8.0
75 | f1 0.0
76 | f2 0.0
77 | f3 8.0
78 | g1 0.0
79 | g2 0.0
80 | g3 8.0
81 | """
82 |
83 |
84 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/6-1c-check-depth-one-ghost.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "ExpectimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 10 c1 0 c2 c3 8
12 | | | |
13 | 0 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 10 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | g1 g2 g3
20 | 0 0 8
21 |
22 | a - max
23 | b - min
24 | c - max
25 | d - min
26 | e - max
27 | f - min
28 |
29 | At depth 3, the evaluation function is called at level g,
30 | so Right should be returned. If your algorithm is returning a
31 | different action, check how you implemented your depth.
32 | """
33 |
34 | num_agents: "2"
35 |
36 | start_state: "a"
37 | win_states: "g1 g2 g3"
38 | lose_states: ""
39 |
40 | successors: """
41 | a Left b1
42 | a Center b2
43 | a Right b3
44 | b1 Center c1
45 | b2 Center c2
46 | b3 Center c3
47 | c1 Center d1
48 | c2 Center d2
49 | c3 Center d3
50 | d1 Center e1
51 | d2 Center e2
52 | d3 Center e3
53 | e1 Center f1
54 | e2 Center f2
55 | e3 Center f3
56 | f1 Center g1
57 | f2 Center g2
58 | f3 Center g3
59 | """
60 |
61 |
62 | evaluation: """
63 | b1 0.0
64 | b2 0.0
65 | b3 8.0
66 | c1 10.0
67 | c2 0.0
68 | c3 8.0
69 | d1 0.0
70 | d2 0.0
71 | d3 8.0
72 | e1 0.0
73 | e2 10.0
74 | e3 8.0
75 | f1 0.0
76 | f2 0.0
77 | f3 8.0
78 | g1 0.0
79 | g2 0.0
80 | g3 8.0
81 | """
82 |
83 |
84 |
--------------------------------------------------------------------------------
/Project2/test_cases/q4/6-1b-check-depth-one-ghost.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "ExpectimaxAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 10 c1 0 c2 c3 8
12 | | | |
13 | 0 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 10 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | g1 g2 g3
20 | 0 0 8
21 |
22 | a - max
23 | b - min
24 | c - max
25 | d - min
26 | e - max
27 | f - min
28 |
29 | At depth 2, the evaluation function is called at level e,
30 | so Center should be returned. If your algorithm is returning a
31 | different action, check how you implemented your depth.
32 | """
33 |
34 | num_agents: "2"
35 |
36 | start_state: "a"
37 | win_states: "g1 g2 g3"
38 | lose_states: ""
39 |
40 | successors: """
41 | a Left b1
42 | a Center b2
43 | a Right b3
44 | b1 Center c1
45 | b2 Center c2
46 | b3 Center c3
47 | c1 Center d1
48 | c2 Center d2
49 | c3 Center d3
50 | d1 Center e1
51 | d2 Center e2
52 | d3 Center e3
53 | e1 Center f1
54 | e2 Center f2
55 | e3 Center f3
56 | f1 Center g1
57 | f2 Center g2
58 | f3 Center g3
59 | """
60 |
61 |
62 | evaluation: """
63 | b1 0.0
64 | b2 0.0
65 | b3 8.0
66 | c1 10.0
67 | c2 0.0
68 | c3 8.0
69 | d1 0.0
70 | d2 0.0
71 | d3 8.0
72 | e1 0.0
73 | e2 10.0
74 | e3 8.0
75 | f1 0.0
76 | f2 0.0
77 | f3 8.0
78 | g1 0.0
79 | g2 0.0
80 | g3 8.0
81 | """
82 |
83 |
84 |
--------------------------------------------------------------------------------
/Project1/layouts/bigCorners.lay:
--------------------------------------------------------------------------------
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 | % % % % % % %P % % % % % %
29 | % %%% %%% %%% % %%% % % %%%%% % %%%%%
30 | % % % % % % % %
31 | %%% % %%%%% %%%%% %%% %%% % %%% % %%%
32 | % % % % % % % % % % % % % % %
33 | % % %%% % % % % %%%%%%%%% % % % % % %
34 | % % % %
35 | % % % %%% %%% %%%%%%% %%% %%% %%% %
36 | %.% % % % % .%
37 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--------------------------------------------------------------------------------
/Project1/layouts/bigMaze.lay:
--------------------------------------------------------------------------------
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 | %.% % % % % % % % P%
37 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--------------------------------------------------------------------------------
/Project1/test_cases/q3/ucs_3_problemW.solution:
--------------------------------------------------------------------------------
1 | # This is the solution file for test_cases/q3/ucs_3_problemW.test.
2 | # This solution is designed to support both right-to-left
3 | # and left-to-right implementations.
4 | # Number of nodes expanded must be with a factor of 1.1 of the numbers below.
5 | solution: """
6 | West West West West West West West West West West West West West West
7 | West West West West West West West West West West West West West West
8 | West West West West West South South South South South South South
9 | South South East East East North North North North North North North
10 | East East South South South South South South East East North North
11 | North North North North East East South South South South East East
12 | North North East East South South East East East South South West West
13 | West West West West South South West West West West West South West
14 | West West West West South South East East East East East East East
15 | North East East East East East North North East East East East East
16 | East South South West West West West South South West West West West
17 | West South West West West West West West West West West
18 | """
19 | expanded_nodes: "173"
20 | rev_solution: """
21 | West West West West West West West West West West West West West West
22 | West West West West West West West West West West West West West West
23 | West West West West West South South South South South South South
24 | South South East East East North North North North North North North
25 | East East South South South South South South East East North North
26 | North North North North East East South South South South East East
27 | North North East East South South East East East South South West West
28 | West West West West South South West West West West West South West
29 | West West West West South South East East East East East East East
30 | North East East East East East North North East East East East East
31 | East South South West West West West South South West West West West
32 | West South West West West West West West West West West
33 | """
34 | rev_expanded_nodes: "173"
35 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-2a-check-depth-two-ghosts.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 0 c1 0 c2 c3 8
12 | | | |
13 | 10 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 0 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | 0 g1 10 g2 g3 8
20 | | | |
21 | 0 h1 0 h2 h3 8
22 | | | |
23 | 0 i1 0 i2 i3 8
24 | | | |
25 | j1 j2 j3
26 | 0 0 8
27 |
28 | a - max
29 | b - min
30 | c - min
31 | d - max
32 | e - min
33 | f - min
34 | g - max
35 | h - min
36 | i - min
37 |
38 | At depth 1, the evaluation function is called at level d,
39 | so Left should be returned. If your algorithm is returning a
40 | different action, check how you implemented your depth.
41 | """
42 |
43 | num_agents: "3"
44 |
45 | start_state: "a"
46 | win_states: "j1 j2 j3"
47 | lose_states: ""
48 |
49 | successors: """
50 | a Left b1
51 | a Center b2
52 | a Right b3
53 | b1 Center c1
54 | b2 Center c2
55 | b3 Center c3
56 | c1 Center d1
57 | c2 Center d2
58 | c3 Center d3
59 | d1 Center e1
60 | d2 Center e2
61 | d3 Center e3
62 | e1 Center f1
63 | e2 Center f2
64 | e3 Center f3
65 | f1 Center g1
66 | f2 Center g2
67 | f3 Center g3
68 | g1 Center h1
69 | g2 Center h2
70 | g3 Center h3
71 | h1 Center i1
72 | h2 Center i2
73 | h3 Center i3
74 | i1 Center j1
75 | i2 Center j2
76 | i3 Center j3
77 | """
78 |
79 |
80 | evaluation: """
81 | b1 0.0
82 | b2 0.0
83 | b3 8.0
84 | c1 0.0
85 | c2 0.0
86 | c3 8.0
87 | d1 10.0
88 | d2 0.0
89 | d3 8.0
90 | e1 0.0
91 | e2 0.0
92 | e3 8.0
93 | f1 0.0
94 | f2 0.0
95 | f3 8.0
96 | g1 0.0
97 | g2 10.0
98 | g3 8.0
99 | h1 0.0
100 | h2 0.0
101 | h3 8.0
102 | i1 0.0
103 | i2 0.0
104 | i3 8.0
105 | j1 0.0
106 | j2 0.0
107 | j3 8.0
108 | """
109 |
110 |
111 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-2b-check-depth-two-ghosts.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 0 c1 0 c2 c3 8
12 | | | |
13 | 10 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 0 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | 0 g1 10 g2 g3 8
20 | | | |
21 | 0 h1 0 h2 h3 8
22 | | | |
23 | 0 i1 0 i2 i3 8
24 | | | |
25 | j1 j2 j3
26 | 0 0 8
27 |
28 | a - max
29 | b - min
30 | c - min
31 | d - max
32 | e - min
33 | f - min
34 | g - max
35 | h - min
36 | i - min
37 |
38 | At depth 2, the evaluation function is called at level g,
39 | so Center should be returned. If your algorithm is returning
40 | a different action, check how you implemented your depth.
41 | """
42 |
43 | num_agents: "3"
44 |
45 | start_state: "a"
46 | win_states: "j1 j2 j3"
47 | lose_states: ""
48 |
49 | successors: """
50 | a Left b1
51 | a Center b2
52 | a Right b3
53 | b1 Center c1
54 | b2 Center c2
55 | b3 Center c3
56 | c1 Center d1
57 | c2 Center d2
58 | c3 Center d3
59 | d1 Center e1
60 | d2 Center e2
61 | d3 Center e3
62 | e1 Center f1
63 | e2 Center f2
64 | e3 Center f3
65 | f1 Center g1
66 | f2 Center g2
67 | f3 Center g3
68 | g1 Center h1
69 | g2 Center h2
70 | g3 Center h3
71 | h1 Center i1
72 | h2 Center i2
73 | h3 Center i3
74 | i1 Center j1
75 | i2 Center j2
76 | i3 Center j3
77 | """
78 |
79 |
80 | evaluation: """
81 | b1 0.0
82 | b2 0.0
83 | b3 8.0
84 | c1 0.0
85 | c2 0.0
86 | c3 8.0
87 | d1 10.0
88 | d2 0.0
89 | d3 8.0
90 | e1 0.0
91 | e2 0.0
92 | e3 8.0
93 | f1 0.0
94 | f2 0.0
95 | f3 8.0
96 | g1 0.0
97 | g2 10.0
98 | g3 8.0
99 | h1 0.0
100 | h2 0.0
101 | h3 8.0
102 | i1 0.0
103 | i2 0.0
104 | i3 8.0
105 | j1 0.0
106 | j2 0.0
107 | j3 8.0
108 | """
109 |
110 |
111 |
--------------------------------------------------------------------------------
/Project2/test_cases/q2/7-2c-check-depth-two-ghosts.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "MinimaxAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 0 c1 0 c2 c3 8
12 | | | |
13 | 10 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 0 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | 0 g1 10 g2 g3 8
20 | | | |
21 | 0 h1 0 h2 h3 8
22 | | | |
23 | 0 i1 0 i2 i3 8
24 | | | |
25 | j1 j2 j3
26 | 0 0 8
27 |
28 | a - max
29 | b - min
30 | c - min
31 | d - max
32 | e - min
33 | f - min
34 | g - max
35 | h - min
36 | i - min
37 |
38 | At depth 3, the evaluation function is called at level j,
39 | so Right should be returned. If your algorithm is returning
40 | a different action, check how you implemented your depth.
41 | """
42 |
43 | num_agents: "3"
44 |
45 | start_state: "a"
46 | win_states: "j1 j2 j3"
47 | lose_states: ""
48 |
49 | successors: """
50 | a Left b1
51 | a Center b2
52 | a Right b3
53 | b1 Center c1
54 | b2 Center c2
55 | b3 Center c3
56 | c1 Center d1
57 | c2 Center d2
58 | c3 Center d3
59 | d1 Center e1
60 | d2 Center e2
61 | d3 Center e3
62 | e1 Center f1
63 | e2 Center f2
64 | e3 Center f3
65 | f1 Center g1
66 | f2 Center g2
67 | f3 Center g3
68 | g1 Center h1
69 | g2 Center h2
70 | g3 Center h3
71 | h1 Center i1
72 | h2 Center i2
73 | h3 Center i3
74 | i1 Center j1
75 | i2 Center j2
76 | i3 Center j3
77 | """
78 |
79 |
80 | evaluation: """
81 | b1 0.0
82 | b2 0.0
83 | b3 8.0
84 | c1 0.0
85 | c2 0.0
86 | c3 8.0
87 | d1 10.0
88 | d2 0.0
89 | d3 8.0
90 | e1 0.0
91 | e2 0.0
92 | e3 8.0
93 | f1 0.0
94 | f2 0.0
95 | f3 8.0
96 | g1 0.0
97 | g2 10.0
98 | g3 8.0
99 | h1 0.0
100 | h2 0.0
101 | h3 8.0
102 | i1 0.0
103 | i2 0.0
104 | i3 8.0
105 | j1 0.0
106 | j2 0.0
107 | j3 8.0
108 | """
109 |
110 |
111 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-2a-check-depth-two-ghosts.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "1"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 0 c1 0 c2 c3 8
12 | | | |
13 | 10 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 0 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | 0 g1 10 g2 g3 8
20 | | | |
21 | 0 h1 0 h2 h3 8
22 | | | |
23 | 0 i1 0 i2 i3 8
24 | | | |
25 | j1 j2 j3
26 | 0 0 8
27 |
28 | a - max
29 | b - min
30 | c - min
31 | d - max
32 | e - min
33 | f - min
34 | g - max
35 | h - min
36 | i - min
37 |
38 | At depth 1, the evaluation function is called at level d,
39 | so Left should be returned. If your algorithm is returning a
40 | different action, check how you implemented your depth.
41 | """
42 |
43 | num_agents: "3"
44 |
45 | start_state: "a"
46 | win_states: "j1 j2 j3"
47 | lose_states: ""
48 |
49 | successors: """
50 | a Left b1
51 | a Center b2
52 | a Right b3
53 | b1 Center c1
54 | b2 Center c2
55 | b3 Center c3
56 | c1 Center d1
57 | c2 Center d2
58 | c3 Center d3
59 | d1 Center e1
60 | d2 Center e2
61 | d3 Center e3
62 | e1 Center f1
63 | e2 Center f2
64 | e3 Center f3
65 | f1 Center g1
66 | f2 Center g2
67 | f3 Center g3
68 | g1 Center h1
69 | g2 Center h2
70 | g3 Center h3
71 | h1 Center i1
72 | h2 Center i2
73 | h3 Center i3
74 | i1 Center j1
75 | i2 Center j2
76 | i3 Center j3
77 | """
78 |
79 |
80 | evaluation: """
81 | b1 0.0
82 | b2 0.0
83 | b3 8.0
84 | c1 0.0
85 | c2 0.0
86 | c3 8.0
87 | d1 10.0
88 | d2 0.0
89 | d3 8.0
90 | e1 0.0
91 | e2 0.0
92 | e3 8.0
93 | f1 0.0
94 | f2 0.0
95 | f3 8.0
96 | g1 0.0
97 | g2 10.0
98 | g3 8.0
99 | h1 0.0
100 | h2 0.0
101 | h3 8.0
102 | i1 0.0
103 | i2 0.0
104 | i3 8.0
105 | j1 0.0
106 | j2 0.0
107 | j3 8.0
108 | """
109 |
110 |
111 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-2b-check-depth-two-ghosts.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "2"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 0 c1 0 c2 c3 8
12 | | | |
13 | 10 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 0 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | 0 g1 10 g2 g3 8
20 | | | |
21 | 0 h1 0 h2 h3 8
22 | | | |
23 | 0 i1 0 i2 i3 8
24 | | | |
25 | j1 j2 j3
26 | 0 0 8
27 |
28 | a - max
29 | b - min
30 | c - min
31 | d - max
32 | e - min
33 | f - min
34 | g - max
35 | h - min
36 | i - min
37 |
38 | At depth 2, the evaluation function is called at level g,
39 | so Center should be returned. If your algorithm is returning
40 | a different action, check how you implemented your depth.
41 | """
42 |
43 | num_agents: "3"
44 |
45 | start_state: "a"
46 | win_states: "j1 j2 j3"
47 | lose_states: ""
48 |
49 | successors: """
50 | a Left b1
51 | a Center b2
52 | a Right b3
53 | b1 Center c1
54 | b2 Center c2
55 | b3 Center c3
56 | c1 Center d1
57 | c2 Center d2
58 | c3 Center d3
59 | d1 Center e1
60 | d2 Center e2
61 | d3 Center e3
62 | e1 Center f1
63 | e2 Center f2
64 | e3 Center f3
65 | f1 Center g1
66 | f2 Center g2
67 | f3 Center g3
68 | g1 Center h1
69 | g2 Center h2
70 | g3 Center h3
71 | h1 Center i1
72 | h2 Center i2
73 | h3 Center i3
74 | i1 Center j1
75 | i2 Center j2
76 | i3 Center j3
77 | """
78 |
79 |
80 | evaluation: """
81 | b1 0.0
82 | b2 0.0
83 | b3 8.0
84 | c1 0.0
85 | c2 0.0
86 | c3 8.0
87 | d1 10.0
88 | d2 0.0
89 | d3 8.0
90 | e1 0.0
91 | e2 0.0
92 | e3 8.0
93 | f1 0.0
94 | f2 0.0
95 | f3 8.0
96 | g1 0.0
97 | g2 10.0
98 | g3 8.0
99 | h1 0.0
100 | h2 0.0
101 | h3 8.0
102 | i1 0.0
103 | i2 0.0
104 | i3 8.0
105 | j1 0.0
106 | j2 0.0
107 | j3 8.0
108 | """
109 |
110 |
111 |
--------------------------------------------------------------------------------
/Project2/test_cases/q3/7-2c-check-depth-two-ghosts.test:
--------------------------------------------------------------------------------
1 | class: "GraphGameTreeTest"
2 | alg: "AlphaBetaAgent"
3 | depth: "3"
4 |
5 | diagram: """
6 | a
7 | /-/ | \--\
8 | / | \
9 | 0 b1 0 b2 b3 8
10 | | | |
11 | 0 c1 0 c2 c3 8
12 | | | |
13 | 10 d1 0 d2 d3 8
14 | | | |
15 | 0 e1 0 e2 e3 8
16 | | | |
17 | 0 f1 0 f2 f3 8
18 | | | |
19 | 0 g1 10 g2 g3 8
20 | | | |
21 | 0 h1 0 h2 h3 8
22 | | | |
23 | 0 i1 0 i2 i3 8
24 | | | |
25 | j1 j2 j3
26 | 0 0 8
27 |
28 | a - max
29 | b - min
30 | c - min
31 | d - max
32 | e - min
33 | f - min
34 | g - max
35 | h - min
36 | i - min
37 |
38 | At depth 3, the evaluation function is called at level j,
39 | so Right should be returned. If your algorithm is returning
40 | a different action, check how you implemented your depth.
41 | """
42 |
43 | num_agents: "3"
44 |
45 | start_state: "a"
46 | win_states: "j1 j2 j3"
47 | lose_states: ""
48 |
49 | successors: """
50 | a Left b1
51 | a Center b2
52 | a Right b3
53 | b1 Center c1
54 | b2 Center c2
55 | b3 Center c3
56 | c1 Center d1
57 | c2 Center d2
58 | c3 Center d3
59 | d1 Center e1
60 | d2 Center e2
61 | d3 Center e3
62 | e1 Center f1
63 | e2 Center f2
64 | e3 Center f3
65 | f1 Center g1
66 | f2 Center g2
67 | f3 Center g3
68 | g1 Center h1
69 | g2 Center h2
70 | g3 Center h3
71 | h1 Center i1
72 | h2 Center i2
73 | h3 Center i3
74 | i1 Center j1
75 | i2 Center j2
76 | i3 Center j3
77 | """
78 |
79 |
80 | evaluation: """
81 | b1 0.0
82 | b2 0.0
83 | b3 8.0
84 | c1 0.0
85 | c2 0.0
86 | c3 8.0
87 | d1 10.0
88 | d2 0.0
89 | d3 8.0
90 | e1 0.0
91 | e2 0.0
92 | e3 8.0
93 | f1 0.0
94 | f2 0.0
95 | f3 8.0
96 | g1 0.0
97 | g2 10.0
98 | g3 8.0
99 | h1 0.0
100 | h2 0.0
101 | h3 8.0
102 | i1 0.0
103 | i2 0.0
104 | i3 8.0
105 | j1 0.0
106 | j2 0.0
107 | j3 8.0
108 | """
109 |
110 |
111 |
--------------------------------------------------------------------------------