GithubHelp home page GithubHelp logo

sudoku_csp_ac3's Introduction

Sudoku_CSP_AC3

I] Cài đặt:

Clone project tới máy của bạn:

git clone https://github.com/TruongChiDien/Sudoku_CSP_AC3.git
cd Sudoku_CSP_AC3

Cài các module cần thiết (bỏ qua nếu đã có đủ):

pip3 install argparse itertool

II] Thực thi:

Dự án này chỉ chạy trên Sudoku với bậc chẵn, kích thước của Sudoku bằng bậc^4

python solver.py --edge=<bậc> --sample=<số lượng Sudoku> --level<tỉ lệ được đánh số sẵn>

hoặc chạy với tham số mặc định là sudoku bậc 3, sample = 1 và level = 0.2 như sau:

python solver.py

Trong đó, edge = bậc = độ dài cạnh của 1 hình vuông nhỏ sample = số lượng game mà bạn muốn tạo level = tỉ lệ số ô được đánh số sẵn trong khoảng 0.1 tới 0.4 Nếu tỉ lệ này quá cao sẽ làm việc khởi tạo tốn nhiều thời gian và có thể tạo ra cách Sudoku không có lời giải. Còn nếu quá thấp thì thời gian giải sẽ tăng lên.

Kiểm tra tính đúng đắn của AC-3 bằng cách gọi lệnh sau

python Check_AC3.py

Chúng tôi sẽ tạo một Sudoku với cách cung đã nhất quán sẵn và cho AC3 chạy qua một phiên bản đã được thêm các giá trị khác vào bản chuẩn và so sánh kết quả với bản chuẩn.

sudoku_csp_ac3's People

Contributors

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