Giter Site home page Giter Site logo

puzzlesolver's Introduction

Pencil Puzzle Solver

MiniSatというSATソルバを利用したパズルソルバです。 MiniSatをインストールし、main.hsをコンパイルしてください。

$ ghc -O main.hs

現在、数独とイラストロジックに対応しています。

./main <PuzzleType> <FilePath> で実行します。

PuzzleTypeは、sudoku(数独)、illustlogic(イラストロジック)です。

数独

入力するファイルは、 ・はじめの行に"ブロックの行サイズ ブロックの列サイズ" ・二行目以降に問題 としてください。

ブロックが 1 2 3 4 5 6 なら行サイズは2、列サイズは3です。

例)

3 3

2 5 0 0 3 0 0 4 6
0 0 9 0 2 0 0 0 8
4 3 0 7 6 1 0 0 9
0 0 0 6 0 0 0 0 0
1 0 0 9 8 4 0 0 5
0 0 0 0 0 2 0 0 0
3 0 0 1 4 8 0 7 2
8 0 0 0 7 0 9 0 0
7 4 0 0 9 0 0 5 3

イラストロジック

入力するファイルは、 ・はじめの行に"行サイズ 列サイズ" ・二行目以降は行の制約条件の数字、その後に列の制約条件の数字 としてください。

例)

15 15
 
0
1 2
2 1
1 2
3 1 3
8 1
10 1
12
10 1
12
12
12
10
3 3
0
 
0
0
7
9
10
10
9
12
1 8
1 1 9
1 2 8
1 1 8
1 1 4
7 
0

puzzlesolver's People

Contributors

amutake avatar

Watchers

 avatar  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.