Coder Social home page Coder Social logo

codebreaker40's Introduction

CodeBreaker40

Program for cracking the CodeBreaker 40 Puzzle.

Update 10/31/18

After running this code for ~1 month straight, the code had just incremented the 4th slot to "1", and as such will take a very long time to run. Any insight for how to improve the amount of time this would take without a super computer is appreciated!

Folders Outline

  • CodeBreaker40-master โ€” Contains initial Java files i started with when rewriting the code. (Did not get very far with the java).

  • Original Code โ€” Contains the original Python project. This works for solving a puzzle.

Goal

The goal is to create code that is able to run in an attempt to find a single puzzle with multiple unique solutions (if any exist).

My thought is that the it would run through every possible puzzle layout starting from a puzzle with all 0's (clearly no solution) and work up to 40 in each slot (essentially a base 41 counting system).

Details

Intro

Codebreaker 40 is a puzzle game and can be purchased here.

The goal of the puzzle is to align the numbers so that every column equates to 40. Using a brute force method and python, it has been confirmed that there exists only a single solution.

The goal was to reconstruct the original program from Python into a Java program which accepts any puzzle size and checks how many solutions exist, but has since been reconstructed in Python instead.

What constitutes a Solution?

A solution consists of the following conditions:

  • All columns add to the desired number
  • Numbers do not repeat too often. (Explained below)

Unique Solutions

When evaluating how many solutions a single puzzle has, we look at two numbers:

  1. How many solutions exist?
  2. How many unique solutions exist?

For example, if we have 3 columns and 2 rows (no notches):

1 1 1
1 1 1

Each column will add up to 2 (in this case the desired number). We can turn the top row so that the 1's are in 3 different positions (each 1 is unique), thus meaning we have a total of 3 solutions. However, if the 1's are not unique, we only have a single solution, thus we have a total of 1 unique solution.

codebreaker40's People

Contributors

makupi avatar terabytetiger avatar

Watchers

 avatar

codebreaker40's Issues

Overload Main for Testing Increment Array

File: TestIncrementArray.py
Request: Overload main so that users can set the number of iterations to run, set a different max value, and pass their own array in (of any size).

Add additional example(s) to Readme.md

Add the following examples:

  • A better example of what constitutes a "Unique" solution. (Notably doesn't need to be more complex, just more clear)
  • Maybe add a bolded footer row to show the column totals?
  • Add an example of how the increment process works

Improve Clarity of README.md

File: README.md
Request: Update the readme to be more clear.

Make sure that someone that isn't familiar with the mechanics of the puzzle is able to read the readme and understand the puzzle and what the code's process of solving the puzzle is.

Fix link to safecracker40 in README

File: README.md
Request: Currently the link in Readme goes to the seller's homepage. This needs to be updated to actually link to the SafeCracker40 page. (I believe Safecracker 40 is the product name on the seller's site)

Improved testing - ArrayIncrement.py

File: Create autoTestArrayIncrement.py
Request: Create a new test file that will call TestArrayIncrement.py with ordered values so that output can be validated properly.

**THIS WILL NEED TO BE COMPLETED AFTER #2 **

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.