Really Small Mouse

Discussion of challenges you have already solved
Post Reply
papa
Posts: 13
Joined: Wed Oct 29, 2008 7:51 am
Location: Germany

Really Small Mouse

Post 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?
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

hey, this is hacker.org! whatever passes is good =)
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post 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.
tails
Posts: 191
Joined: Tue Jun 10, 2008 7:51 pm
Location: Tokyo

Re: Really Small Mouse

Post 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 :lol: before you "solve" the challenge, unless you're very lucky.
theStack
Posts: 72
Joined: Sun Nov 02, 2008 12:46 am

Post 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 :lol:
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 :shock: Is that even possible without cheating?

Best regards,
theStack
tog
Posts: 70
Joined: Fri Nov 14, 2008 11:23 am
Location: Germany

Post 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 :shock: Is that even possible without cheating?
Depends on what you call cheating :wink:. All mice can be solved by "usual" hvm hacking, i.e., writing programs that generate the required output.
theStack
Posts: 72
Joined: Sun Nov 02, 2008 12:46 am

Post 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 :wink:
DaymItzJack
Posts: 106
Joined: Thu Oct 29, 2009 9:21 pm

Post 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!
lvhao945
Posts: 18
Joined: Fri Oct 14, 2011 10:18 am
Location: none

Post by lvhao945 »

i have a 25 length code
User avatar
Hippo
Posts: 339
Joined: Sat Feb 01, 2014 12:05 am
Location: Praha 5

Cheater

Post 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 ...
Post Reply