GithubHelp home page GithubHelp logo

rolyatmax / kenken-solver Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 292 KB

a solver for kenken puzzles

Home Page: https://rolyatmax.github.io/kenken-solver/

JavaScript 98.91% HTML 1.09%
puzzle-solver kenken solver puzzle puzzle-game

kenken-solver's Introduction

kenken solver

Solving kenken puzzles.

Use in browser or with Node. (Note: it still needs some performance improvements. Can take way too long for large puzzles.)

Here's an example.

const solve = require('./solve')
const solution = solve(clues)
console.log(solution)

where clues looks like:

const clues = [
  {
    symbol: '-',
    result: 2,
    cells: ['A1', 'B1']
  },
  {
    symbol: 'x',
    result: 40,
    cells: ['C1', 'D1', 'E1']
  },
  {
    symbol: '+',
    result: 3,
    cells: ['C2', 'D2']
  },
  {
    symbol: null,
    result: 4,
    cells: ['E2']
  },
  {
    symbol: '/',
    result: 2,
    cells: ['B3', 'B4']
  },
  ...
]

To do:

  • switch to A1, B1, etc cell names (instead of [0,0], [1,0], etc)
  • add reset button
  • add "random puzzle" button
  • encode puzzles in URL for easy sharing?
  • clues validation error feedback in the UI
  • animate the solving
  • check for multiple solutions
  • algorithm performance improvements
  • computer-generated kenken puzzles?
  • add some instructions to the UI
  • deploy on github pages

kenken-solver's People

Contributors

rolyatmax avatar

Watchers

 avatar

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.