Autor
| Solving sudoku's in BASIC
|
DarQ msx professional Mensajes: 836 | Publicado: Diciembre 15 2005, 19:34   |
@ POISONIC
why didnt you test the program with that sudoku? i think that EVEN YOU can change data lines?
|
|
POISONIC msx professional Mensajes: 883 | Publicado: Diciembre 15 2005, 19:55   |
wow 777 posts congrats no this is my first sudoku ive ever seen....
no experience on sudoku
|
|
POISONIC msx professional Mensajes: 883 | Publicado: Diciembre 15 2005, 19:57   |
lucky numbers......  |
|
DarQ msx professional Mensajes: 836 | Publicado: Diciembre 15 2005, 20:03   |
Quote:
| lucky numbers...... 
|
my program was busy for about 8-10 minutes... then it finished without a problem  ... but really, solving sudoku's the hard way (bruteforce) is not really a thing for MSX computers. |
|
dvik msx master Mensajes: 1302 | Publicado: Diciembre 15 2005, 21:25   |
You screwed your lucky number DarQ. You should have quit when you were on top  777 posts is just a memory now... |
|
[D-Tail]
 msx guru Mensajes: 2980 | Publicado: Diciembre 15 2005, 22:37   |
Hey, you just passed #222 as well  |
|
DarQ msx professional Mensajes: 836 | Publicado: Diciembre 16 2005, 00:50   |
im sorry, but i suck... so sorry for fucking up our postcount..
|
|
dvik msx master Mensajes: 1302 | Publicado: Diciembre 16 2005, 00:55   |
yeah, you should pay more attention to magical numbers  |
|
DarQ msx professional Mensajes: 836 | Publicado: Diciembre 16 2005, 01:04   |
about magic numbers... a sudoku is actually not that different from a magic square... if my memory is still functional at this time and state, then thats also a np-complete problem.. (check wikipedia)...
it's not that different either from creating n*n squares with characters where each column and row contain a different n letter word. very interesting stuff actually
aah, im hungry |
|
[D-Tail]
 msx guru Mensajes: 2980 | Publicado: Diciembre 16 2005, 02:36   |
DarQ: NP-complete programs can only be 'solved' with brute force/trial and error (like you did with the Sudoku solver)... it's nothing MSX can't do, but it needs time... As you indicated before, you really wouldn't want to do that while damaging the holy Z80... So I suggest you use C# for that matter  ...
I'm hungry too! Heading for a sandwich right away...  |
|
DarQ msx professional Mensajes: 836 | Publicado: Diciembre 17 2005, 13:10   |
im hungry again!!
anyway, there must be a way to quickly solve them on an MSX too... waiting 5 minutes is already far too much if you play a `game`.
and then, 5 minutes is fast in MSX terms  |
|
DarQ msx professional Mensajes: 836 | Publicado: Diciembre 23 2005, 20:51   |
well, im busy doing some more MSX programming and im now working on a decent interface for the game. you won't get any graphics because i only use screen 0 (width 80)
i also got the latest NestorBASIC version 1.11 and it solves sudoku's faster than without a compiler with openmsx at 500% cpu speed.
so you might actually get your first complete sudoku suite for msx!
you will probably get a diskimage with a few sources, docs and a maximum of about 8500 different sudoku's. i still need to investigate whether or not it's a good idea (for the sake of performance) to add the solutions as well. in that case the number of sudoku's will be about 4000. still quite a lot huh!
maybe it's a good idea for me to do the solver in asm. its faster and i need to polish my rusty z80 skills!
keep your eye on this thread if you are interested!
|
|
[D-Tail]
 msx guru Mensajes: 2980 | Publicado: Diciembre 24 2005, 01:54   |
Really cool to hear you're back in Business (with capital 'B'), DarQ  |
|
DarQ msx professional Mensajes: 836 | Publicado: Diciembre 24 2005, 15:28   |
Quote:
| Really cool to hear you're back in Business (with capital 'B'), DarQ 
|
coding for MSX always was a nice thing to do. and it still is because it has so many limitations. for example, in modern languages it's so incredibly easy to make a stack to store the previous moves.. but i had to think twice at jelle's place when i had to implement some sort of stack
it keeps the mind occupied |
|
djh1697 msx professional Mensajes: 537 | Publicado: Diciembre 24 2005, 16:46   |
I haven't played Sudoku, am i correct in saying that you fell in the missing number so that there are no repeats in columns or rows of and number 1-9?
|
|
|
|
|