Sign in to follow this  
Followers 0
rakudave

SuDoku

29 posts in this topic

#1 ·  Posted (edited)

well, finally there's a AutoIt SuDoku programm. it took me ages to complete it and... HERE IT IS!!!

it is also my school-project, which i have to hand in. if a get a bad mark, i wont be able to do the exams.

so thisone needs to WORK. if it doesn't please tell me.

Download & source

tell me what u think... thanks...

edit: new version online

Edited by rakudave

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

sry...but somethink is wrong :o

Posted Image

There can't be 2 equal numbers in the same square

Edit: Hm...i restarted it to check if this was only once...but now i got 3 equal numbers in the same squre :geek:

Edited by XxXFaNtA

Share this post


Link to post
Share on other sites

Sorry from me to dude this how it looks when i run your compiled


My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

Share this post


Link to post
Share on other sites

@rambo3889: i tested it on the pc of a friend and encountered the same prob.

just recompile it and you should be fine...

(i'll supply the _print.au3 if i'm at home again...)

@XxXFaNtA: Sh**, looks like a serious prob... what did you do exactly?

(to better understand what happened...)

thx2both of u...

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Cool program!

i get rambo3889's problem when i run the supplied exe, when i compile from source it looks like XxXFaNtA; only after i remove the _print stuff though.

It also likes to solve the board, by its self, when you do a New. Don't know if thats whats supposed to happen.

Help doesn't work (F1)

Ctrl t gives me the same error

Ctrl e should be a toggle (show/hide)

Does Notes do anything?

I've never played this game before, but there's my input.

Edited by mikeytown2

Share this post


Link to post
Share on other sites

Okay


My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

does any of you guys know why the compiled version doesn't look tha same on every pc??? i dont get it.

but here's the _print.au3 u need to recompile it.

the F1 help thing is not finished yet, that'll come l8er...

about the "new" function: to make e new sudoku, you need a complete grid. i used the solver-engine also to create the grid (recycled it, so so speak...). that's why it "solves" the newones first.

in the final version, this will be hidden, but i left it visible that one can see how it works.

ctlr t should work, if not, try ctrl g... (?)

in the "notes" boxes you can put in the opossible (remaining) numbers. so for example, you thing there might be a 3 or a 6 in the box above, you put "36".

the "show eventualities" function does the same, so you don't have to do it (for lazy people...)

thanks miketown2 for your comment!

ah, and @XxXFaNtA: did you perhaps generate a new sudoku without having cleared the grid first? (ctrl del)

regards

rakudave

Edited by rakudave

Share this post


Link to post
Share on other sites

Okay ill try when i get home


My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

@rakudave: I think i just started a new game :o let me see...

Edit: Now my SoDoKu looks like the one of Rambo3889 :geek:

Edited by XxXFaNtA

Share this post


Link to post
Share on other sites

The problem is, solving a SuDoku puzzle programatically is not easy. A link which discusses this: http://somethinkodd.com/oddthinking/?p=21

Just to clarify: In that link I claim that it is not easy to do without back-tracking. If you permit back-tracking, it is trivial. (One of these days, I will write a follow-up to this post clarifying a few of the other points.)

Julian

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

I wanted to make this too a few days ago just to show my classmates the sodoku puzzles are so damn simple even something as dumb as a computer can solve them.

but i didn't do it eventually.. i didn't feel like making the GUI, that's kind of an odd reason so i think i'm still going to do it. I will use the backtracking-approach to this.

I just figured.. it's going to be like, a full checker, which checks if every number filled in is still right. and something that's going to fill in numbers. and something that puts em together and can take steps forward and backwards as much as needed. Yea, that'll work. :o

Edited by Manadar

Share this post


Link to post
Share on other sites

thanks for the links!

the solverengine works perfectly, it's just the gui that brings me to my knees...

i worked for ages and suddenly it doesn't work at all... i don't get it...

is it perhaps 'cause there are more than 900 lines of code?

Don't think so....

Running it with autoit3, it seems to work fine.

Compiling it gives this strange layout.

Done some tests but haven't been able to determine what the reason is.

Just commenting lines 26 & 27 (SplashImageOn ("splash",@scriptdir & "\splash.dat",500,300,-1,-1,1)) seems to fix the layout problem .... :o


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Hi rakudave,

i have no problem with the GUI, but the same problems like XxxFanta when starting a new game:

Share this post


Link to post
Share on other sites

I found a little error in line 262

If stringreplace($grid[$x][$z],$gridbackup,"") > "" then$grid[$x][$z] = stringreplace($grid[$x][$z],$gridbackup,"")

Hope this helps, i'm currently doing the same project and was looking at yours as an example

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0