Check the Assignment 1 grade on the ZINC Online Submission System. There are 20 test cases in total, each worth 5%. E.g. score of 20/20 on ZINC means full marks for Assignment 1. Your submission record will state all test case failures (if any) and their expected values. If you are unable to see the test case failure details, please check back later, as the ZINC Web GUI Student View might be desynchronized from the server database.
For grade appeals, please follow the listed procedure below. Appeals with incomplete information and/or not following the listed procedure will not be processed:
If you have implemented your local_solver() to immediately return when it finds one possible hidden cell to reveal/flag,
the current GTest would fail the last three local_solver() test cases, as it is expecting each function call to find all possible hidden cells to reveal/flag in the whole grid, not only the first one encountered.
local_solver() function still solves the grid correctly, please follow the appeal intructions below:
local_solver() test cases
(not replacing the CompletelyHiddenGrid test-case, which you should have passed anyway).
local_solver() marks for those three replaced test-cases, but subject to a 5% penalty.
This would be equivalent to passing 2 of those 3 test-cases. Your finalized grade for local_solver() will only be a maximum of 15%/20%,
assuming you have also passed the CompletelyHiddenGrid test-case.
local_solver() on a General Grid but only checks the final grid state.
int cells_to_reveal[MAX_CELLS][2] and int cells_to_reveal[MAX_CELLS][2] both being such large arrays,
as well as the presence of the int num_cells[2] output parameter.
int cell_to_reveal[2] and int cell_to_flag[2].
We can also replace int num_cells[2] with bool is_reveal_or_flag[2].
O(num_grid_cells^2) runtime in the worst case,
the solution's implementation is O(num_grid_cells) runtime in the average case where there are more than one possible hidden cell candiates per iteration.
local_solver() function has to return first in order to call reveal() and/or flag() for one cell, before calling local_solver() again.
This is then similar behavior as the one-cell-per-function-call implementation,
implying that the one-cell-per-function-call implementation's average case runtime and worst case runtime are equivalent.
enumerate_possibilities() Optimization test-case.
Each Task Function has 1 test-case per 5% of score, for a total of 20 test-cases. Passing a test-case is worth 5%, while failing a test-case is 0%, with no partial credit within a test-case.
| Task Function | Grade |
|---|---|
Task 1 - reveal() |
10% |
Task 2 - flag() |
5% |
Task 3 - local_solver() |
20% |
Task 4 - classify_hidden_cells() |
10% |
Task 5 - has_satisfiable_neighbor_constraints() |
10% |
Task 6 - record_possibility() |
10% |
Task 7 - enumerate_possibilities() |
20% |
Task 8 - handle_constrained_cells() |
5% |
Task 9 - handle_unconstrained_cells() |
5% |
Task 10 - global_solver() |
5% |
pa1_gtest_windows.zip into any convenient folder.
PA1.cpp into that convenient folder.
PA1.hPA1.cppPA1_sol.hPA1_sol.cppPA1_GTest.cpp.\include\gtest\ (various subdirectories and files).\lib\libgtest.a.\lib\libgtest_main.ag++ commands:
g++ -std=c++11 -pedantic -Wall -Wextra -g -c PA1.cpp -o PA1.og++ -std=c++11 -pedantic -Wall -Wextra -g -c PA1_sol.cpp -o PA1_sol.og++ -std=c++11 -pedantic -Wall -Wextra -g "-I.\\include" -c PA1_GTest.cpp -o PA1_GTest.og++ "-L.\\lib" -o PA1_GTest.exe PA1.o PA1_sol.o PA1_GTest.o -lgtest -lgtest_main"-IC:\\Desktop\\convenient_folder\\include" , "-LC:\\Desktop\\convenient_folder\\lib") if relative pathnames fail to parse.gtest-*.h during Step 3, try replacing -std=c++11 with -std=c++0x, -std=gnu++0x, or -std=gnu++11.PA1_GTest.exe. Note that there is no pause after output, so the terminal may close automatically.
PA1_GTest.cpp with PA1_GTest_local_solver_one_cell.cpp, as well as the relevant compilation commands.
To congifure googletest for other platforms, please refer to the googletest make documentation.
You'll need to compile the googletest library files libgtest.a and libgtest_main.a specifically for your platform.