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   

Stormdoku - a solver in Turbo Pascal.

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Software
View previous topic :: View next topic  
Author Message
strmckr

Joined: 24 Apr 2009
Posts: 52
:

Items
PostPosted: Fri May 08, 2009 6:28 am    Post subject: Stormdoku - a solver in Turbo Pascal. Reply with quote

i have seen a lot of questions with relatively no answers to:
how to build a pascal solver

i decided to build an example solver in:

turbo pascal

i choose this format
as its the only language i am familiar with when it comes to programing.

I am
utilizing the compiler provided by free pascal vs 2.2.4 for this project.

Stormdoku: vs.60

as per request i have released my codes open source
Source Codes

please ensure that you have the following option turned on in free pascal 2.2.4

options->compiler->syntax-> turbo pascal compatibility

other wise it will not compile.

these features are implemented:

    singles: naked / hidden
    pairs: naked / hidden
    triples: naked / hidden
    quads: naked / hidden

    pointing: pairs/triples: (aka cyclops fish)

    x-wings
    finned/ sashimi x-wings

    2- string kytes
    grouped 2-string kytes

    Empty rectangles-
    Siamese rectangles*.
    Dual linked rectangles*
    Dual Siamese rectangles*.
    extended* types covered here

    swordfish
    jelly fish.

    XY - wings
    XYZ - wings
    wxyz - wings

    W - wings type A-E and grouped type E

    M - wing & m-rings

    S - wing



a user can import a txt string from a file or manually create the puzzle.

i have also included a puzzle generator "G" activate it.

which produces a unique solution puzzles and reduces them to a minimal grid based on the techniques included.

{ie will only generate puzzles this program can solve}

the Pencil mark board which is segregated below the puzzle
can be manually modified.

a user can save the current grid they are working on, but not the pm state.

i have also included a solve mode

which only uses logic that is currently implemented above.

there is a hidden batch mode for solving groups of puzzles "B" activates it.
- imports line by line 1 at a time.
- doesn't really tell you much, it counts the number of puzzles that it can solve in a list. and how long it takes to cycle through them.

- I programed this to test new techniques i have been building, it halts if a puzzle is forced into a invalid state from a move set.

- it can do large files i have successfully tested it on the top50000.sdm file. (takes an hour)

Screen shot

edit:updated the file with new stuff.
xy wings, xyz wings.

edit2: added wxyz wings. {basics only}

edit3: upgraded wxyz wings now covers all 6 types, included a link for the types covered.

edit4: rebuilt solver added new things.

edit5: added M wings

edit6 added in Split wings & m-rings


Last edited by strmckr on Mon Dec 07, 2009 9:58 am; edited 26 times in total
Back to top
View user's profile Send private message
hobiwan

Joined: 11 Feb 2008
Posts: 83
:

Items
PostPosted: Fri May 08, 2009 4:40 pm    Post subject: Reply with quote

Hi strmckr,

nice to see that you make your solver available! A hint for other users: stormdoku is a command line application. The size of the command window has to be set to at least 120x62 or it will not display correctly.

Is it possible to display the steps the solver executed?
Back to top
View user's profile Send private message
strmckr

Joined: 24 Apr 2009
Posts: 52
:

Items
PostPosted: Fri Jul 24, 2009 5:54 pm    Post subject: Reply with quote

i have been busy rebuiling my solver from the ground up inproving codes optimizing them a bit more.

in doing so i added in a bunch of new techniques, and a puzzle generator.

Smile enjoy, i have also made the source now GPL and open source.


feel free to aid in upgrading my work with your own

if i have attributed to helping you from my own. Smile
Back to top
View user's profile Send private message
strmckr

Joined: 24 Apr 2009
Posts: 52
:

Items
PostPosted: Tue Nov 03, 2009 7:02 pm    Post subject: Reply with quote

i added in generalized M wings, some grouped variations and the odd 1/2 wing that pops up with the search for these shapes reductions also are included.
Back to top
View user's profile Send private message
strmckr

Joined: 24 Apr 2009
Posts: 52
:

Items
PostPosted: Mon Dec 07, 2009 9:48 am    Post subject: Reply with quote

updated the solver once again

i now have m-wings and rings working and added in links to the topics

along with split wings and a topic on them as well..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Software 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