Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javascript ken ken puzzle generator

Heloo,

I am in need of generating a ken ken puzzle in javascript.. but have no idea where to start. any help would be appreciated.

like image 212
majestiq Avatar asked Feb 23 '10 04:02

majestiq


2 Answers

Here's what I would do:

  1. Write an interactive javascript ken ken app for human solvers. This takes care of the GUI portion of your project.
  2. Write an automatic solver for ken ken. You'd have to do this anyway, since you want to guarantee that your generated puzzles have unique solutions for it to be "proper".
  3. Once you made it that far, then you can write the puzzle generator. There's a lot of reading that you can do on this subject to see how others have done this in general. The approach usually works with a lot of puzzles in this class.

An excellent example of a framework for generating and solving puzzles in this class is Simon Tatham's Portable Puzzle Collection. It has implementations of so far 32 puzzles on top of the same framework. In fact, it already has an implementation of KenKen (link to source code on SVN).

like image 179
polygenelubricants Avatar answered Nov 08 '22 12:11

polygenelubricants


You can first fill the whole grid, divide them into various subsections, and then get the relationships among the the numbers present in the section... reverse engineering.

like image 40
Tejasva Dhyani Avatar answered Nov 08 '22 10:11

Tejasva Dhyani