Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming

Reply
 
LinkBack Thread Tools
Old 05-20-07   #1 (permalink)
IDDQD
 
C-bro's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Windsor, ON
Posts: 2,292

Rep: 341 C-bro is a proven memberC-bro is a proven memberC-bro is a proven memberC-bro is a proven member
Unique Rep: 264
FAQs Submitted: 6
Hardware Reviews: 9
Trader Rating: 1
Default Sudoku Solver

I've been working on this off and on for the past little while, and I'm finally pretty well complete. I have released my final version in the zip file below.

The package includes an executable jar, a Windows executable file, and a sample puzzle that can be opened with the solver.



Features:
  • NEW! The solver can now be used on 9x9, 16x16, and 25x25 puzzles.
  • NEW! Users can navigate from cell to cell using the arrow keys.
  • NEW! Invalid puzzles are now recognized and the user is notified.
  • Users can save puzzles to file and open them at a later date (see below for formatting)
  • Users can display the possible values for every cell rather than solving the puzzle.
  • The original puzzle can be recalled after solving.
  • ANY puzzle is solved as long as a valid solution exists (even if you don't fill in any squares).
File Format:

If you want to prepare a sudoku puzzle in notepad, instead of entering in the GUI cells. Just make a text file and put each value on a new line. Be sure to save the file as either a .txt or a .sudoku. By default, the "Save..." function appends the .sudoku extension. If there is an unknown, just leave the line blank. In other words, for the puzzle:

1 _ 5 | 2 3 4 | _ 7 8
.........

The file would look like:
1

5
2
3
4

7
8
...

Non-Windows Users:

For those who are unable or unwilling to use the provided .exe file, the program can be run from the command line using:

java -jar sudoku.jar

Known Issues:
  • Switching between different sized puzzles with the "Possible Values" tab open will result in undesirable appearance. NOTE: This has been addressed and corrected and will be available at the next file update.
  • The solver does NOT operate with letters, only numbers for all puzzles.
  • Solving a 25x25 puzzle can take a long time.
Thanks for your time and interest.
Attached Thumbnails
Sudoku Solver-16.png   Sudoku Solver-small.png  
Attached Files
File Type: rar webSudoku.rar (108.0 KB, 128 views)

System: RAID0R
CPU
Intel E2180 3.33GHz
Motherboard
Asus P5K-E/WIFI-AP vMod
Memory
2GB Kingmax DDR2-1066
Graphics Card
EVGA 8800GT
Hard Drive
2x250GB WD+500GB 7200.11
Sound Card
SB Audigy 2
Power Supply
Corsair VX550
Case
Lian Li PC-7B Plus II
CPU cooling
Arctic Cooling Freezer 7 Pro
GPU cooling
Zalman VF900-Cu
OS
Windows Vista Business
Monitor
Dell 2709W 27"

Last edited by C-bro : 05-30-07 at 10:10 PM
C-bro is offline Overclocked Account C-bro's Gallery   Reply With Quote
Old 05-20-07   #2 (permalink)
Overclocker
 
lavieinjuste's Avatar
 
intel ati

Join Date: Mar 2007
Location: Waxahachie, Texas
Posts: 1,426
Blog Entries: 1

Rep: 114 lavieinjuste is acknowledged by manylavieinjuste is acknowledged by many
Unique Rep: 96
Trader Rating: 4
Default

I tried it out. It is really nice. Is there any way it can get rid of the temporary files that it creates after you close the program? Just for a cleaner folder around the .exe when you are done.

I am gonna hold on to this one if that is alright with you. I have been using this msdos version of a solver, and it takes forever to enter the numbers.
__________________
Quote:
Originally Posted by archangelabove View Post
Amazing.
We are all capable of being amazing.
That sounds like I just read a poem book about trees and flowers and the sun. Amazing.
Capability to be amazing.
It almost makes you feel like your in a musical, and everything is fine and dandy, and you're the star.
And then that's when I woke up in my desk cubicle looking out the window. How lame.

System: My Plug In Baby
CPU
P4 Prescott w/HT 2.8 @3.85GHz
Motherboard
ABIT Fatal1ty FP-IN9 650i
Memory
OCZ Reaper HPC 2x1GB DDR2 PC26400
Graphics Card
ASUS EAX1950PRO 256MB DDR3
Hard Drive
80GB + 80GB + 20GB
Sound Card
Onboard
Power Supply
450W
Case
CoolerMaster CM690
CPU cooling
Masscool 8WA741
GPU cooling
Stock
OS
Windows XP MCE2005
Monitor
19" Flat Panel Acer
lavieinjuste is offline lavieinjuste's Gallery   Reply With Quote
Old 05-20-07   #3 (permalink)
IDDQD
 
C-bro's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Windsor, ON
Posts: 2,292

Rep: 341 C-bro is a proven memberC-bro is a proven memberC-bro is a proven memberC-bro is a proven member
Unique Rep: 264
FAQs Submitted: 6
Hardware Reviews: 9
Trader Rating: 1
Default

Man, I can't believe I left those stupid text file things in there. I'll eliminate them in the next few minutes and post an executable jar as well. Thanks for checking it out.

System: RAID0R
CPU
Intel E2180 3.33GHz
Motherboard
Asus P5K-E/WIFI-AP vMod
Memory
2GB Kingmax DDR2-1066
Graphics Card
EVGA 8800GT
Hard Drive
2x250GB WD+500GB 7200.11
Sound Card
SB Audigy 2
Power Supply
Corsair VX550
Case
Lian Li PC-7B Plus II
CPU cooling
Arctic Cooling Freezer 7 Pro
GPU cooling
Zalman VF900-Cu
OS
Windows Vista Business
Monitor
Dell 2709W 27"
C-bro is offline Overclocked Account C-bro's Gallery   Reply With Quote
Old 05-20-07   #4 (permalink)
Overclocker
 
lavieinjuste's Avatar
 
intel ati

Join Date: Mar 2007
Location: Waxahachie, Texas
Posts: 1,426
Blog Entries: 1

Rep: 114 lavieinjuste is acknowledged by manylavieinjuste is acknowledged by many
Unique Rep: 96
Trader Rating: 4
Default

Quote:
Originally Posted by C-bro View Post
Man, I can't believe I left those stupid text file things in there. I'll eliminate them in the next few minutes and post an executable jar as well. Thanks for checking it out.
Oh I didn't know what the files were, but when I extracted it and then closed the program, WinRAR said that there were files that were created in the directory...

and de nada..
__________________
Quote:
Originally Posted by archangelabove View Post
Amazing.
We are all capable of being amazing.
That sounds like I just read a poem book about trees and flowers and the sun. Amazing.
Capability to be amazing.
It almost makes you feel like your in a musical, and everything is fine and dandy, and you're the star.
And then that's when I woke up in my desk cubicle looking out the window. How lame.

System: My Plug In Baby
CPU
P4 Prescott w/HT 2.8 @3.85GHz
Motherboard
ABIT Fatal1ty FP-IN9 650i
Memory
OCZ Reaper HPC 2x1GB DDR2 PC26400
Graphics Card
ASUS EAX1950PRO 256MB DDR3
Hard Drive
80GB + 80GB + 20GB
Sound Card
Onboard
Power Supply
450W
Case
CoolerMaster CM690
CPU cooling
Masscool 8WA741
GPU cooling
Stock
OS
Windows XP MCE2005
Monitor
19" Flat Panel Acer
lavieinjuste is offline lavieinjuste's Gallery   Reply With Quote
Old 05-20-07   #5 (permalink)
IDDQD
 
C-bro's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Windsor, ON
Posts: 2,292

Rep: 341 C-bro is a proven memberC-bro is a proven memberC-bro is a proven memberC-bro is a proven member
Unique Rep: 264
FAQs Submitted: 6
Hardware Reviews: 9
Trader Rating: 1
Default

Quote:
Originally Posted by lavieinjuste View Post
Oh I didn't know what the files were, but when I extracted it and then closed the program, WinRAR said that there were files that were created in the directory...

and de nada..
Interesting. What were the files called? Originally I had an output.txt being generated to check my toString() method. I eliminated that, and I just tried running my exe from the zip file and nothing got created. Also, does the file get generated during execution, then disappear, or does it stay around?

System: RAID0R
CPU
Intel E2180 3.33GHz
Motherboard
Asus P5K-E/WIFI-AP vMod
Memory
2GB Kingmax DDR2-1066
Graphics Card
EVGA 8800GT
Hard Drive
2x250GB WD+500GB 7200.11
Sound Card
SB Audigy 2
Power Supply
Corsair VX550
Case
Lian Li PC-7B Plus II
CPU cooling
Arctic Cooling Freezer 7 Pro
GPU cooling
Zalman VF900-Cu
OS
Windows Vista Business
Monitor
Dell 2709W 27"
C-bro is offline Overclocked Account C-bro's Gallery   Reply With Quote
Old 05-20-07   #6 (permalink)
born to folk
 
Niko-Time's Avatar
 
intel ati

Join Date: Dec 2005
Location: Notts
Posts: 4,756

Rep: 273 Niko-Time is a proven memberNiko-Time is a proven memberNiko-Time is a proven member
Unique Rep: 188
FAQs Submitted: 3
Trader Rating: 10
Default

If you could make a osx version that would be top notch
__________________
By the power of truth, I, while living, have conquered the universe.

http://www.last.fm/user/niko-time/

System: ...too hot to 'clock
CPU
E6420
Motherboard
P5B Deluxe Wifi
Memory
Corsair XMS2 2GB
Graphics Card
8800GT 512MB XFX Alpha Dog Extreme
Hard Drive
500GB WD
Sound Card
Chaintech AV-710 via digital output
Power Supply
CoolerMaster iGreen 600W
Case
Cyber's HTPC beast
CPU cooling
Stock
GPU cooling
Stock
OS
Vista
Monitor
ViewSonic 19"
Niko-Time is offline Overclocked Account Niko-Time's Gallery   Reply With Quote
Old 05-20-07   #7 (permalink)
IDDQD
 
C-bro's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Windsor, ON
Posts: 2,292

Rep: 341 C-bro is a proven memberC-bro is a proven memberC-bro is a proven memberC-bro is a proven member
Unique Rep: 264
FAQs Submitted: 6
Hardware Reviews: 9
Trader Rating: 1
Default

Quote:
Originally Posted by Niko-Time View Post
If you could make a osx version that would be top notch
Well it's to my understanding that Java is portable, in the sense that the classes are the same for every system, and it's up to your runtime environment to interpret the code for OSX. If you have a command prompt type thing in OSX, you should be able to use the included jar file by going:

java -jar sudoku.jar

System: RAID0R
CPU
Intel E2180 3.33GHz
Motherboard
Asus P5K-E/WIFI-AP vMod
Memory
2GB Kingmax DDR2-1066
Graphics Card
EVGA 8800GT
Hard Drive
2x250GB WD+500GB 7200.11
Sound Card
SB Audigy 2
Power Supply
Corsair VX550
Case
Lian Li PC-7B Plus II
CPU cooling
Arctic Cooling Freezer 7 Pro
GPU cooling
Zalman VF900-Cu
OS
Windows Vista Business
Monitor
Dell 2709W 27"
C-bro is offline Overclocked Account C-bro's Gallery   Reply With Quote
Old 05-20-07   #8 (permalink)
born to folk
 
Niko-Time's Avatar
 
intel ati

Join Date: Dec 2005
Location: Notts
Posts: 4,756

Rep: 273 Niko-Time is a proven memberNiko-Time is a proven memberNiko-Time is a proven member
Unique Rep: 188
FAQs Submitted: 3
Trader Rating: 10
Default

Ooo, I didn't see the jar file, it works I'll have to test it some time
__________________
By the power of truth, I, while living, have conquered the universe.

http://www.last.fm/user/niko-time/

System: ...too hot to 'clock
CPU
E6420
Motherboard
P5B Deluxe Wifi
Memory
Corsair XMS2 2GB
Graphics Card
8800GT 512MB XFX Alpha Dog Extreme
Hard Drive
500GB WD
Sound Card
Chaintech AV-710 via digital output
Power Supply
CoolerMaster iGreen 600W
Case
Cyber's HTPC beast
CPU cooling
Stock
GPU cooling
Stock
OS
Vista
Monitor
ViewSonic 19"
Niko-Time is offline Overclocked Account Niko-Time's Gallery   Reply With Quote
Old 05-20-07   #9 (permalink)
ORLY?!
 
TaiDinh's Avatar
 
intel nvidia

Join Date: Jan 2007
Location: Philadelphia, PA
Posts: 10,384

Folding Team Rank: 295
Trader Rating: 0
Default

Cool!
I'm going to take out the book of Sudoku I have and complete some of the impossible ones.
__________________
Quote:
Originally Posted by stanrc View Post
Portal will last 6-10 on the first play through. I don't know about the others. Your machine can handle it fine, I've played them all on a 2600 and they still look great.

System: Emily
CPU
Q6600 G0 3.24GHz w/ 1.4v
Motherboard
Gigabyte DS3 rev 3.3
Memory
2x1GB G.Skills DDR2 800 NR
Graphics Card
Dying eVGA 8800GTS 640MB (G80)
Hard Drive
WD Cavier 250GB + SimpleTech 320GB EXHDD
Power Supply
OCZ 600w GameXStream
Case
COOLER MASTER Centurion 5
CPU cooling
Zalman 9700NT + AS5
GPU cooling
Stock + AS5 + Intel stock fan
OS
Vista Ultimate x86 SP2
Monitor
Samsung 19" SyncMaster 940BW
TaiDinh is offline I fold for Overclock.net Overclocked Account TaiDinh's Gallery   Reply With Quote
Old 05-20-07   #10 (permalink)
Overclocker
 
lavieinjuste's Avatar
 
intel ati

Join Date: Mar 2007
Location: Waxahachie, Texas
Posts: 1,426
Blog Entries: 1

Rep: 114 lavieinjuste is acknowledged by manylavieinjuste is acknowledged by many
Unique Rep: 96
Trader Rating: 4
Default

eh, nevermind. Winrar was being stupid...
__________________
Quote:
Originally Posted by archangelabove View Post
Amazing.
We are all capable of being amazing.
That sounds like I just read a poem book about trees and flowers and the sun. Amazing.
Capability to be amazing.
It almost makes you feel like your in a musical, and everything is fine and dandy, and you're the star.
And then that's when I woke up in my desk cubicle looking out the window. How lame.

System: My Plug In Baby
CPU
P4 Prescott w/HT 2.8 @3.85GHz
Motherboard
ABIT Fatal1ty FP-IN9 650i
Memory
OCZ Reaper HPC 2x1GB DDR2 PC26400
Graphics Card
ASUS EAX1950PRO 256MB DDR3
Hard Drive
80GB + 80GB + 20GB
Sound Card
Onboard
Power Supply
450W
Case
CoolerMaster CM690
CPU cooling
Masscool 8WA741
GPU cooling
Stock
OS
Windows XP MCE2005
Monitor
19" Flat Panel Acer
lavieinjuste is offline lavieinjuste's Gallery   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -5. The time now is 08:52 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.17337 seconds with 9 queries