Qbasicnews.com
May 19, 2019, 03:23:04 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 2 [3]
  Print  
Author Topic: Make a solver for Su Doku in freebasic.  (Read 19991 times)
yetifoot
Ancient Guru
****
Posts: 575



« Reply #30 on: January 30, 2006, 08:51:44 PM »

the problem with that puzzle is that the cell two below the 5 has no answer, because all the numbers are visible to it either by col, or row.  A fairly trivial problem, but it caused my program to fail, because i wasn't checking if cells have no solution, only looking at what solutions a cell does have, if you get my meaning.

I'm pretty sure i've got my solving engine done now, i'm just struggling to get gfxlib to work correctly on lin/dos so i can do a nice graphical version.
Logged

EVEN MEN OF STEEL RUST.
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #31 on: January 31, 2006, 12:38:30 AM »

Yeah ok, but I still don't see it.
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
yetifoot
Ancient Guru
****
Posts: 575



« Reply #32 on: January 31, 2006, 04:18:48 AM »

if you count the top left as (0, 0), then the cell at (1, 6) cannot contain any number.  This is because 1, 2, 3, 4 and 5 are visible in column 1,  and 6, 7, 8, and 9 are visible in row 6.  Therefore there are no numbers left that are valid in that square.
Logged

EVEN MEN OF STEEL RUST.
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #33 on: January 31, 2006, 12:53:53 PM »

I see it.  Cool
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
yetifoot
Ancient Guru
****
Posts: 575



« Reply #34 on: February 01, 2006, 12:42:12 AM »

I just updated to what i believe will be my final code (unless someone finds a fault)

I also have a beta of my graphical interface version, it works fine, but the interface just could be better.

http://www.streetcds.co.uk/sudoku_v0.4.zip

EDIT : board in was sometimes being returned changed, added backup

also found this sudoku

100200300
000000000
002004090
300100200
000000000
094002000
200300100
000000000
000090004

takes 19 seconds (very slow) to prove unsolvable
Logged

EVEN MEN OF STEEL RUST.
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #35 on: February 02, 2006, 05:10:47 PM »

That is cool.
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #36 on: February 05, 2006, 12:42:47 AM »

PS: I added your name (yetifoot) in the first post... :-)
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
yetifoot
Ancient Guru
****
Posts: 575



« Reply #37 on: February 05, 2006, 04:12:08 AM »

thanks.
Logged

EVEN MEN OF STEEL RUST.
anarky
Been there, done that
*****
Posts: 1231


The Blobworld Comics King


« Reply #38 on: February 13, 2006, 03:46:14 AM »

I am going to make a GUI for it too. I found this to be very useful, especially for Beckii, who enters competitions, and Sudoku happens to be one of these puzzles.

>anarky
Logged

Screwing with your reality since 1998.
Pages: 1 2 [3]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!