Giter Club home page Giter Club logo

bootcamphaskellsudokusolver's Introduction

sudoku-solver

bootcamphaskellsudokusolver's People

Contributors

daigoro22 avatar

Watchers

 avatar

bootcamphaskellsudokusolver's Issues

txtファイルから数独の問題を抽出する

  • txtファイルから改行ごと[String]の形式で読み込もうね
  • [0..]と一緒に zip でまとめたものを foldr にぶちこもうねぇ~

以下のような形式のtxtファイルから9×9マスの数独の問題を抽出する

9   8   5 7   9 4   6  32   21      8       7      59   47  3   8 6   1 2   5   8
73 5  1 6    1   84    2     2     9 4     7 1     6     4    72   6    9 3  7 42
 5  6      83 7  2       8  6 7 1 5 3       8 1 2 8 3  9       1  5 98      1  4 
 6 8      2 4   75     3     6 7  93   5 1   83  6 1     1     57   9 6      7 2 
   7  83 4   3    8 35  9        3 8 9     1 5 2        6  87 5    1   4 89  6   
9   48  1  6 5 4   7     9 7        32     49        8 1     2   9 2 1  5  78   3
2    8  4      8   1 965   6 7   3    2   5    5   6 8   429 1   4      7  3    5
      8    2   5  86 3 7 1   9 5 3     2 9     1 6 4   1 8 3 79  6   1    7      
4  5    2 86  4 3    8   7  4    8 5         5 7    6  1   9    5 4  21 9    7  6
 35   6     8    97  9 5  4  6   39           12   5  6  5 4  82    7     1   27 
          2 3   1   6 592    1 2  7   47 39   9  8 6    951 7   5   6 9          

ソルバーモジュール内で数独問題を全探索する

  • SudokuSolverモジュール作成
  • 列, 行, ブロックごとにバリデートする関数
  • 空きマスの回答候補を取得する関数
  • 全てのマス目が埋まっているかどうか判定する関数
  • マス目に指定した数字を入れる関数
  • 再帰で全探索する関数

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.