Skip to content
Snippets Groups Projects
Commit 1d89c277 authored by Scott Wong's avatar Scott Wong
Browse files

added comment about starting on algorithm

parent 7130450f
No related branches found
No related tags found
No related merge requests found
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="N806" />
<option value="N803" />
</list>
</option>
</inspection_tool>
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="coordinate" />
<option value="tuple.append" />
</list>
</option>
</inspection_tool>
</profile>
</component>
\ No newline at end of file
......@@ -27,9 +27,21 @@ def main():
print("usage: python3 -m search path/to/input.json", file=sys.stderr)
sys.exit(1)
extract_initial_object_into_container(data)
parse_input(data)
print(dictpieces)
# So basically it is heavily implied to treat the game as a state-based search problem.
# We are also told in question 3 of the design report to discuss the time and space
# requirements, and the connection with the branching factor and search tree depth.
# In question 2 we are told to comment on any heuristics we use.
# Considering all of the above, I propose that we use the heuristic of "tiles to closest target"
# This is greedy, but it's a lot faster than trying to path optimally.
# And for search algorithm choice let's try starting with depth-first search, depth limit 1, 2 or 3
# Not sure which is best at the moment, looking ahead is good but looking too far ahead costs too much time
# ALGORITHM GOES HERE
# TODO:
......@@ -39,7 +51,7 @@ def main():
# `print_board` helper function? (See the `util.py` source code for
# usage information).
def extract_initial_object_into_container(data):
def parse_input(data):
# We can put the code to read the file NOT in the try/except statement because
# if the file couldn't be read the process would end anyway
# data is a dictionary with keys "upper", "lower" and "block"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment