Mathimagics wrote:I do have the previous version downloaded, but am unable to run it locally ... is there any way to make a standalone page that can be run locally (i.e. without jekyll) ?
I'll have a look at making this easier to run locally, but that won't help load earlier versions...
jekyll is only used to append a version hash to the script loads in index.html so that caching works correctly. These script loads in index.html need to be changed (manually or programmatically).
Also, the solving runs in a Web Worker (this is why the page is still interactive while solving), and some browsers don't allow those to be loaded from file. If this is the case for you, you'll need to serve the files via a http server.
To solve the first issue try loading index.html from disk and pasting the following into the javascript console in your browser (or stick it in a script tag in index.html):
- Code: Select all
function f(tag, attr, newS) {
for (const s of [...document.getElementsByTagName(tag)]) {
if (s[attr].includes('%7B')) {
newS = document.createElement(tag);
newS[attr] = s[attr].match(/(\/|css)[a-z_\/]+\.(js|css)/)[0];
newS.rel = 'stylesheet';
newS.async = false;
document.head.append(newS);
}
}
return newS;
};
f('link', 'href');f('script', 'src').onload=()=>initPage();
Alternatively, you can solve it by directly editing index.html. On my system the following commands will do the two steps above:
- Code: Select all
# Replace the jekyll directives in index.html with direct references to the files.
$ sed -i '' "s/{{ '\\(.*\\)' .*}}/\\1/" index.html
# Serve the files at http://localhost:8000/ - you may not need this
$ python3 -m http.server
Btw, if you are are just running the solver without needing to use the UI, then you can control a lot from the javascript console:
- Code: Select all
await loadDebug(); // Load the debugging code.
loadInput(puzzle); // Load a puzzle onto the page (same as the "Load from text" box).
await runAllWithChecks([puzzle1, puzzle2, ...]); // Runs all the listed puzzles, prints solving stats, and returns solutions.
runAll([puzzle1, puzzle2, ...]); // Same as above, but doesn't return the solutions.
Mathimagics wrote:It's hard to provide more examples, since these are the few puzzles for which I have recorded the previous version's guess count.
Thanks the examples! Note that the "cost" of a guess is not necessarily consistent across versions, but it is usually a good proxy for the amount of effort required to solve the puzzle.