New Posts  All Forums:Forum Nav:

Sudoku Solver

post #1 of 29
Thread Starter 
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.
LL
LL
RAID0R
(14 items)
 
  
CPUMotherboardGraphicsRAM
i5 750 4.0GHz MSI P55-GD80 GTX 470 | 8800GT PhysX 2x2GB G.Skill Ripjaws 
Hard DriveOptical DriveCoolingOS
60GB Agility 2|1TB RAID0|1.5TB Pioneer DVR-217D XSPC Raystorm | XSPC RX240 Windows 7 Professional x64 
MonitorKeyboardPowerCase
27" Dell 2709W | 17" Samsung Logitech G15 Corsair HX850 Corsair 650D 
Mouse
Microsoft IntelliMouse 
  hide details  
Reply
RAID0R
(14 items)
 
  
CPUMotherboardGraphicsRAM
i5 750 4.0GHz MSI P55-GD80 GTX 470 | 8800GT PhysX 2x2GB G.Skill Ripjaws 
Hard DriveOptical DriveCoolingOS
60GB Agility 2|1TB RAID0|1.5TB Pioneer DVR-217D XSPC Raystorm | XSPC RX240 Windows 7 Professional x64 
MonitorKeyboardPowerCase
27" Dell 2709W | 17" Samsung Logitech G15 Corsair HX850 Corsair 650D 
Mouse
Microsoft IntelliMouse 
  hide details  
Reply
post #2 of 29
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.
My Plug In Baby
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 950 @ 4.0 GHz EVGA x58 FTW3 EVGA GTX 470 Corsair Dominator 3x2GB 
OSMonitorPowerCase
Windows 7 19" Flat Panel Acer 900W CoolerMaster CM690 
  hide details  
Reply
My Plug In Baby
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 950 @ 4.0 GHz EVGA x58 FTW3 EVGA GTX 470 Corsair Dominator 3x2GB 
OSMonitorPowerCase
Windows 7 19" Flat Panel Acer 900W CoolerMaster CM690 
  hide details  
Reply
post #3 of 29
Thread Starter 
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.
RAID0R
(14 items)
 
  
CPUMotherboardGraphicsRAM
i5 750 4.0GHz MSI P55-GD80 GTX 470 | 8800GT PhysX 2x2GB G.Skill Ripjaws 
Hard DriveOptical DriveCoolingOS
60GB Agility 2|1TB RAID0|1.5TB Pioneer DVR-217D XSPC Raystorm | XSPC RX240 Windows 7 Professional x64 
MonitorKeyboardPowerCase
27" Dell 2709W | 17" Samsung Logitech G15 Corsair HX850 Corsair 650D 
Mouse
Microsoft IntelliMouse 
  hide details  
Reply
RAID0R
(14 items)
 
  
CPUMotherboardGraphicsRAM
i5 750 4.0GHz MSI P55-GD80 GTX 470 | 8800GT PhysX 2x2GB G.Skill Ripjaws 
Hard DriveOptical DriveCoolingOS
60GB Agility 2|1TB RAID0|1.5TB Pioneer DVR-217D XSPC Raystorm | XSPC RX240 Windows 7 Professional x64 
MonitorKeyboardPowerCase
27" Dell 2709W | 17" Samsung Logitech G15 Corsair HX850 Corsair 650D 
Mouse
Microsoft IntelliMouse 
  hide details  
Reply
post #4 of 29
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..
My Plug In Baby
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 950 @ 4.0 GHz EVGA x58 FTW3 EVGA GTX 470 Corsair Dominator 3x2GB 
OSMonitorPowerCase
Windows 7 19" Flat Panel Acer 900W CoolerMaster CM690 
  hide details  
Reply
My Plug In Baby
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 950 @ 4.0 GHz EVGA x58 FTW3 EVGA GTX 470 Corsair Dominator 3x2GB 
OSMonitorPowerCase
Windows 7 19" Flat Panel Acer 900W CoolerMaster CM690 
  hide details  
Reply
post #5 of 29
Thread Starter 
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?
RAID0R
(14 items)
 
  
CPUMotherboardGraphicsRAM
i5 750 4.0GHz MSI P55-GD80 GTX 470 | 8800GT PhysX 2x2GB G.Skill Ripjaws 
Hard DriveOptical DriveCoolingOS
60GB Agility 2|1TB RAID0|1.5TB Pioneer DVR-217D XSPC Raystorm | XSPC RX240 Windows 7 Professional x64 
MonitorKeyboardPowerCase
27" Dell 2709W | 17" Samsung Logitech G15 Corsair HX850 Corsair 650D 
Mouse
Microsoft IntelliMouse 
  hide details  
Reply
RAID0R
(14 items)
 
  
CPUMotherboardGraphicsRAM
i5 750 4.0GHz MSI P55-GD80 GTX 470 | 8800GT PhysX 2x2GB G.Skill Ripjaws 
Hard DriveOptical DriveCoolingOS
60GB Agility 2|1TB RAID0|1.5TB Pioneer DVR-217D XSPC Raystorm | XSPC RX240 Windows 7 Professional x64 
MonitorKeyboardPowerCase
27" Dell 2709W | 17" Samsung Logitech G15 Corsair HX850 Corsair 650D 
Mouse
Microsoft IntelliMouse 
  hide details  
Reply
post #6 of 29
If you could make a osx version that would be top notch
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
post #7 of 29
Thread Starter 
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
RAID0R
(14 items)
 
  
CPUMotherboardGraphicsRAM
i5 750 4.0GHz MSI P55-GD80 GTX 470 | 8800GT PhysX 2x2GB G.Skill Ripjaws 
Hard DriveOptical DriveCoolingOS
60GB Agility 2|1TB RAID0|1.5TB Pioneer DVR-217D XSPC Raystorm | XSPC RX240 Windows 7 Professional x64 
MonitorKeyboardPowerCase
27" Dell 2709W | 17" Samsung Logitech G15 Corsair HX850 Corsair 650D 
Mouse
Microsoft IntelliMouse 
  hide details  
Reply
RAID0R
(14 items)
 
  
CPUMotherboardGraphicsRAM
i5 750 4.0GHz MSI P55-GD80 GTX 470 | 8800GT PhysX 2x2GB G.Skill Ripjaws 
Hard DriveOptical DriveCoolingOS
60GB Agility 2|1TB RAID0|1.5TB Pioneer DVR-217D XSPC Raystorm | XSPC RX240 Windows 7 Professional x64 
MonitorKeyboardPowerCase
27" Dell 2709W | 17" Samsung Logitech G15 Corsair HX850 Corsair 650D 
Mouse
Microsoft IntelliMouse 
  hide details  
Reply
post #8 of 29
Ooo, I didn't see the jar file, it works I'll have to test it some time
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
post #9 of 29
Cool!
I'm going to take out the book of Sudoku I have and complete some of the impossible ones.
Main
(13 items)
 
  
CPUMotherboardGraphicsRAM
Core i5 3570K ASRock Z77 Pro3 Galaxy 560Ti G.Skills DDR3 
Hard DriveOSMonitorPower
WD Cavier 250GB + SimpleTech 320GB EXHDD Windows 7 x64 Samsung 19" SyncMaster 940BW OCZ 600w GameXStream 
Case
COOLER MASTER Centurion 5 
  hide details  
Reply
Main
(13 items)
 
  
CPUMotherboardGraphicsRAM
Core i5 3570K ASRock Z77 Pro3 Galaxy 560Ti G.Skills DDR3 
Hard DriveOSMonitorPower
WD Cavier 250GB + SimpleTech 320GB EXHDD Windows 7 x64 Samsung 19" SyncMaster 940BW OCZ 600w GameXStream 
Case
COOLER MASTER Centurion 5 
  hide details  
Reply
post #10 of 29
eh, nevermind. Winrar was being stupid...
My Plug In Baby
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 950 @ 4.0 GHz EVGA x58 FTW3 EVGA GTX 470 Corsair Dominator 3x2GB 
OSMonitorPowerCase
Windows 7 19" Flat Panel Acer 900W CoolerMaster CM690 
  hide details  
Reply
My Plug In Baby
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 950 @ 4.0 GHz EVGA x58 FTW3 EVGA GTX 470 Corsair Dominator 3x2GB 
OSMonitorPowerCase
Windows 7 19" Flat Panel Acer 900W CoolerMaster CM690 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming