Marcos Müller wrote: > Hi, > I'm trying to define a soduku solver and i did it... I also find one at ( > http://87.230.22.228/examples/sudoku.ecl.txt) but i wanna to show to the > user how i got to the result... > "explain better" - i wanna to show how many and what tentatives my solver > took to solve this sudoku and then i will try to improve it. Someone has an > idea on how to do that? I think that i have to put some (printf) inside the > labeling or the alldifferent procedures. Rigth? > Ty.... > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > ECLiPSe-CLP-Users mailing list > ECLiPSe-CLP-Users_at_lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users Hi Marcos, The visualisation tools (as described in the Visualisation tools manual) will let you see the effect of propagation on the variable domains, i.e. you can see how the domain for the other variables are affected by labelling of a variable to a value (which I think is what you mean by "what tentative my solver took"). Note however that for many instances, ECLiPSe's lib(ic) does not require much search to find the solution, i.e. just by posting the constraints, it is sufficent to find the solution, or to nearly do so, so you may not see much. [Sudoku puzzles are supposed to have a single unique solution, so the constraints alone are sufficient to determine what the solution should be without any search. The reason that search may be done is because the `resoning' performed by the constraints are not powerful enough. There is a tradeoff between the amount of reasoning done and the time to perform this reasoning, and for the alldifferent constraint used in Sodoku, you currently have a choice of two implementations that perform different amount of reasoning, and the example code you refer to above uses the alldifferent from ic_global, which does more reasoning (and hence less search). Cheers, Kish -- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message. Cisco Systems Limited (Company Number: 02558939), is registered in England and Wales with its registered office at 1 Callaghan Square, Cardiff, South Glamorgan CF10 5BT.Received on Fri Sep 05 2008 - 08:17:53 CEST
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST