gwsd2015 / LogiClass

0 stars 1 forks source link

Week 23: Finished Algorithm to Get All Solutions #9

Closed rolivia closed 9 years ago

rolivia commented 9 years ago

@twood02 @cctoombs

Algorithm to generate all possible solutions

Finished the algorithm to generate all of the possible solutions to a puzzle. It works for small puzzles, but it crashes for puzzles bigger than 4x4, 5x3, etc.
(Based on the error message I think that it is too slow: "Warning: Unresoponsive Script. A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue. Script: http://localhost/LogiClass/testing/LCinterface.js:188"). For now, I am trying to get the main algorithm (to generate a list of clues) to work for small puzzles. Later, I will try to optimize the algorithm to get all of the possible solutions, but if that does not work, I may need to rethink my algorithm for generating a clue list.

All relevant code is located in testing/LCinterface.js.

Code:

twood02 commented 9 years ago

sounds good. Keep your final demo in mind and be sure that what you are building will lead towards that goal.

Is your clue algorithm just run once when a puzzle is first created by the itnsructor, or will it be run every time a student loads the page? That will affect how much effort it is worth putting in to optimize it.