HHC 2015 RPN programming Contest is now open
|
09-26-2015, 12:59 PM
Post: #1
|
|||
|
|||
HHC 2015 RPN programming Contest is now open
1) No posting of any solutions to this forum until after 4pm central time SUNDAY 9/27.
2) Size of routine is all that matters. 3) No synthetic functions, etc. ONLY vanilla CAT 3 HP 41c functions allowed. Problem and rules found here: HP 2015 Programming Contest Questions? Ask me, but don't ask questions that might give things away. Enjoy. Goal is to have fun. |
|||
09-26-2015, 06:15 PM
Post: #2
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open | |||
09-26-2015, 06:53 PM
Post: #3
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
(09-26-2015 06:15 PM)Csaba Tizedes Wrote:(09-26-2015 12:59 PM)Gene Wrote: Questions? While 1-2-3-4-5 and 2-3-4-5-6 are a Large Straight, they are also considered a Small Straight. There are occasions in Yahtzee where you might want to score a Large Straight as a Small Straight. See the following rules: Yahtzee Rules Bill Smithville, NJ |
|||
09-26-2015, 06:57 PM
Post: #4
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
Bill is correct.
12345 contains two small straights - 1234 and 2345. All you need is one, so 12345 and 23456 are valid for a "small straight." 15C programs are fine, but be careful not to use a 15c instruction that is not a vanilla HP 41C instruction. No SOLVE lines in the program please. :-) |
|||
09-26-2015, 07:02 PM
Post: #5
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open | |||
09-26-2015, 11:23 PM
Post: #6
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
How about a special mention for the highest byte count program that works ??
(the rest of the country seems to place a very high value on bloatware) 2speed HP41CX,int2XMEM+ZEN, HPIL+DEVEL, HPIL+X/IO, I/R, 82143, 82163, 82162 -25,35,45,55,65,67,70,80 |
|||
09-27-2015, 12:25 AM
Post: #7
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
Oops. This line on the programming contest file:
"(C) 12356, 11111, 41623, 22344, etc., and then R/S should return something (anything) other than 0." Is incorrect. My fault. 41623 actually CONTAINS a small straight. If those values are fed into the routine, it should return a 0 because that is a small straight. The instructions/test case for that input is not correct. Sorry about that. Thanks Jackie! |
|||
09-27-2015, 11:50 AM
Post: #8
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
HP-41C 2121B58157. Main program has 44 steps including LBL and END, including one CALL to the SORT routine, but surely can be made a bit shorter. Also, some unelegant parts have to be rewritten, but I don't think I'll do that on time. About 70 bytes (not taking into account three extra registers) on the HP-42S (used only for byte-counting purpose), which compares to what was already available since the beginning. Running time about 7.5 seconds, including sorting time. I've forgotten to remove the Advantage Module, but I don't think I have used any forbidden routine or instruction.
Thanks for another interesting programming contest. I hope you all are having fun at HHC 2015! Gerson. |
|||
09-27-2015, 12:55 PM
(This post was last modified: 09-27-2015 01:21 PM by Allen.)
Post: #9
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
(09-27-2015 11:50 AM)Gerson W. Barbosa Wrote: Thanks for another interesting programming contest. I hope you all are having fun at HHC 2015! I agree! Thank you, Gene for a fun programming contest. I will not be home at 4pm central, but will post my solution later tonight. Code:
I wrote my original solution on the 42S but it used some functions that were not vanilla 41c instructions. Code:
I can include the 42s version tonight if anyone is interested. 17bii | 32s | 32sii | 41c | 41cv | 41cx | 42s | 48g | 48g+ | 48gx | 50g | 30b |
|||
09-27-2015, 01:48 PM
Post: #10
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
(09-26-2015 06:57 PM)Gene Wrote: Bill is correct. HP15C: 53 steps with one GSB for SORT, including LBL/RTN of main program R1~R5 + R0, R6 and I approx. 14-15secs if we have Small straight pdf doc will be posted at 10PM CET Thanks for this fun! Csaba |
|||
09-27-2015, 06:53 PM
(This post was last modified: 09-27-2015 06:55 PM by Gerson W. Barbosa.)
Post: #11
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
In case it is useful for testing, here is a simple input routine:
Code:
Congratulations to Allen, Csaba and everyone who have been working on this, especially to the people at HHC-2015. I guess it is a bit more difficult there, given the many activities they're participating in. I'm looking foward to your solutions! Gerson. |
|||
09-27-2015, 07:19 PM
Post: #12
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open | |||
09-27-2015, 09:02 PM
(This post was last modified: 09-27-2015 09:26 PM by Egan Ford.)
Post: #13
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
(09-27-2015 12:55 PM)Allen Wrote: I think my solution is the same as yours, however a bit longer and one less register. Code:
First pass, need to optimize for size. |
|||
09-27-2015, 09:03 PM
Post: #14
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
I hope the link is workable (uploaded into my Drive): 15C-008_HHC2015_Small straights _v1.0_.pdf
Csaba |
|||
09-27-2015, 09:11 PM
(This post was last modified: 09-27-2015 09:14 PM by Gerson W. Barbosa.)
Post: #15
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
Recall arithmetic wasn't missed this time, but the lack of some comparison tests on the HP-41 is always a problem, at least for me. Not so much improvement when compared to the first version this morning:
Code:
Gerson. Edited to fix a typo |
|||
09-27-2015, 09:40 PM
(This post was last modified: 09-27-2015 10:37 PM by Egan Ford.)
Post: #16
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
Improved version:
Code:
|
|||
09-27-2015, 09:47 PM
Post: #17
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
The winning Nashville solution was 47 bytes. Ouch. Much smaller than my previous effort.
I will post the code soon. Gunter Schink is the winner of the local contest. |
|||
09-27-2015, 10:00 PM
Post: #18
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open | |||
09-27-2015, 10:09 PM
Post: #19
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
(09-27-2015 10:00 PM)Egan Ford Wrote:(09-27-2015 09:47 PM)Gene Wrote: The winning Nashville solution was 47 bytes. Ouch. Much smaller than my previous effort. There are tables, but an easier way is checking on the HP-42S or Free42, assuming the byte-counts are the same (not so sure, though). |
|||
09-27-2015, 10:17 PM
Post: #20
|
|||
|
|||
RE: HHC 2015 RPN programming Contest is now open
(09-27-2015 10:00 PM)Egan Ford Wrote: I should probably know this, but I do not recall. How do you measure bytes? Thanks. There might be other tools, but the easiest way is using an HP41CX: Here CATÂ 1 shows the byte count of each program along with its END. Or simply plug in an X-Functions Module and save the program to Extended Memory (SAVEP). Then RCLPT returns the number of bytes. ;-) Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)