<commit_before># Calibron 12 solver

This is a JavaScript / node.js tool that finds the solution to the [Calibron 12](http://www.creativecrafthouse.com/index.php?main_page=product_info&products_id=844) puzzle. The internet also has a great overview of the [origins of the puzzle](http://www.pavelspuzzles.com/2010/08/the_calibron_12block_puzzle.html) and [some ways people have approached solving it](http://mypuzzlecollection.blogspot.com/2012/06/calibron-12.html).

To run this, run `node puzzle.js`.

This is a brute-force solver that simply searches for a solution via iteration, but it does it very efficiently. Even though there are 12! (479,001,600) permutations possible, this tool can find the solution in under a second on a 2.13GHz Core 2 Duo (and it's single-threaded JavaScript!). It can find all variations of the solution (i.e. rotations and swaps) (i.e. evaluate the entire search space) in 48 seconds.

I'm not going to publish the solution, but I'll send it to anyone who asks for it.

To run the tests:

    npm install
    node_modules/.bin/mocha<commit_msg>Link to interesting article about different versions of the puzzle<commit_after># Calibron 12 solver

This is a JavaScript / node.js tool that finds the solution to the [Calibron 12](http://www.creativecrafthouse.com/index.php?main_page=product_info&products_id=844) puzzle. The internet also has a great overview of the [origins of the puzzle](http://www.pavelspuzzles.com/2010/08/the_calibron_12block_puzzle.html), [some ways people have approached solving it](http://mypuzzlecollection.blogspot.com/2012/06/calibron-12.html), and [how the puzzle has changed over the years](http://www.gathering4gardner.org/g4g12gift/Miller_Baxter-Mystery_of_the_Calibron.pdf).

To run this, run `node puzzle.js`.

This is a brute-force solver that simply searches for a solution via iteration, but it does it very efficiently. Even though there are 12! (479,001,600) permutations possible, this tool can find the solution in under a second on a 2.13GHz Core 2 Duo (and it's single-threaded JavaScript!). It can find all variations of the solution (i.e. rotations and swaps) (i.e. evaluate the entire search space) in 48 seconds.

I'm not going to publish the solution, but I'll send it to anyone who asks for it.

To run the tests:

    npm install
    node_modules/.bin/mocha
{'fraction_non_alphanumeric': 0.08158906450234943, 'fraction_numerical': 0.03588210166595472, 'mean_word_length': 4.6298076923076925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 5, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6550636', 'n_tokens_mistral': 776, 'n_tokens_neox': 677, 'n_words': 292}