The Daily Click ::. Forums ::. Klik Coding Help ::. Sudoku Problem.... Need help with coding.
 

Post Reply  Post Oekaki 
 

Posted By Message

..:.Phox.:..



Registered
  18/02/2005
Points
  646

VIP MemberHero of TimeI like Aliens!Cardboard BoxAttention Getter
7th December, 2005 at 09:46:06 -

hey

In my school there's gonna be a tournament for little kids and people from school in general.
It's called Sudoku, and many of you may have already heard of it.
If not try googling it.

Anyway, I am honnored at my school because I do stuff with MMF, I've made games and stuff for the school.

Anyway, a teacher came up to me today and asked if I could do something in MMF for him.
I was tasked to make a Sudoku corrector.

I need it fast.

ok the sudoku objectives are:

From a square of 3 up to 9 little squares are the area you work on.
The game sometimes gives you some numbers to start.
The main objective is to make each vertical column and horizontal column to have only one of a kind number up to 9.


http://www.puzzle.jp/images/sudoku_12.gif <- this is an example of a completed sudoku table.

*note how there no repeated number in each horizontal or vertical column.

Now comes My question. Can I make the corrector?
now comes my next question. How can I do it?
now comes my last question. Would you help me, or tell me how to?


OK GUYS THANX A BUNCH! Please post back, or PM-me.

THANX


 
Profile edited as it messed the layout of the site up.

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
7th December, 2005 at 09:59:17 -

Isn't it just to run a fastloop through every row/column to check if there are more than one instance of a number and stuffs. Use the array object, it's ideal for this task.

I could try making some sort of tutorial later... maybe

 
n/a

Deleted User
7th December, 2005 at 11:10:14 -

and some other fast loops to check the 3*3 areas
israel is under the Sudoku attack, and LIJI likes sudoku

 

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
7th December, 2005 at 11:28:31 -

What has happened to you, Phizzy? You weren't always like this...

 
Old member (~2004-2007).

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
7th December, 2005 at 11:33:57 -

LIJI: You don't have to check them 3x3 areas do you? It's magic

Well, here's my example:
http://www.sitesled.com/members/aggesgams/Sudoku.cca

Opensourced. Not commented. Functional (I think). Roxxor

 
n/a

..:.Phox.:..



Registered
  18/02/2005
Points
  646

VIP MemberHero of TimeI like Aliens!Cardboard BoxAttention Getter
7th December, 2005 at 12:37:58 -

hmmmmmmmmmm...........THATS GOOD, BUT I NEED SOMETHING DIFERENT.
I'll explain again.

I need it to solve the sudoku puzle at once, not see if it's correct.

I'd like it for us to be able to put only some numbers in it, and let the computer do the rest. Could you try it that way?

not correct, or check, but do the hole puzzle from only some displayed numbers.

THANX

 
Profile edited as it messed the layout of the site up.

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
7th December, 2005 at 12:58:01 -

I don't really know how the game works, but you can let it shuffle step-by-step before beginning, and save all shuffle events in an array. Then, when solving the puzzle, it just reverses the steps.

 
Old member (~2004-2007).

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
7th December, 2005 at 16:52:39 -

Yeah. I remember reading up on sudoku once, trying to figure out why such a crappu puzzle is so fucking popular all of a sudden. I remember reading about the programs written to generate them for newspapers.
I think you will not be able to make one in MMF. Certainly nobody here's going to commit the time needed to figure it out (a lot of time).

I suggest:
1- Giving up because it's going to make your anus bleed with the hardness.
2- Looking for a sudoku generator on the net. IIRC they take a while to run anyway, and one in MMF would probably take hours to finish (at runtime I mean, not making it).
3- Looking for a sudoku algorithm on the net and converting it to klik.

 
n/a

X_Sheep

I had a custom rating before it was cool

Registered
  01/03/2004
Points
  1313

VIP MemberPicture Me This -Round 23- Winner!Dos Rules!
8th December, 2005 at 07:44:57 -

I like the other puzzles on http://www.puzzle.jp/index-e.html muchos betterness.

There's a load of solving techniques on this page:
http://www.palmsudoku.com/pages/techniques-overview.php

You could try to make a program that does all that.

Image Edited by the Author.

 
a/n

..:.Phox.:..



Registered
  18/02/2005
Points
  646

VIP MemberHero of TimeI like Aliens!Cardboard BoxAttention Getter
9th December, 2005 at 12:41:35 -

ok folks, I'm just posting here to say I got a way to do it and it works perfectly.

RADIX....YOU WERE WRONG!!!!!!!! lol

I did it though, and pretty simple it is.


well, have a very MERRY CHRISTMAS!!!!!!

thanx for the help

 
Profile edited as it messed the layout of the site up.

erathean



Registered
  12/11/2004
Points
  56
11th December, 2005 at 07:12:47 -

And possibly somebody beat you to creating one in Jamagic

http://www.gwerdy.com/products/sudoku_solver/index.php

But there is a nice section on the algorithm it uses.

Thanks,

Lewis


 
n/a

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
12th December, 2005 at 06:26:54 -

It should be a fairly simple Sherlock-type puzzle, in that a computer could solve it by process of elimination. Having said that, if I tried to code it I'd probably hit a brick wall, so well done.

 
http://www.davidn.co.nr - Games, music, living in America
   

Post Reply



 



Advertisement

Worth A Click