Sudoku 50G « Next Oldest | Next Newest »

 ▼ Gilles Carpentier Senior Member Posts: 468 Threads: 17 Joined: May 2011 05-12-2012, 07:35 AM 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 : 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 ? ▼ Raymond Del Tondo Posting Freak Posts: 1,841 Threads: 54 Joined: Jul 2005 05-12-2012, 09:18 AM 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. ▼ Oliver Unter Ecker Member Posts: 239 Threads: 9 Joined: Dec 2010 05-15-2012, 03:29 AM 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. David Hayden Senior Member Posts: 528 Threads: 40 Joined: Dec 2008 05-12-2012, 09:29 AM 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 ▼ Gilles Carpentier Senior Member Posts: 468 Threads: 17 Joined: May 2011 05-12-2012, 10:59 AM 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. ▼ David Hayden Senior Member Posts: 528 Threads: 40 Joined: Dec 2008 05-12-2012, 03:52 PM 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 ▼ Gilles Carpentier Senior Member Posts: 468 Threads: 17 Joined: May 2011 05-13-2012, 06:32 AM Very interesting ! The speed is really impressive

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

Forum Jump: