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   

How many lines of code.
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku
View previous topic :: View next topic  
Author Message
x.m.yu

Joined: 07 Aug 2008
Posts: 6
:

Items
PostPosted: Thu Aug 07, 2008 12:08 pm    Post subject: Reply with quote

It depends how you write your codes. If there is no comments, no blank lines, no compact lines. I think 300 lines is farely enough. (in C++)
Back to top
View user's profile Send private message MSN Messenger
Sisophon2001

Joined: 05 Mar 2008
Posts: 32
:
Location: Cambodia

Items
PostPosted: Fri Aug 08, 2008 12:49 pm    Post subject: Reply with quote

I posted a sudoku generator in C with 59 lines here

http://www.setbb.com/phpbb/viewtopic.php?t=1571

Garvan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dmhayden

Joined: 01 Aug 2007
Posts: 16
:
Location: Central New Jersey

Items
PostPosted: Sun Oct 12, 2008 12:46 am    Post subject: Reply with quote

2322 lines of C++, including Borland C++Builder GUI. The code is written for readability, elegance, and speed, in that order. I have classes for Bitmap, Square and Board. Techniques are:
    Naked singles
    Hidden singles
    Pointers
    Pairs
    Tuples (extension of pairs, where N squares have the exact same N
    posibilities)
    Naked Tuples
    Hidden Tuples
    Brute force

The algorithms are all contained within the Board class, which has 1264 lines of code.
Back to top
View user's profile Send private message AIM Address
briturner

Joined: 14 Oct 2008
Posts: 75
:

Items
PostPosted: Mon Nov 03, 2008 12:14 am    Post subject: Reply with quote

My Bit Based solver is running around 715 lines of code. The program is a command line program, but the line count includes code for displaying instructions, getting timings, and displaying answers (using ascii graphics).

The actual solver code, including tables, is around 300 lines of c code.

brit
Back to top
View user's profile Send private message
zerothbase

Joined: 02 Nov 2008
Posts: 17
:

Items
PostPosted: Fri Nov 07, 2008 1:39 pm    Post subject: Reply with quote

about 206 lines of code http://tinyurl.com/6krpwl (comments and blank lines removed)
solves 2x2, 3x3, 4x4, or 5x5 puzzles with a compile time option.
Back to top
View user's profile Send private message
hack2root

Joined: 10 Jun 2009
Posts: 1
:

Items
PostPosted: Wed Jun 10, 2009 7:59 pm    Post subject: {sudoku} Reply with quote

12000
<1M

development of the site at w w w . s u d o k u - a r t . c o m
Back to top
View user's profile Send private message
rurban

Joined: 20 Aug 2009
Posts: 1
:

Items
PostPosted: Fri Aug 21, 2009 2:18 pm    Post subject: solvers in perl Reply with quote

LOC's of various perl solvers: (not lines of code, also included comments and docs)

1659 lines Games::Sudoku::Win32
my own unfinished solver
with 10 basic rules and Win32 GUI

682 lines Games::Sudoku::Lite
simple backtracking only

408 lines Games::Sudoku::CPSearch

3191 lines, 8 files Games::Sudoku::SudokuTk

2375 lines Games::Sudoku::Component
+ 1149 lines Games::Sudoku::Component::TkPlayer (UI)

768 lines Games::Sudoku::Solver

664 lines Games::YASudoku

2683 lines Games::Sudoku::General
generic constraints solver

549 lines Games::LogicPuzzle
generic backtracking solver with sudoku sample

568 lines Games::Sudoku::OO
broken and simple
Back to top
View user's profile Send private message
x.m.yu

Joined: 07 Aug 2008
Posts: 6
:

Items
PostPosted: Sun Dec 13, 2009 6:23 pm    Post subject: Reply with quote

Ha~.
300 lines (without counting blank lines) in C++ are fairly enough for sudoku solver.
Back to top
View user's profile Send private message MSN Messenger
sudoking

Joined: 20 Oct 2009
Posts: 40
:

Items
PostPosted: Mon Dec 14, 2009 10:29 am    Post subject: Reply with quote

x.m.yu wrote:
Ha~.
300 lines (without counting blank lines) in C++ are fairly enough for sudoku solver.


There's a difference between "solving" and brute force.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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