Wednesday, 27 May 2015

GitHub.

I setup a GitHub account yesterday.
At first, you might find it difficult to understand but it is a piece of cake actually.

GitHub is an online platform for sharing open-source projects and software developments. Basic motto of it is to keep everything in sync in a team. You can invite someone to contribute to your code, you can check on-going various projects, contribute to them and push it on for responses.

You'd need a GitHub account, GitHub installed on your computer and know 5 to 6 commands. There comes a GUI as well as a Shell application of GitHub on your computer. I'd prefer command line one.

Follow the link below for learning basics of GitHub. Great tutorials. (Y)
GitHub tutorial by LearnCode.academy

Backtracking algorithm is a great tool.

So I wanted to solve the SUDOKU I just recognized from the image I fed in MATLAB and I tried various logic but nothing worked better than "Backtracking". You can find a great explanation of this on YouTube or  http://www.geeksforgeeks.org/backtracking-set-3-n-queen-problem/  .
Basically, a function is made to recur and return values as true or false if the consistency is maintained or not respectively.

Unlike N-Queen problem where you can output simultaneously, you might find need a global variable that stores the ANSWER matrix of SUDOKU if no empty boxes are possible; or else returning values and stepping out of recurring functions might result in losing of the solved matrix.
I could solve a 9x9 SUDOKU in 3 seconds. My program needs optimization.

Will keep posted on program optimization and better image processing techniques because the current one carries several cons.