A few days ago LP play Sudoku, play to master a variety of abused, I looked to say, minutes to help you do it out,
The result is of course not done.
So the internet search the next Sudoku code, read the next C code, mostly recursion and the like (such as http://blog.sina.com.cn/s/blog_9e16dc4d01013s1y.html)
So think, can this approach be implemented in Erlang?
Tried, found no, because 2-dimensional arrays, pointers what is not in Erlang completely, and the variable, all to change the idea, since Erlang can be concurrent, then the concurrent to fill
Sd_one is to use the unique fill method and the implicit unique Fill method (basic exclusion method) to fix the number set to fill in, if Sd_one, run complete (all the optional values are not changed), use sd_guess to guess the rest of the fill, guess the main process to send an OK message
As for the variable can not change the problem, at first I want to use ETS, the results found that there is not much data, process dictionary faster, and then everything is seconds seconds out
And then try the Baidu inside called the very difficult Sudoku
O (^▽^) o, easy to extract ~ ~ ~
Sudoku _erlang Problem Solving code