Sudoku Programmers Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in          Games  Calendar

Log in to check your private messagesLog in to check your private messages   

Programming Nice Loops

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Programming sudoku
View previous topic :: View next topic  
Author Message
kyriako

Joined: 12 Jun 2008
Posts: 16
:
Location: Germany

Items
PostPosted: Thu Jun 12, 2008 7:53 pm    Post subject: Programming Nice Loops Reply with quote

Hello,
I would like to program a function in C/C++ for solving Nice Loops.
Any idea?

Regards
Kyriakos.
Back to top
View user's profile Send private message
Henk

Joined: 13 Nov 2005
Posts: 105
:

Items
PostPosted: Fri Jun 20, 2008 9:37 pm    Post subject: Reply with quote

Hi,

Programming nice loops is hard... at least, it is hard to make the allgoritm fast and clean. I cannot post any code here, because my program uses a method for solving nice loops and other forcing chains that is over 10.000 lines of code.

The main idea is simple; just follow the chains in your code, save all of them in an array. Keep them in memory and when you want to solve single/dual/tripple/etx forcing chains, just cross them. You could also draw nice pictures whit this information!


I read some questions from you about undestanding forcing chains. You need to understand the basics before starting to program. If you do not understand the basics just google it.
http://www.intosudoku.com/Doc/NiceLoop.html
http://www.intosudoku.com/Doc/ForcingChain.html

This does not uses a lot of resources. My solver program uses this method and can generate over 25.000 puzzles a minute when using about 10Mb memory.

If you need more specific help for this, please let me know.

Henk
_________________
Generate and solve Sudoku puzzles with Into Sudoku!
Back to top
View user's profile Send private message
kyriako

Joined: 12 Jun 2008
Posts: 16
:
Location: Germany

Items
PostPosted: Tue Jul 01, 2008 6:48 pm    Post subject: Programming Nice Loops Reply with quote

Hello Henk,

thank you for your hints.
Meanwhile, I have implemented that method.
Download here:
http://homepages.compuserve.de/meinelg

kyriako.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Programming sudoku All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Sudoku Programmers topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron