Sudoku on ZX Spectrum 48K
ZX Spectrum 48К Sudoku game
25 years Spectrum and
300 years Leonhard Euler anniversary.
6000 (and more) puzzles, 8 levels.
http://www.tangram.rs/sudoku/
25 years Spectrum and
300 years Leonhard Euler anniversary.
6000 (and more) puzzles, 8 levels.
http://www.tangram.rs/sudoku/
Post edited by srba on
Comments
Digits 1-9 enters value in box
0 or DELETE (CAPS SHIFT + 0) erase value
Capital letters on MENU execute commands
H - Hint
F - auto Fill
U - Undo last enter
R - Redo last Undo
M - Mark value
B - take Back to last marked value (manual recursion :-)
G - new Game
D - Done (resign) current game
L - Load new 1000 puzzles (not implemented yet fully)
J - ditto
E - Exit to OS
On top
P=XXX (puzzle number from 0 to 999)
L=X (level from 0 to 7)
TXX:XX;XX or
TXX:XX:XX time
Blue is HINT for BLUE (and RED) digits, actually HINT for partially solved puzzle
I was proud that Speccys didn't have anykind of sudoku program!!! What's next? The Sims for Spectrum?
An' you know what they said?
Well, some of it was true!
This one ain't the first Spectrum sudoku:
http://www.bytemaniacos.com/html/basic2005.html
http://reptonix.awardspace.co.uk/sinclair/csscgc2008/games2.htm
It's great to watch this in action, particularly the compiled version runing in an ultra-fast emulator like JPP!
Е какве сте ви тупаџије. Има разних програма, али овакав нема. Уме да реши сваку судоку слагалицу и има 1000 слагалица у 27000 бајтова. Као није то ништа, видели смо и боље. За то срби кажу: "У туђега татка поголема патка."
Just click on the screen at the top of the page, and a menu will appear on rge next page, saying:
1x 2x TZX Forums
Just select "TZX" and the game will download.
Just try to solve puzzle no 875 from ZX Sudoku program...
Um - a brute force solver will find the (first) valid solution for all legal puzzles. It just takes a while. It won't fail, unless the puzzle given to it does not conform to the rules. (The version on the CSSCGC site will crash eventually if given a puzzle that cannot be solved. I have an updated version here that knows when it it cannot solve and reports that the puzzle is not legal...eventually!)
By the way, it solved puzzle 875 in 34 minutes and 23 seconds. :D
On real Spectrum 34y and 23 days
You must improve program with SingleSolution and SingleCell search.
Actually, that WAS on a real Spectrum. Try it for yourself!
(That is using the compiled version - I suspect the BASIC version will take an ugly amount of time!)
EDIT: Forgot to mention this:
Love your program by the way - both the game and the scrolling message! ;)
One permutation of puzzle 825 is
http://www.menneske.no/sudoku/eng/showpuzzle.html?number=5997067
My testing permutation is:
520008490 526318497
307005108 347965128
000000306 189427356
410000200 418753269
000040000 965142783
002000014 732689514
603000070 653294871
801500002 871536942
094800035 294871635
Sudoku is simple "GAME" and may be solved with few (max 3 or 4) recursions. Of course, after SiSo and SC scans.
You've obviously never heard of Little Computer People.
If there is another puzzle you'd like to test, let me know!
The solutions took 02:30:33 in BASIC (that's hours, minutes and seconds) and 00:06:11 in the compiled BASIC.
The program works. Inelegant as it is, seems to me it is (sadly) fit for purpose. To think I submitted it as a CSSCGC entry...it works too well for that!
Moving on - you mention some other algorithms - I'm not a mathematician, but that sounds interesting. Would you care to share ideas?
I'm currently play-testing a new version of Sudoku that Kev. Thacker is writing, which includes a solver which managed that grid in 6 seconds flat. :-o
https://twitter.com/bobsstuffgames
https://www.facebook.com/bobs.stuff
http://www.bobs-stuff.co.uk
There is HOW 2 PACK puzzle in 27bytes.
OK. You WIN. Give me or POST at http://netbet.rs/ this
"new version of Sudoku that Kev. Thacker is writing".
Thanks in advance...
OK, that's quick! Presumably doing something clever unlike my brute force bodge? :smile:
http://www.cs.utexas.edu/users/otto/spectrum/spectrum.html
My website is here:
www.kjthacker.f2s.com/games/index.html
The game is a dual development for Amstrad CPC and Spectrum.
At first the Amstrad CPC version was the lead platform, then it became the Spectrum version and again the Amstrad is now the lead platform. I am hoping to finish it soon, I am fixing last minute bugs and I need to add one feature. When the Amstrad version is done, I will fix the Spectrum version and a demo will then be uploaded to my site.
The full version will be available through Cronosoft.
The demo version for the Amstrad version can be downloaded from that website if you want to try that first to get an idea of what the Spectrum version will be like.
The full version includes:
- enter your own grids and play those
- enter a grid for it to solve
- more levels.
Info:
- Yes it took 6 seconds to solve that grid and that was brute force. Solver is pure z80 code.
- Each level takes 2 bytes. I am not joking.
- play 4x4, 6x6, 8x8, 10x10 and 12x12 grids.
- great music (4 tunes)
- two modes of entering numbers.
- nice graphics
Please be patient for the final release.
Aha...z80 vs. compiled basic! Nice! I am genuinely curious how similar your brute force algorithm is to the one I used. Just curious - I kinda ran with a "check for illegal lines" then columns, then current 1/9 square approach (actually, the first version wasn't even that smart - it did all 1/9 squares). From there it was just iterative.
I'll look forward to seeing it, and also trying the new stuff on srba's game too. :)