Git Product home page Git Product logo

tatamidoku's Introduction

Tatamidoku

Tatamidoku is a fun game/logic puzzle I found via Andrea Sabbatini's 100 Logic Games, though it is just named "Tatami" there. This is not the same as Tatamibari.

Unfortunately, the hint system in 100 Logic Games is not ideal, simply providing the answer for the topmost leftmost square. Instead, I decided to build a generator and algorithmic solver, in order to provide more gentle hints (e.g. "look at this column") and to create my own puzzles.

Rule summary

Tatamidoku is played on a square grid, which is also divided into sections, a little like sudoku. However in Tatamidoku, the subdivisions are rectangular and just a single cell wide or tall. Each section contains the same number of cells, and the grid is at least two sections across. Common sizes are 3-, 4-, or 5-cell sections, and 2- or 3-section grids.

This layout can produce an effect rather like tatami mats used for flooring in traditional Japan, hence the name.

To be able to more easily explain the rest of the rules, let's assume that each section has n cells, and the grid is s sections across, for a total of g = n × s cells on each side.

The grid must be filled using the digits from 1 to n. Similar to sudoku, each section must contain each digit exactly once. In addition to this, each row and column must contain each digit s times and cells that share a border must not have the same digit (though it's permitted diagonally).

Example

One of the most common layouts is 3-cell sections and 6x6 (i.e. 2-section) grids. These sections must be filled with the digits 1, 2, and 3. Each of those digits must appear twice in every row and every column, and orthogonally adjacent cells must have different values.

For example, this completed grid:

┏━━━┳━━━┳━━━┳━━━┯━━━┯━━━┓
┃ 1 ┃ 2 ┃ 3 ┃ 2 │ 3 │ 1 ┃
┠───╂───╂───╊━━━┿━━━┿━━━┫
┃ 3 ┃ 1 ┃ 2 ┃ 1 │ 2 │ 3 ┃
┠───╂───╂───╊━━━┿━━━┿━━━┫
┃ 2 ┃ 3 ┃ 1 ┃ 3 │ 1 │ 2 ┃
┣━━━╋━━━╇━━━╇━━━╈━━━╈━━━┫
┃ 3 ┃ 2 │ 3 │ 1 ┃ 2 ┃ 1 ┃
┠───╊━━━┿━━━┿━━━╉───╂───┨
┃ 2 ┃ 1 │ 2 │ 3 ┃ 1 ┃ 3 ┃
┠───╊━━━┿━━━┿━━━╉───╂───┨
┃ 1 ┃ 3 │ 1 │ 2 ┃ 3 ┃ 2 ┃
┗━━━┻━━━┷━━━┷━━━┻━━━┻━━━┛

Notice how the sections don't necessarily align, possibly made clearer by highlighting them with their direction:

┏━━━┳━━━┳━━━┳━━━┯━━━┯━━━┓
┃ | ┃ | ┃ | ┃ - │ - │ - ┃
┠───╂───╂───╊━━━┿━━━┿━━━┫
┃ | ┃ | ┃ | ┃ - │ - │ - ┃
┠───╂───╂───╊━━━┿━━━┿━━━┫
┃ | ┃ | ┃ | ┃ - │ - │ - ┃
┣━━━╋━━━╇━━━╇━━━╈━━━╈━━━┫
┃ | ┃ - │ - │ - ┃ | ┃ | ┃
┠───╊━━━┿━━━┿━━━╉───╂───┨
┃ | ┃ - │ - │ - ┃ | ┃ | ┃
┠───╊━━━┿━━━┿━━━╉───╂───┨
┃ | ┃ - │ - │ - ┃ | ┃ | ┃
┗━━━┻━━━┷━━━┷━━━┻━━━┻━━━┛

tatamidoku's People

Contributors

dingram avatar

Stargazers

 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.