Sudoku 50G
#1

The topic "Sudoku solver" of Marcel Samek for the 33S & 15C ( bravo !), gave me the idea to see what is possible with a 50G

I found this program which seems perfect :

Sudoku solver HP50G

But it does not work with my calc. SLV result in nothing on the stack in place of the solution.

Is this a problem of ROM version or other ?

#2

And of course there exists a Sudoku solver for the HP-48: SDK48 :-)

Very fast, solves nearly every solvable 9x9 sudoku within a few seconds, only 3.5KiB in size, will run on SX, too.

#3

Hi Gilles.

I'm the author of the program. I just downloaded it again to make sure I can still run it. I'm using ROM 2.15.

Does it run if you use one of the provided puzzles? For excample, if you press EASY and then SLV?

How exactly are you running it?

Dave

#4

Hi David

I tried with emu48, 2.09 ROM version

- I clic for example EASY

- The matrice is on the stack

- I clic SLV


-> I get no result at all (the initial matrice is dropped but no result appears)

I will try on my real calc 2.15

EDIT :it works fine with my real HP50G ROM 2.15 :D Less than 0.1 sec

Re-EDIT : LOL I just realise I'm stupid, it s an ARM prog so can't work with EMU48 !


Edited: 12 May 2012, 11:17 a.m.

#5

Yes, the program is written in C and C++ and runs directly on the ARM CPU. I'm biased of course, but I think it demonstrates several things:

  • The raw speed of the ARM processor and the potential for very fast programs on the 50g.
  • The HPGCC compiler.
  • C++ with HPGCC.
  • The HPObjects library that lets C programs read and write calculator objects.
  • The sudoku solving algorithms are written to be fast, but also clear. The program demonstrates bit manipulations, a fast algorithm for counting the bits in a word, recursion and several other programming concepts. Source code is included.
Dave

#6

Very interesting !

The speed is really impressive

#7

Quote:
only 3.5KiB in size

For your entertainment, here's a 77-byte Sudoku solver in GolfScript:

{9/[n]*puts}:p;~]{:@0?:^~!{@p}*10,@9/^9/=-@^9%>9%-@3/^9%3/>3%3/^27/={+}*-{@^<\+@1^+>+}/1}do

http://www.golfscript.com/golfscript/examples.html

(note the comment claiming "lots of room for improvement")


Edited: 15 May 2012, 3:32 a.m.



Possibly Related Threads…
Thread Author Replies Views Last Post
  Sudoku Solver for HP-33s Marcel Samek 3 1,428 05-11-2012, 03:01 PM
Last Post: Lode
  HP-30b key assignment trick -- Sudoku helper revisited Katie Wasserman 2 1,230 09-27-2010, 11:25 AM
Last Post: Katie Wasserman
  Sudoku kc 10 2,831 09-13-2010, 10:22 PM
Last Post: David Hayden
  Two additional articles online: Minimax & Sudoku Valentin Albillo 4 1,300 07-27-2006, 04:03 AM
Last Post: Valentin Albillo
  For the Sudoku crowd Eric Smith 22 4,889 07-11-2006, 04:11 AM
Last Post: Valentin Albillo
  SUDOKU GAME Fabio Albonico 5 1,935 06-15-2006, 04:03 PM
Last Post: Ed Look

Forum Jump: