7 replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
source | link

After obfuscating "Hello, World!"After obfuscating "Hello, World!" in MarioLANG I looked into golfing it a bit. The above is the shortest I have found so far.

As before I started from a Brainfuck solution which sets four cells to the nearest multiple of 10 to the characters He, and space and converted it to MarioLANGand converted it to MarioLANG. You can then shorten the code a bit by making use of the auxiliary floor in the loop which almost halves the width of the loop. Note that the bottom is only executed one time less than the top, so you don't get exact multiples of the initial counter in all 4 cells any more.

After obfuscating "Hello, World!" in MarioLANG I looked into golfing it a bit. The above is the shortest I have found so far.

As before I started from a Brainfuck solution which sets four cells to the nearest multiple of 10 to the characters He, and space and converted it to MarioLANG. You can then shorten the code a bit by making use of the auxiliary floor in the loop which almost halves the width of the loop. Note that the bottom is only executed one time less than the top, so you don't get exact multiples of the initial counter in all 4 cells any more.

After obfuscating "Hello, World!" in MarioLANG I looked into golfing it a bit. The above is the shortest I have found so far.

As before I started from a Brainfuck solution which sets four cells to the nearest multiple of 10 to the characters He, and space and converted it to MarioLANG. You can then shorten the code a bit by making use of the auxiliary floor in the loop which almost halves the width of the loop. Note that the bottom is only executed one time less than the top, so you don't get exact multiples of the initial counter in all 4 cells any more.

6 added 444 characters in body
source | link

MarioLANG, 259 249 242 240240 235 bytes

