nfwu Posted April 11, 2006 Share Posted April 11, 2006 (edited) 4th Revision! http://www.autoitscript.com/fileman/users/nfwu/sudoku.au3 I had a look around at some of the other Sudoku helpers, and noticed that none of them automatically tracked all the data while you are solving a puzzle. This one tracks the possibilities that each location can have. (I apologize to those who have small screens... The GUI width and height is about 700+ pixels) Click on the small buttons and see what happens! I don't really know how to explain how to use this, try learning through experimentation! Screenshot: The solution to the above displayed sudoku, if you are interested, can be seen by clicking on this link: http://img124.imageshack.us/img124/766/solution5mc.png list] [*]Initial: A sudoku solver which automatically keeps track of the data. [*]Revision 1: Added group boxes to distinguish the different cells [*]Revision 2: Added automated Sudoku solving (not perfect yet!) [*]Revision 3: Added an undo feature. Large buttons revert to small buttons when you click on them. [*]Revision 4: Fixed 2 bugs. Upgrated Automatic Solving. EDIT: 12th April 2006 - 04:27 PM: 1st Revision EDIT: 12th April 2006 - 07:32 PM: 2nd Revision EDIT: 14th May 2006 - 01:17 PM : 3rd Revision Edited June 6, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Sunblood Posted April 11, 2006 Share Posted April 11, 2006 Could you add some dividing lines to your GUI? Right now it just looks like a garbled mess of buttons when it isn't solved. Other than that, great job. Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted April 11, 2006 Share Posted April 11, 2006 Very nice. Just, like Sunblood said, put groups around each main box (GuiCtrlCreateGroup I believe), and it will make a lot more sense. It took me a minute to realize what it was I was looking at Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
JSThePatriot Posted April 11, 2006 Share Posted April 11, 2006 First I would like to say. You have done an excellent job on this.I am sad to say I had to go look up Sudoku to find out what it is and how it works. I figured I would share my findings here and save everyone else the trouble.http://en.wikipedia.org/wiki/SudokuExcellent program/game. I look forward to playing it and sharpening my logic skills.Thanks,JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
jftuga Posted April 12, 2006 Share Posted April 12, 2006 Excellent program/game. I look forward to playing it and sharpening my logic skills.Yea, some of the puzzles can be pretty challenging. USAToday.com has daily puzzles.-John Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile Link to comment Share on other sites More sharing options...
nfwu Posted April 12, 2006 Author Share Posted April 12, 2006 Thanks for the feedback!@JSThePatriot: Thanks for sharing that link... Should have realised that wikipedia had an article for it.@Sunblood and @MSLx Fanboy: I will put some code in there to put groups round the cells, thanks for informing me of that!@jftuga: Nice link! But maybe you should be more direct: http://puzzles.usatoday.com/sudoku/#) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
nfwu Posted April 12, 2006 Author Share Posted April 12, 2006 1st Revision. ========= Added group boxes to distinguish the different cells. Please give more suggestions for improvement! (Who wants a sudoku generator to go along with this?) #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
nfwu Posted April 12, 2006 Author Share Posted April 12, 2006 (edited) Revision 2. ======= Added automated Sudoku solving (not perfect yet!) Input the sudoku, then press {F5}, when the auto-solver gets stuck, press {F6} then solve the problem, then hit {F5} to continue the auto-solving. NOTE: When the auto-solver gets stuck, the part where it gets stuck at is most likely NOT going to be easy to solve! #) EDIT: Some data for the interested: The auto-solver solves the example sudoku in the 1st post in 3 seconds without getting stuck. Edited April 12, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted April 17, 2006 Share Posted April 17, 2006 When selecting boxes, a few mini-buttons tend to delete all together. To clarify, if only two options exist for a specific square, when one of the values is selected in a neighboring box, both buttons disappear. Also, how does the program look with @GUI_DISABLED set for the large buttons? Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
Sunblood Posted April 19, 2006 Share Posted April 19, 2006 I think the large buttons should revert back to the smaller buttons if you click them again. I keep making mistakes but I can't undo them without undoing the entire puzzle. Link to comment Share on other sites More sharing options...
zerobazar Posted April 19, 2006 Share Posted April 19, 2006 I fully agree with Sunblood, I'm doing the same mistakes! I would also enlarge the font (and maybe put it bold) on large buttons: it would give better visibility to help solving the puzzle. This script is a very nice helper. Nice job! Link to comment Share on other sites More sharing options...
nfwu Posted April 19, 2006 Author Share Posted April 19, 2006 @Sunblood and @zerobazar: Thanks for the input, I'll release that in the next revision. @MSLx Fanboy: Is it possible for you to post some "before" and "after" screenshots? #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
MrBadAxe Posted May 12, 2006 Share Posted May 12, 2006 Awesome. Was trying to program something like this myself but you've done a superior job. One thing this still needs...reset button. Link to comment Share on other sites More sharing options...
nfwu Posted May 14, 2006 Author Share Posted May 14, 2006 Finally got round to doing what I promised 1 month ago. Revision 3 ======= A undo feature has been added~! Large buttons revert to small buttons when you click on them. Please check for errors with the new code, as far as I tested it, it works as it should. @MrBadAxe: Reset = rerunning the program. Sorry, but i did not see your post when doing this revision. #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
nfwu Posted May 16, 2006 Author Share Posted May 16, 2006 (edited) Discovered that the undo feature prevents automated solving from working correctly. Will fix that in the next revision along with a new automated solving algorithum.This new one should be able to solve the whole puzzle without human intervention.#)edit: @MrBadAxe: I'll include a reset button along with this one! Edited May 16, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
gamerman2360 Posted June 5, 2006 Share Posted June 5, 2006 When you undo it. It sets all the small buttons back in all the other boxes in that row/collum. The bad thing is that includes the ones that are already in the large button form. Then you can accidently click a small button behind a large button and make a mess of the game board. Link to comment Share on other sites More sharing options...
nfwu Posted June 5, 2006 Author Share Posted June 5, 2006 That's wierd. I'll check it out when I get home 2dae. #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
nfwu Posted June 6, 2006 Author Share Posted June 6, 2006 Thanks for spotting that bug. My private version has been updated. Will update the public version in the first post when the automatic solving has been repaired and upgrated. #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
nfwu Posted June 6, 2006 Author Share Posted June 6, 2006 (edited) Current status: After much fiddling, repaired basic automatic solving. Now testing advanced automatic solving. About to finish, nfwu #) Edit @ 09:59 AM: Spotted a bug with the undo code - involving reselection. Now repairing. The Automatic Solving works much better now - only jams up on the really hard puzzles (that I myself cannot solve ). Edit @ 10:07 AM: Bug repaired, looking for more ways to upgrate the Automatic solver... Edit @10:09 AM: Spotted yet another bug, fixed it on the spot. Edit @ 10:27 AM: Added a new method of telling whether a number can go into a box. The "twin" method. Inexperienced players of sudoku will point this out as a bug, but it is not. Hopefully I can release it by 11AM! Edited June 6, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
jefhal Posted June 6, 2006 Share Posted June 6, 2006 3rd Revision!I really like this application. I personally don't like games and would much prefer to work out the solution with a program like yours than to burn brain cells doing it the hard way. Are you planning a solver for the Rubiks Cube next? If so, I'd pay $3 to $4 for it! How about an automated Taipei player? ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now