sort of

回答: 回複:first trialhqw20002011-10-23 20:17:43

My understanding of a logic is that it can be expressed statically and generally by limited number of math equations. For your example, it can be like this roughly.

exist(1,p1) and exist(2,p2) and exist(3,p3) and exist(4,p4) and exist(5,p5) and exist(6,p6) and exist(7,p7) and exist(8,p8) and exist(9,p9) = true where pi belongs to [1,9] and no two pi are the same.

From that, I can get p9=9 and exist(9,p9) = true

You can express the same for any rules that the explainer gets. The difference is that you don't know it or you don't know which one to apply from a vast number of rules until you try it.

Of course, expressing it and solving it is different. We can express any sudoku with something similiar to above. But solving it is another story. I don't remember anyone has tried to solve sudoku using old AI language like prolog, it will be sort of trial and error.

I lost interest in sudoku 6 years ago because it seemed to me there was no clear logical way to solve other than T&E. I did remember one of the forum discussed using logic expression to present it, someone even defined a set of equations and some systematic ways of applying them. But things may have changed and I would be happy to see there is a true one now.

Thanks a lot for posting the latest development.

 

所有跟帖: 

In case you are interested -hqw2000- 給 hqw2000 發送悄悄話 (680 bytes) () 10/24/2011 postreply 18:23:06

Very nice work! -品茗99- 給 品茗99 發送悄悄話 (306 bytes) () 10/26/2011 postreply 17:41:30

謝謝,不想證明什麽了。估計改用c++實現的話,可以快一百倍。 -hqw2000- 給 hqw2000 發送悄悄話 (0 bytes) () 10/28/2011 postreply 18:50:59

您的軟件放在網上了嗎。用什麽寫的。 -wxcfan123- 給 wxcfan123 發送悄悄話 (0 bytes) () 10/29/2011 postreply 16:21:41

用python 實現的,不打算放在網上。 -hqw2000- 給 hqw2000 發送悄悄話 (281 bytes) () 10/29/2011 postreply 17:13:27

請您先登陸,再發跟帖!