GithubHelp home page GithubHelp logo

suguru's Introduction

SUGURU SOLVER

This personnal project was meant to test my ability to build a big project from the ground up (from idea to result, with no premade youtube tutorial available). I also practiced using github and git in the process: all my coordination was done via those two tools.

Although it is far from user friendly, I am able to use it to solve 20x20 extra-hard sugurus in less than an hour. These usually take upwards of 5 hours by hand. Just for that, I consider it a success.

usage: The project takes as input an image of a suguru, then via many separate program files, the image is segmented into cases, the useful data is extracted from those images, then the suguru is represented in the code (as to be manipulated) and then solved. The solved version is displayed at the end.

The most important technologies it leverages are: CNNs: to extract number data cv2: for all image manipulation matplotlib: for solving process updates (lets the user see where it's at, useful for debugging) ac3 algorithm: for solving

suguru's People

Contributors

jubiiz avatar

Watchers

 avatar

suguru's Issues

CLI to help user-friendliness

A CLI could be used to navigate the different source-codes during the suguru resolution process (not only solving: processing, extraction, correction, solving)

Unoptimized CNN

The CNN used to extract numbers from the grid is not optimal: it cannot recognize empty cases:
Here's how it works:

  1. reads the number in the case
  2. if its a 1, check if the average of all the pixel is very low
  3. if so, it's not a 1, it's a blank cell

Non-square problems not supported

The code was not built to support non-square problems. Some parts (like in the processor.py automatic grid selection process) assume that the number of rows = the number of columns.

Inefficient manual grid ROI selection

Manual contour selection to find the ROI (the four corners of the grid) takes time and can be inefficient if done hastily. Consider adding an automatic feature so the program can do it for you (like with cv2.contour).

case crop slicing hard to read

At line 72 of pentomino.py, the slice to extract the individual case image is difficult to read.
The function of each term is not easily understood.
The issue could be resolved by relaying the cropping (or just slice production) task to a function.

Number extraction from cell image

Using the technology as used in CS50 AI to extract what number lies in each cell.
The cell images might have to be cropped again to remove any sidelines: they may interfere with the digit recognition.

More user-friendly code needed

The code has a number of user-unfriendly features that would benefit to be altered.
These features need to be corrected before issue #13 can be tackled.
Here is a brief list of what they are:

  • multiple changes of filename required per source-file
  • inconsistent filename input (sometimes it's "filename.txt", others just "filename")
  • unclear and inconsistent data size input (a few files still rely on the fact that the problem will be 20x20, and do not have a centralized way of changing those numbers)

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.