HHC 2019 will be in Reno, Nevada, Sept 21-22
|
09-22-2019, 11:10 AM
Post: #21
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
Disappointed and feeling denied the opportunity to participate.
Brian Walsh (6951) [41] <1> |
|||
09-22-2019, 05:02 PM
Post: #22
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
From David Ramsey:
Quote:HHC 2019 Programming Contest |
|||
09-22-2019, 05:46 PM
Post: #23
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
Thanks, Eric. When is the submittal deadline?
Brian Walsh (6951) [41] <1> |
|||
09-22-2019, 06:50 PM
Post: #24
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
I forget, is SysRPL allowed on these contests?
|
|||
09-22-2019, 09:02 PM
(This post was last modified: 09-22-2019 09:03 PM by Gerson W. Barbosa.)
Post: #25
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
(09-22-2019 05:02 PM)Eric Rechlin Wrote: From David Ramsey: A list with the four numbers on the stack doesn’t look out of the rules to me. Anyway, 2.5 bytes more wouldn’t make any difference on my already lengthy RPL code (237 bytes). Also, almost half a minute (29.7 seconds) seems a lot of time on the 50g. I have to leave now, so I won’t be able to try a better algorithm. I am looking forward for the nice solutions you all are working on. |
|||
09-22-2019, 10:05 PM
Post: #26
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
Hi, Eric: (09-22-2019 05:02 PM)Eric Rechlin Wrote: From David Ramsey: This article o'mine includes a solution (Task 1) for both the HP-41C (RPN, 39 steps) and the SHARP PC-1211 (BASIC, 2 lines: Know Thy Foe: A New Contender Also, I give a general solution for 1 to 11 digits for the HP-71B (BASIC, 12 lines) in my Short & Sweet Math Challenges #23: "May the 4th Be With You !" Special., just do a REV$ of every solution found. I also discuss there the details on how to efficiently find the solutions for that many digits in reasonable times. Regards. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
09-22-2019, 10:48 PM
Post: #27
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
Code for HP-42S or HP-41C:
Code: 00 { 72-Byte Prgm } Nothing very clever or elegant, I'm afraid, but it gets the job done, taking 10 minutes and 30 seconds to return 153, 370, 371, and 407, on my HP-42S. |
|||
09-22-2019, 11:39 PM
(This post was last modified: 09-23-2019 12:05 AM by Gerson W. Barbosa.)
Post: #28
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
(09-22-2019 09:02 PM)Gerson W. Barbosa Wrote: Also, almost half a minute (29.7 seconds) seems a lot of time on the 50g. Sticking to my first – and usually worst – idea, now only slightly faster (25.6 seconds) and longer (254.5 bytes). {153. 370. 371. 407.} Code:
|
|||
09-23-2019, 03:08 AM
Post: #29
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
Here are my smallest and my fastest 50g entries:
smallest: 95 bytes 128 sec Code:
and fastest 154 bytes 21.4 sec Code:
|
|||
09-23-2019, 01:54 PM
Post: #30
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
My take, nothing clever here, just plain brute force. I had solved this previously, I found this code already in my calc I guess from some old challenge?.
Anyway, the trivial code was also in my calc already and Wes already posted it, so I won't repeat it. I do want to post this other version which splits the digits from a single loop. Is quite straightforward, uses the newRPL-only DIGITS command to extract digits off a number ( <number> <start_digit> <end_digit> DIGITS): Code:
This version runs in 0.097 seconds, while Wes fastest runs in 0.068 seconds. That's when run from within a program, if executed from the keyboard it's 0.556 seconds and 0.531 seconds respectively due to power-saving clock management. |
|||
09-24-2019, 02:22 AM
Post: #31
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
Regarding this year's programming contest:
0. Previous programming contests had sometimes been, IMO, needlessly difficult. Perhaps that's because I'm not a mathematician or algorithm wonk, but I recall years in which I could not even formulate an approach. So I wanted to make this year's contest conceptually simple with the idea being optimization. 1. But if I ever did it again, I'd probably restrict it to a single calculator architecture. The solution is trivial and uninteresting for a Prime; I was more interested in the optimizations people could find for RPN keystroke programmables. For example, large classes of numbers can be eliminated from consideration-- for example, numbers that have two "9" digits-- but the tests for these numbers can take as much or more time than simply checking the number. Stuff like that. As it was I had to dragoon Joe Horn into helping judge the RPL submissions, since I don't do no RPL. 2. Also, I'd give less information on the solution. Several people "optimized" their programs by having them stop after four results were found, since I'd specifically said there were four numbers that satisfied the "three digit numbers equal to the sum of the cubes of their digits." This wasn't really what I was looking for but it was within the rules, so... 3. I'd like to have objective criteria programs can be measured against. The problem is that even if the contest is restricted to, say, RPN calculators, the performance delta between a 15 or 41 and something like a DM-42 or 41CL makes a pure performance metric unrealistic. Same goes for size-- newer machines have instructions and capabilities that can collapse the number of steps required. As it was I had "Classic RPN" and "Modern RPN" categories. Suggestions on a more equitable contest would be appreciated by whomever does the contest next year, I'm sure! |
|||
09-24-2019, 02:57 AM
Post: #32
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
I thought it was an interesting challenge, and well suited to RPN calculators. Even though I was disappointed in what I came up with in the end, the process of looking for ways to shave off a line here or there, or save a register by using stackrobatics, reminded me of the days when this whole hobby started, programming the HP-25. Good times. Thank you!
|
|||
09-24-2019, 03:02 AM
(This post was last modified: 09-24-2019 03:04 AM by Gene.)
Post: #33
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
David, welcome to the world of Programming Contests. :-)
I learned most of those lessons myself over the last 10 years. As to needlessly complicated, perhaps. :-) My problem has been that when something turned out to be easy, most of the solutions looked nearly the same. I had someone complain it was too easy one year...so I have found it very hard to balance! That's one reason I went with the personal aspect of determining a small straight for my yahtzee game the last time. Very useful for me. :-) Thanks for putting on this year's conference and for doing a programming contest! |
|||
09-24-2019, 03:58 AM
Post: #34
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
It was good to see the programming contest problem posted, however, it came way too late. The problem seemed like a good one and not so obscure as some in recent years. If it had been posted on Saturday morning there is a good chance I would have come up with an entry.
Brian Walsh (6951) [41] <1> |
|||
09-24-2019, 04:23 AM
Post: #35
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
(09-24-2019 03:58 AM)Brian Walsh Wrote: It was good to see the programming contest problem posted, however, it came way too late. The problem seemed like a good one and not so obscure as some in recent years. If it had been posted on Saturday morning there is a good chance I would have come up with an entry. Brian, I guess I just don't understand why it matters when the problem statement was posted online. You can always develop and refine your own solution without regard to what others have done. I thought about developing a solution for a specific calculator but decided against it, but not because I saw what others had done. To me, the joy in this activity is developing my own solution and then optimizing it based on either speed or size or some other criteria. For example, on the 12c I like to optimize by having no wasted space GOTO 00 lines at the end. |
|||
09-24-2019, 04:52 PM
Post: #36
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
Of course the ultimate solution in terms of size and speed has yet to be posted...
Code: \<< 153. 370. 371. 407. \>> |
|||
09-24-2019, 06:17 PM
Post: #37
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
I am surprised how many people think this is a legitimate solution, given that the rules said:
"...write a program that finds all 3-digit numbers equal to the sums of the cubes of their digits." I can't see how finding these four numbers using outside methods or another program, and then submitting a program that simply puts those four numbers on the stack, qualifies at all. Fortunately nobody actually submitted such a solution... |
|||
09-24-2019, 06:41 PM
Post: #38
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
(09-24-2019 04:23 AM)Don Shepherd Wrote: Brian, I guess I just don't understand why it matters when the problem statement was posted online. You can always develop and refine your own solution without regard to what others have done. I thought about developing a solution for a specific calculator but decided against it, but not because I saw what others had done. To me, the joy in this activity is developing my own solution and then optimizing it based on either speed or size or some other criteria. For example, on the 12c I like to optimize by having no wasted space GOTO 00 lines at the end.It's simply that timeliness of posting the challenge is what matters to those who want to submit contest entries. Brian Walsh (6951) [41] <1> |
|||
09-24-2019, 07:05 PM
(This post was last modified: 09-24-2019 07:16 PM by Olivier (WA).)
Post: #39
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
Somewhat related to discussions at the conference about the HP Prime G2 availability, Rakuten currently offers a 15% coupon (code: SAVE15) and free shipping, for a total of $130.89.
https://www.rakuten.com/shop/american-te...=2AP18AA-N |
|||
09-24-2019, 07:06 PM
Post: #40
|
|||
|
|||
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
I actually think most of those wanting to submit entries couldn't care less about the contest itself. We see it as a mini challenge, "me against the algorithm", not really competing against anybody, just sharing different thoughts with the sole objective of removing some of the rust in our brains, that's all.
I think the people that create the contests sees it that way too, it's more good sportsmanship than competition. It's OK if it was posted later, don't be disappointed, just solve the problem and post your solution, even late it's OK. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)