Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7ddb802
Setting up GitHub Classroom Feedback
github-classroom[bot] Mar 10, 2022
b5a3fd2
notes from meeting
cWetaski Mar 30, 2022
ddaf807
editted notes
cWetaski Mar 30, 2022
0e98e9c
added gameplayer.py, test_agent.py
cWetaski Mar 31, 2022
ee18ec6
had unsaved files
cWetaski Mar 31, 2022
b59ae83
step() fct initial version
FFFlora0349 Apr 3, 2022
cd53512
minimax() written, but unset_barrier()?
FFFlora0349 Apr 5, 2022
8fdc223
Completed function in test_agent.py which outputs all valid moves for…
cWetaski Apr 6, 2022
7706593
Added functions to test_agent.py to determine if a proposed step will…
cWetaski Apr 7, 2022
210c4ba
Modified set_barrier(), check_valid_step(), check_endgame()
FFFlora0349 Apr 7, 2022
3ec6153
Modified set_barrier(), check_valid_step(), check_endgame()
FFFlora0349 Apr 7, 2022
f6f10aa
Added some more helper functions incl count_edges, get_empty_edges, a…
cWetaski Apr 7, 2022
8ae80c1
Merge branch 'main' of https://github.com/comp424mcgill/final-project…
cWetaski Apr 7, 2022
f69a3b7
tons of stuff
cWetaski Apr 7, 2022
79b5086
Added filtering of stupid steps, added depth return value to prefer l…
cWetaski Apr 7, 2022
f4eb3f9
added weighted score (and bugfixes in minimax)
cWetaski Apr 7, 2022
2a36c21
greatly improved process of getting valid steps
cWetaski Apr 8, 2022
0166c94
fixed small bug in previous push
cWetaski Apr 8, 2022
abdff8b
it's working pretty well, trying some time optimization stuff
cWetaski Apr 8, 2022
fa5b02a
minor changes
FFFlora0349 Apr 8, 2022
8539b1b
added many print statements for debugging performance (these should b…
cWetaski Apr 8, 2022
f46ac2c
iterative deepening, removed print statements
cWetaski Apr 8, 2022
f11534d
added charles author info
cWetaski Apr 8, 2022
dd94bf0
add flora name
FFFlora0349 Apr 8, 2022
079c707
deleted .test_agent
FFFlora0349 Apr 9, 2022
9bcf6d4
Uploaded report
cWetaski Apr 12, 2022
ba16b5a
upload report
FFFlora0349 Apr 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"workbench.preferredDarkColorTheme": "Visual Studio Light"
}
22 changes: 22 additions & 0 deletions Strategizing_Notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Implementation stuff
- determine available moves
- evaluate whether a position/move ends the game and also evaluate which player wins in such a state
(already provided in check_endgame() in world.py)
- game ends when there is no path from player to player
- compute how many distinct paths there are from 1 player to another?
- how many walls would be required to block the path from A to B
- would this move allow the game to be ended and who would win?
Strategy
- never end turn with 3 walls around you if opponent is fewer than M steps away
- randomly move initially (or just use simple heuristic), then search when there are fewer moves available
- alpha beta pruning -> in a certain state, if a certain player can win with a move, there is no need to consider other moves
- heursitic: minimum number of walls to enclose the player
- determine conditions for switching from simple heuristic to alpha-beta search

UPDATE:
We want to reduce the branching factor of the search tree but still cover each possible distance.
eg. for a max_step equal to 5, we search some move of distance 1, some move of distance 2, some of distance 3, 4, and 5.

Implemented the minimax algo.

How to call the functions like check_valid_step() from world.py in student_agent.py file??
Binary file added agents/.DS_Store
Binary file not shown.
Loading