Page 1 of 1
Really Small Mouse
Posted: Wed Nov 12, 2008 7:56 pm
by papa
I have to admit that I cheated at this challenge... only checked memory cells 0 to 9 for the maximum and submitted until I passed the five tests :-*) The deterministic version of my program has size 28. Does anybody have a 'real' solution?
Posted: Wed Nov 12, 2008 9:30 pm
by adum
hey, this is hacker.org! whatever passes is good =)
Posted: Fri Nov 14, 2008 9:38 pm
by MerickOWA
Yes there is a real solution to this problem

Took me a while but I eventually figured out how to squeeze out enough instructions.
Re: Really Small Mouse
Posted: Fri Nov 14, 2008 11:37 pm
by tails
papa wrote:I have to admit that I cheated at this challenge... only checked memory cells 0 to 9 for the maximum and submitted until I passed the five tests :-*)
On the next challenge "Maybe Smallest Mouse", I made a code that only checks cells 0 to 2, and repeated submitting it for several hours, once per 40 seconds.
But be sure not to try that, or you will get the 3600 seconds penalty

before you "solve" the challenge, unless you're very lucky.
Posted: Fri Jan 02, 2009 2:53 pm
by theStack
For me, that challenge was by far the hardest, but also the most fun one to solve!

Weeks ago I came to 28 instructions (which was enough for the "King Mouse" challenge) and really thought it is impossible to shorten it anymore... but last night I tried for several hours to structure the HVM program in a new way, keeping in mind that there are operand fetches which may be only done once and finally, using the stack in an efficient way, I got it. It was around 7 am when I went to bed, but all the effort paid off

I'm now at 26 instructions (without cheating) - so I submitted the same solution for Mus Minutoides and Really Small Mouse.
And now, I read that there's another challenge where only 24 instructions are allowed... oh my god, that's just crazy

Is that even possible without cheating?
Best regards,
theStack
Posted: Fri Jan 02, 2009 4:18 pm
by tog
theStack wrote:And now, I read that there's another challenge where only 24 instructions are allowed... oh my god, that's just crazy

Is that even possible without cheating?
Depends on what you call cheating

. All mice can be solved by "usual" hvm hacking, i.e., writing programs that generate the required output.
Posted: Fri Jan 02, 2009 4:47 pm
by theStack
Not cheating means for me that the code really works for ALL POSSIBLE inputs! (of course you can't test all possible inputs, but it should be clear what I mean)
So, no assumptions that the maximum number be at positions 0-9, no assumptions that there are no zeros in the input array and I can use the zero at position mem[20] to break the loop (I did this in an earlier mouse challenge

)...
When it is based on pure luck that a solutions works I just don't have much motivation to solve this, you know.
But well, I will try anyway

Posted: Tue Aug 09, 2011 3:52 am
by DaymItzJack
I did what OP did, I can't imagine anything else. HVM challenges bother me when people say they got down to XX instructions and they don't show it lol. I want to learn the secret!
Posted: Fri Dec 16, 2011 11:50 pm
by lvhao945
i have a 25 length code
Cheater
Posted: Tue Apr 01, 2014 3:46 pm
by Hippo
I have just cheated to be able to check there exists noncheating solution ... so you say there exists!
I have to think more ...