diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index c1ac4c8943dd0b8cef2aa8fa9907ce11dad789aa..0000000000000000000000000000000000000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,21 +0,0 @@ -<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 diff --git a/search/main.py b/search/main.py index 3f9282a9476de9ef173b902209ae09770ba2cb1b..f252d304d4a5759497bd5cf1e1af5e8ffc1f0bd0 100644 --- a/search/main.py +++ b/search/main.py @@ -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"