Skip to content

candybon/TillingPuzzleGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

TillingPuzzleGame

Solve Tilling Puzzle using D. Knuth's Dancing Links Algorithm.

The tiling puzzle

Given a set of 2D coloured rectilinear tiles, and a target board configuration, as bellow:

  • A Simple example :
    alt text
    alt text
    A possible solution:
    alt text

  • A Larger example :
    alt text

Input format

A single text file (ASCII), different characters to represent the shapes and colors of the tiles; the target configuration is assumed to be the largest tile in that file.

  • Simple example above:
......b...bab....abba 
.....aa.....a....baba....b 
  • Large example above txt:
         O     OXOXO         OX          
     X   XO        X  XO     XO          XOXOXOXO
     O    XO           X     O     X     OXOXOXOX
     X                       X     O     XOXOXOXO
           X   O     XO         OXOX     OXOXOXOX
    XOXO   O   X     OX                  XOXOXOXO
    O      X   OXO    O    X             OXOXOXOX
    X      O          X    O    OX       XOXOXOXO
           XO         O    X    XO       OXOXOXOX
                          XO     X       
                          O  

Output

A html file will be generated that contains the following info:

  • Label each piece of rectilinear tiles with a single colour.
  • Each tile(cell) in the piece was labelled with id to represent the relative position of the tile in the piece of rectilinear tiles.
  • Various solutions on how to organize the pieces into the target configuration.

I have uploaded the complete raw HTML of Larger example solutions.

Part of the Screenshot:
alt text

About

Solve Tilling Puzzle by D. Knuth's Dancing Links Algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages