This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Project Ideas/Start New Projects => Your Projects
Author Message
todlangweilig


Advanced Member


Joined: 14 Feb 2006
Posts: 470

Posted: 25 Dec 2006 12:11:50 pm    Post subject:

Yes, Ideas come in tangible form Razz

Harrierfalcon wrote:
However, I am torn between keeping and dropping the user-entered sudoku.  I think it would be a great feature, but I don't know any way to solve to sudoku, with only 1 solution.  I can use prgmCHECK to check its validity, but is that enough?
[post="93485"]<{POST_SNAPBACK}>[/post]

How about a brute force method, then check that with prgmCHECK to verify.

Google: Brute force sudoku solver

http://www.codeproject.com/csharp/DokuSolver.asp
http://people.arsc.edu/~kcarlson/SudokuSolver.html

This one seems to be nicely explained, but I don't know perl.
http://www.ecclestoad.co.uk/blog/2005/06/0..._explained.html
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 25 Dec 2006 02:15:35 pm    Post subject:

I was also thinking I could get the sudoku into the game, then when they solve it, simply verify it. That might be OK, and it would certainly allow for multiple solutions, especially if they entered a number of numbers that wouldn't force one solution.

I was thinking of making a small solver that would work on Level 1 sudokus--that is, sudokus that you can solve without assuming anything.


Last edited by Guest on 26 Dec 2006 10:38:04 am; edited 1 time in total
Back to top
todlangweilig


Advanced Member


Joined: 14 Feb 2006
Posts: 470

Posted: 26 Dec 2006 10:50:16 am    Post subject:

Lets go with both ideas.

If they want to have the program verify that at least 1 solution exists, they'll press a button to do that. They can now go and solve the puzzle, and if they complete it, we'll verify it with prgmCHECK. If they want to give up, they can press another button and have the solution displayed.

If they want to just enter a puzzle and solve it, then that would be fine too. When they get done solving the puzzle, the program will run prgmCHECK to verify the solution.

I'm sure we can solve a level 1, the only question is, how quickly?
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 26 Dec 2006 12:15:43 pm    Post subject:

How would we verify that at least one solution exists? I mean, prgmCHECK checks for all the numbers, not just a few. Would we have to make sure no same numbers exist in the same row/column/box? That makes sense, and I think I could make a prog to do exactly that.

As a little gift to you, I attached the version I have so far. It works fully, and I haven't found any bugs. At this point I'm just adding features and touching stuff up.
Controls (in-game)
--1-9: Enters that number into the box
--Enter: Switches to possibility mode, which enters and numbers you hit into that box as a possibility.
--F5-Opens in-game menu.
Run prgm[THETA] to play.
At this point, you can save only 1 sudoku at a time--I don't think you need any more than that. All the files in the zip are required as subroutines, with exception of the theta-sudoku one. that simply sets up [H] and [I], which are used to save the sudoku. I might be able to compress saved sudokus into one matrix, if I'm lucky and my idea works.

I'll be adding some more sudokus into the generator when I finish most of the other features.


Last edited by Guest on 26 Dec 2006 07:24:44 pm; edited 1 time in total
Back to top
todlangweilig


Advanced Member


Joined: 14 Feb 2006
Posts: 470

Posted: 26 Dec 2006 06:50:45 pm    Post subject:

Harrierfalcon wrote:
Would we have to make sure no same numbers exist in the same row/column/box?  That makes sense, and I think I could make a prog to do exactly that.

I thought thats what prgmCHECK does. :confused: Cool
Quote:
As a little gift to you, I attached the version I have so far.  It works fully, and I haven't found any bugs.  At this point I'm just adding features and touching stuff up.

I test it out for you. Ill be gone for a few days, like 6, so I'll see what I can do.

Quote:
I might be able to compress saved sudokus into one matrix, if I'm lucky and my idea works.

I have an idea for that, if your idea doesn't work.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 26 Dec 2006 06:58:47 pm    Post subject:

No, I was thinking I could compress both matrices into one, then when it loads, break them in half into their respective matrices.

As to your first inquiry, prgmCHECK validates that [A] has exactly one of all the numbers it requires--thus, it does not allow 0's.

Tell me what you think of the pseudo-beta.


Last edited by Guest on 26 Dec 2006 06:59:08 pm; edited 1 time in total
Back to top
Recursive Acronym


Advanced Member


Joined: 11 Dec 2006
Posts: 499

Posted: 26 Dec 2006 07:21:29 pm    Post subject:

If you want to do a really good job on this program, you will need a pure random generator. I don't know... what you could do is find the source for a random sudoku generator (googleing sudoku generator source was successful for me). The first result had the downloadable executable as well as the source in C. You would have to learn C if you don't know it, scan through it and find the part that actually generates the sudoku, and then translate it to TI-BASIC. Or Assembly!
It would take a lot of effort, though.


Last edited by Guest on 31 Dec 2006 02:23:33 am; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 26 Dec 2006 07:24:17 pm    Post subject:

Ah, the other thing to consider is speed. Do you really want to wait 10 minutes for a sudoku that takes you 2 minutes to solve?

My 'random' generated sudokus are simply solved sudokus mixed up. This is much faster and easier, and also produces different sudokus each time. Dl it and see for yourself.

EDIT: There is a small bug in the possibilities feature that....just doesn't work. I have fixed it and now the updated version is attached.

EDIT EDIT: Sorry, I am unable to upload the most recent version due to the following error:
THE FOLLOWING ERROR(S) WERE FOUND
The requested file upload failed because suitable permissions have not been enabled on the 'uploads' directory. Please contact the board administrator and inform them of this error.

I apologize for any inconveniences.


Last edited by Guest on 27 Dec 2006 07:03:09 pm; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 28 Dec 2006 11:23:40 am    Post subject:

I WOULD attach the most recent version, but it won't let me, so as soon as I can upload the file to the 'net, I'll get you guys a link for it.

K, I got it. It works for me Very Happy. This version compresses both matrices into one on saving, and separates them when playing. See the readme.

Click me for Sudoku 1.0 Beta!

EDIT: Or if you're too lazy, AlienCC got the problem fixed (Thanks!) but since I just submitted it to the archives, you can get it there.


Last edited by Guest on 28 Dec 2006 05:01:44 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2
» View previous topic :: View next topic  
Page 2 of 2 » All times are UTC - 5 Hours

 

Advertisement