Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
A couple of years ago, I tried to make sudoku for the ti nspire. I wanted to create a random puzzle generator (on the computer that would export puzzles I would just have stored on the calculator), but the code was too buggy and I just got bored with it - I am not an avid sudoku player and just thought it would be fun to code this stuff in.

Well, I randomly remembered about the generator a couple days ago, and with my new and improved skills decided to give it another shot! It's not amazing, but I was able to quickly create it without any major bugs(well, sort of). The generator is in C++(source available here). It generates a text file, the name of which you specify, which generates a given number of puzzles given a range of how many filled in squares you can have. Anything greater than 30 squares generates almost instantly, but less than 25 can take minutes. The highest difficulty I generate, insane, goes from 22 to 27 squares, and generating a hundred puzzles takes around 40 minutes(although this can vary a lot). Quick edit note: I hope to improve this time somehow and then hopefully port this code to the actual TI Nspire. I could probably get trivial - medium difficulties working now without the calculator taking too long, and hard may take a couple seconds per level or maybe even more but hopefully not be too bad(total time to generate a hundred puzzles on my computer is like 10 seconds). Obviously though a slow TI Nspire cannot generate the Insane levels in any reasonable amount of time though.

Those couple of years ago, I had a rudimentary app for allowing you to play the sudoku puzzles, but I have remade it. I guess I will post the app a little later, once I have a readme. Here are some pictures though(I just put in random numbers - the program purposefully doesn't tell you if your numbers are right; rather, it only tells you once you've solved the entire puzzle). The first picture gives difficulty, second is the level number within the difficulty(they are sorted by most squares filled in for difficulty range to least), third is showcasing filling in squares and fourth is guessing):
Wow. That looks pretty cool. I will definitely try it out and give you some feedback.
  
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
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement