Sudoku

Got a brilliant program idea? Let us know!

Moderator: MaxCoderz Staff

Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Sudoku

Post by Liazon »

Anybody like sudokus? I was doing a few today and I thought, "This is really addictive."

For those of you who don't know sudoku, they are Japanese number puzzles. You have to arrange the digits 1-9 in a 9x9 table/matrix so that each row has each digit only once, each column has each digit only once, and each of the 9 3x3 tables that the 9x9 can be divided into only has each digit once.

google it on the net cuz right now they're suppose to be super popular in Europe.

I was thinking why not make a program that generates a random sudoku puzzle and you can try to solve it on the calc?

If anybody likes this idea, I'd like to reserve it for myself when I get better at ASM.
Image Image Image
coelurus
Calc Wizard
Posts: 585
Joined: Sun 19 Dec, 2004 9:02 pm
Location: Sweden
Contact:

Post by coelurus »

Those were everwhere here in Sweden a little while ago. I've tried a few times but I don't like number crunching so I still haven't solved a single one :) A friend of mine made a Java applet that generates and solves those puzzles using brute force afaik:

http://www.dd.chalmers.se/~haner/sudoku.html
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

my opinion is that sudokus r more like complex logic. still, once u start one u just don't want to put it down. maybe that's a bad thing.
Image Image Image
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

Indeed, I was planning to pick up sudoko right after I finish Slippy. I already have the methods and stuff for making sudoko's random. So unlimited ammount of sudoko's. Stay tuned.

Sorry that I already had the same idea...
Image
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

ok, you can make the game. i still need to learn ASM
Image Image Image
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

I'm almost positive there is one in basic on ticalc.org
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post by DarkerLine »

ticalc.org basic programs have never impressed me with their quality. Without downloading it, my guess is that either not all puzzles are solvable (have only one solution) or are too easy.
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

I love sudokus. They run them in my newspaper and a few weeks ago I cut one out and ran off a few copies for my friends. Collectively by showing them to our friends we got half of my school hooked, you can't look around without seeing a sudoku puzzle. Its pretty cool because theres 2200+ students at my school. We could use a Sudoku game.
Image
katmaster
Sir Posts-A-Lot
Posts: 252
Joined: Tue 09 Aug, 2005 9:34 pm
Location: south of the north pole
Contact:

Post by katmaster »

wow, i was going to post an idea on this like 2 weeks ago and forgot. I say GO FOR IT!!!!! (I loves them too :))
cheese=yum
Image
Kozak
Maxcoderz Staff
Posts: 791
Joined: Fri 17 Dec, 2004 5:33 pm
Location: On the dark side of the moon.
Contact:

Post by Kozak »

Sudoku! Never thought about making that. They appear all the time here in newspapers....it's a real hit 8) . For an unpracticed mind like mine it's quite hard to solve one:).
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

Is it possible for me to use a seed Sudoku?

like

Code: Select all

SudokuSeed:
 .db 1,2,3,4,5,6,7,8,9
 .db
 .db
 .db
 .db
 .db
 .db
 .db
 .db
Then I randomly switch rows and columns or rotate the entire sudoku.
Then I randomly select numbers that are displayed in the puzzle.

Will this work?
Image Image Image
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post by DarkerLine »

Switching rows or columns does not preserve the 3x3 square property, so, no it won't work.
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

only if you switch within the between rows 1-3, 4-6, and 7-9. Same with the columns. Switching 1 and 9, yeah, that'd cause problems.

Rotating the entire board seems like an interesting property. It completely preserves a valid solution. And, it seems to me, that you can't really tell the difference.
Image Image Image
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post by DarkerLine »

Some other transformations:

switching all occurrences of X to Y and vice versa.

subtract every number from 10 and put the result in its spot.

flip across a row, column, or diagonal.

You have to start with a valid sudoku though.
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

I don't know if this works, but if it does then just backtrack how he has it programed and then you should have the routine to figure out the solution.
Post Reply