Page 1 of 2

Surely Smallester Mouse

Posted: Wed Nov 18, 2009 8:16 pm
by teebee
Sorry for being late ... ;-)

Is there another solution?:

Code: Select all

00^1+21^<3^<1^3?:-cp

Posted: Thu Nov 19, 2009 8:50 pm
by teebee
I solved it with a 19 instructions mouse. However, I am in doubt if this mouse is really worth setting up a new challenge with the usual restrictions ...

Posted: Fri Nov 20, 2009 10:13 pm
by adum
i put one up for 19...

Posted: Sun Nov 22, 2009 3:38 am
by tails
Hi, my mouse is exactly the same as teebee's.
19... :shock:

Posted: Sun Nov 22, 2009 3:52 pm
by efe
@tails & @teebee thats my solution too !

Posted: Wed Nov 24, 2010 8:45 pm
by beza1e1
If two more solved it in 19, then why is teebee still the single solver for Surely Smallesterest Mouse?

Posted: Fri Nov 26, 2010 9:17 pm
by teebee
It might need some time to actually solve it with 19 instuctions ... However, I think they refer to the 20 instructions mouse.

Posted: Sat Dec 03, 2011 6:02 pm
by harvestsnow
I found the same too.

Out of curiosity, teebee, what is the success rate of your 19 instructions mouse?
I have one that could theoretically pass the tests once in two days, but I'm a bit reluctant about poundering the server.

Code: Select all

10>1>::>p
could also work about once a month...

Posted: Sun Dec 04, 2011 5:47 pm
by teebee
harvestsnow wrote:Out of curiosity, teebee, what is the success rate of your 19 instructions mouse?
I have one that could theoretically pass the tests once in two days, but I'm a bit reluctant about poundering the server.
Did you take into account that there is a time penalty of 30s after 20 trials and one of 1h after 200? Nevertheless, my 19 instructions mouse has a success rate of (3/20)**5 ...

Posted: Sun Dec 04, 2011 6:38 pm
by harvestsnow
I didn't know about the 1 hour penalty, I based my estimations on 30s/try.

And there is a slightly better 19 solution (roughly (7/40)**5), with a "nop" instruction that I don't know how to drop or use.

Thanks for confirming that this is the expected solution. After all, it's less intensive that the Cavern master.

Posted: Sun Mar 22, 2015 2:03 pm
by trofi
My 20-solution involving "nop" instruction:

Code: Select all

00 1+21^<3^<1^3?:-cp
With source code if you are lazy to decode original bytecode:

Code: Select all

; we store max index on stack
    0 ; [ max_ix ]
    0 ; [ ix, max_ix ]

.Lnext:
    nop
    1
    add ; [ ++ix, max_ix ]

    2 ; [ 2, ++ix, max_ix ]

    1
    dup
    peek ; [ m<ix>, 2, ix, max_ix ]

    3
    dup
    peek ; [ m<max_ix>, m<ix>, 2, ix, max_ix ]

    1
    dup
    gotoeq .Lfinish

    cmp ; [<-1, 0, 1>, 2, ix, max_ix ]
    sub

    ; call to '.Lnext - 1' for new max
    ; otherwise to '.Lnext'
    naked c

.Lfinish: ; [ m<max_ix>, m<ix>, 2, ix, max_ix ]
    print

Posted: Fri Nov 06, 2015 3:30 pm
by Hippo
I have both mentioned solutions, I have submited the faster O(n) rather to O(n^2) solution.
It took me really long time to get rid of >. BTW: The O(n^2) solution does not fail on inputs with a repeated value while O(n) does (when prefix maximum is ambiguous).
harvestsnow wrote:

Code: Select all

10>1>::>p
You have meant

Code: Select all

10<1<::<p
.

Posted: Sun Nov 08, 2015 12:23 pm
by Hippo
teebee wrote:
harvestsnow wrote:Out of curiosity, teebee, what is the success rate of your 19 instructions mouse?
I have one that could theoretically pass the tests once in two days, but I'm a bit reluctant about poundering the server.
Did you take into account that there is a time penalty of 30s after 20 trials and one of 1h after 200? Nevertheless, my 19 instructions mouse has a success rate of (3/20)**5 ...
Do I understand the penalty system well that (3/20)^5 solution ... which has expected number of attempts roughly 13170 would gain expected 12970 hours of penalties so roughly 1.5 years of penalties?

OK, I have tested the 19 instructin (3/20)^5 solution on already solved levels and it worked well ... but on current challenge ... I got the penalties and now I am already on 1 per hour attempt :) ... and the penalty is after 250 attempts.

Do you know about penalties obtained after 2000 attempts? :)

Maybe this is why there are only 3 lucky solvers out of 25.

Posted: Mon Nov 09, 2015 7:03 am
by AMindForeverVoyaging
Hippo wrote:Maybe this is why there are only 3 lucky solvers out of 25.
Frankly speaking, the challenge where you need 19 instructions and you need to try ever so often until you get through should not exist.

This is downright silly.

Posted: Tue Nov 10, 2015 8:12 am
by Hippo
harvestsnow wrote:I didn't know about the 1 hour penalty, I based my estimations on 30s/try.

And there is a slightly better 19 solution (roughly (7/40)**5), with a "nop" instruction that I don't know how to drop or use.

Thanks for confirming that this is the expected solution. After all, it's less intensive that the Cavern master.
That would reduce expected number of tries to roughly 46%.