+>+>)+)+)+++)++++((((-[!)+.).+++++++>->.
+"+"===================#+".")
+++.!((+++++++++)++++++)<.(---+
++=#===================")---.
++((+++++++++++++++.-(.)).+++.------.--+++++++.<---
 !+======================---
=#>++++++++++++++.)+
+"+"===================#=================================================================.
 +++.-!((+++++++++)++++++)<
++=#==================="
++
 >!
=#  =======================#=#

Finally, I wanted to make use of the wasted space in front of the loop, so I added a bunch of elevators to make use of the vertical space there.

Oh and And then there's a little trick atI realised that I could fold the end ofcode after the main rowloop (see previous revision) below the loop to make use of some more vertical space, which saves twosaved five more bytes.

Note: This solver assumes that the linear code after the loop is all on the top line, and the above code is that solution folded up. There might be a shorter overall solution by making the solver aware of the folding, because now I get 3 more +s in the first part for free, and the next 4 instructions would cost only 1 byte instead of 2.

MarioLANG, 259 249 242 240 bytes

+>+>)+)+)+++)++++((((-[!)+.).+++++++..+++.)).(-.((+++++++++++++++.).+++.------.--------.)+
+"+"===================#=================================================================.
 +++!((+++++++++)++++++)<
++=#==================="
++
 !
=#

Finally, I wanted to make use of the wasted space in front of the loop, so I added a bunch of elevators to make use of the vertical space there.

Oh and then there's a little trick at the end of the main row which saves two bytes.

MarioLANG, 259 249 242 240 235 bytes

+>+>)+)+)+++)++++((((-[!)>->.
+"+"===================#+".")
+++!((+++++++++)++++++)<.---+
++=#===================")---.
++((.-(.)).+++..+++++++.<---
 !+======================---
=#>++++++++++++++.).+++.-!>!
  =======================#=#

Finally, I wanted to make use of the wasted space in front of the loop, so I added a bunch of elevators to make use of the vertical space there. And then I realised that I could fold the code after the loop (see previous revision) below the loop to make use of some more vertical space, which saved five more bytes.

Note: This solver assumes that the linear code after the loop is all on the top line, and the above code is that solution folded up. There might be a shorter overall solution by making the solver aware of the folding, because now I get 3 more +s in the first part for free, and the next 4 instructions would cost only 1 byte instead of 2.

5 added 982 characters in body
source | link

MarioLANG, 259 249 242242 240 bytes

+>+>)+++++++)+++++++)+++)++++((((-[!)+.)----.+++++++..+++.)).(-.((+++++++++++++++.).+++.------.--------.)+
+"+"==================#====================================================================+"+"===================#=================================================================.
+++!((((++++)+++)++++++++++++)++++++)<
++=#=================="++=#==================="
++
+ !
=#

Finally, I wanted to make use of the wasted space in front of the loop, so I added a bunch of elevators to make use of the vertical space there. Finally, I tested setting the counter to 9, 10, 11 and 12 and found that 12 gives the shortest overall code (I might try more, but the large gaps mean that it will cost more to reach the four characters initially).

It turns out, that for an initial counter of 12 my handcrafted solution is already optimal. I'll try a few different numbers now and then I'll see ifHowever, using 11 instead saves two bytes. I can generalise the structure oftried all counter values from 6 to 20 (inclusive) with the code a bit.following results:

6: {277,{a->7,b->6,c->0,d->16,e->1,f->0,g->0,h->9,i->-1,j->0,k->6,l->2}}
7: {266,{a->6,b->5,c->0,d->11,e->4,f->0,g->2,h->5,i->0,j->0,k->5,l->2}}
8: {258,{a->2,b->8,c->0,d->3,e->11,f->0,g->5,h->0,i->4,j->4,k->0,l->0}}
9: {253,{a->8,b->0,c->0,d->5,e->7,f->0,g->2,h->3,i->2,j->0,k->4,l->0}}
10: {251,{a->0,b->8,c->0,d->3,e->8,f->-1,g->4,h->0,i->4,j->3,k->0,l->2}}
11: {240,{a->1,b->6,c->1,d->1,e->9,f->0,g->4,h->0,i->0,j->3,k->0,l->-1}}
12: {242,{a->6,b->0,c->0,d->6,e->3,f->-4,g->0,h->4,i->0,j->0,k->3,l->-1}}
13: {257,{a->1,b->5,c->-1,d->6,e->2,f->-1,g->3,h->0,i->5,j->0,k->3,l->-4}}
14: {257,{a->1,b->4,c->6,d->0,e->8,f->-3,g->3,h->0,i->2,j->2,k->0,l->4}}
15: {242,{a->1,b->4,c->1,d->3,e->4,f->0,g->1,h->2,i->1,j->2,k->0,l->2}}
16: {252,{a->0,b->5,c->-3,d->4,e->2,f->7,g->0,h->3,i->-1,j->2,k->0,l->0}}
17: {245,{a->4,b->0,c->4,d->5,e->1,f->0,g->0,h->3,i->-4,j->0,k->2,l->0}}
18: {253,{a->4,b->0,c->0,d->1,e->5,f->-2,g->2,h->0,i->8,j->0,k->2,l->-2}}
19: {264,{a->0,b->4,c->0,d->5,e->0,f->6,g->2,h->0,i->6,j->0,k->2,l->-4}}
20: {262,{a->0,b->4,c->-4,d->5,e->0,f->1,g->2,h->0,i->4,j->0,k->2,l->-6}}

MarioLANG, 259 249 242 bytes

+>+>)++++++)++++++((-[!).)----.+++++++..+++.)).(-.((+++++++++++++++.).+++.------.--------.)+
+"+"==================#====================================================================.
+++!((((++++)+++)+++))<
++=#=================="
++
+!
=#

Finally, I wanted to make use of the wasted space in front of the loop, so I added a bunch of elevators to make use of the vertical space there. Finally, I tested setting the counter to 9, 10, 11 and 12 and found that 12 gives the shortest overall code (I might try more, but the large gaps mean that it will cost more to reach the four characters initially).

It turns out, that for an initial counter of 12 my handcrafted solution is already optimal. I'll try a few different numbers now and then I'll see if I can generalise the structure of the code a bit.

MarioLANG, 259 249 242 240 bytes

+>+>)+)+)+++)++++((((-[!)+.).+++++++..+++.)).(-.((+++++++++++++++.).+++.------.--------.)+
+"+"===================#=================================================================.
+++!((+++++++++)++++++)<
++=#==================="
++
 !
=#

Finally, I wanted to make use of the wasted space in front of the loop, so I added a bunch of elevators to make use of the vertical space there.

It turns out, that for an initial counter of 12 my handcrafted solution is already optimal. However, using 11 instead saves two bytes. I tried all counter values from 6 to 20 (inclusive) with the following results:

6: {277,{a->7,b->6,c->0,d->16,e->1,f->0,g->0,h->9,i->-1,j->0,k->6,l->2}}
7: {266,{a->6,b->5,c->0,d->11,e->4,f->0,g->2,h->5,i->0,j->0,k->5,l->2}}
8: {258,{a->2,b->8,c->0,d->3,e->11,f->0,g->5,h->0,i->4,j->4,k->0,l->0}}
9: {253,{a->8,b->0,c->0,d->5,e->7,f->0,g->2,h->3,i->2,j->0,k->4,l->0}}
10: {251,{a->0,b->8,c->0,d->3,e->8,f->-1,g->4,h->0,i->4,j->3,k->0,l->2}}
11: {240,{a->1,b->6,c->1,d->1,e->9,f->0,g->4,h->0,i->0,j->3,k->0,l->-1}}
12: {242,{a->6,b->0,c->0,d->6,e->3,f->-4,g->0,h->4,i->0,j->0,k->3,l->-1}}
13: {257,{a->1,b->5,c->-1,d->6,e->2,f->-1,g->3,h->0,i->5,j->0,k->3,l->-4}}
14: {257,{a->1,b->4,c->6,d->0,e->8,f->-3,g->3,h->0,i->2,j->2,k->0,l->4}}
15: {242,{a->1,b->4,c->1,d->3,e->4,f->0,g->1,h->2,i->1,j->2,k->0,l->2}}
16: {252,{a->0,b->5,c->-3,d->4,e->2,f->7,g->0,h->3,i->-1,j->2,k->0,l->0}}
17: {245,{a->4,b->0,c->4,d->5,e->1,f->0,g->0,h->3,i->-4,j->0,k->2,l->0}}
18: {253,{a->4,b->0,c->0,d->1,e->5,f->-2,g->2,h->0,i->8,j->0,k->2,l->-2}}
19: {264,{a->0,b->4,c->0,d->5,e->0,f->6,g->2,h->0,i->6,j->0,k->2,l->-4}}
20: {262,{a->0,b->4,c->-4,d->5,e->0,f->1,g->2,h->0,i->4,j->0,k->2,l->-6}}
4 added 1407 characters in body
source | link
3 added 19 characters in body
source | link
2 added 112 characters in body
source | link
1
source | link