Page 1 of 1

Quinine

Posted: Sun Dec 07, 2008 3:08 pm
by tog
I wonder if this is possible with optimizing the "standard technique" of building quines (i.e., two parts of the program for data and code). I tried different variants, but no matter how I turn it, I don't seem to be able to get it much below 120 instructions (including data). Does this challenge require a completely different approach?

Posted: Mon Dec 08, 2008 1:44 am
by therethinker
From what I've seen, the standard technique is pretty much the only way of doing it. There are some exceptions, but in a closed enviroment with a language like HVM, it IS the only way.

You'll find that data and "real code" are directly proportional in size. Make sure your data is resonably well condensed, and then work on optomizing the computational aspect. Taking a single char off the real code should actually save a few overall.

I'm not sure exactly how your program works, and I don't want to give too much away, but think about how you can better utilize commands. I've found that the easiest place to knock off a few chars is around goto/jump commands.

Good luck. I had tons of fun working on that challenge. I have about 3 pages of scribbles as I tried to get it working :P

Posted: Wed Dec 10, 2008 12:11 pm
by tog
I probably tried a thousand of different variants and finally got one with 97 instructions. Now the challenge says it should be done in 93 instructions :shock: . Was the limit set down? I thought it was 97 instructions - at least, a couple of days ago.

Posted: Wed Dec 10, 2008 1:14 pm
by tails
Sorry, the limit was set down because therethinker and I found shorter solutions. If you find a still shorter solution, then the limit will be set down again and you will have the credit for this challenge.

EDIT: The limit was set back to 97.

Posted: Fri Dec 19, 2008 6:01 pm
by Skeeve
Wow, this is a really nice challange.
I optimized my quine from 1800 chars down to 118 (and solved other small HVM challanges on the way). Still there's a bit to go... I didn't thought, that there are so many possibilities to optimize a HVM program.

Posted: Sat Dec 20, 2008 9:23 am
by tails
Hi,

It's really hard to make the code shorter than 100. But, as the code gets shorter, it gets more and more artistic. So, have fun! :D

Posted: Fri May 30, 2014 8:20 am
by Hippo
Grrr, I am on 114 after several days of optimizing :(. The main problem is the addressing issue of HVM...

[edit]112[/edit]
[edit]107[/edit]
[edit]106[/edit]
[edit]104 ... dead end[/edit]

I probably got it ... the original solution of length 141 used 2 calls to code encodding. Replacement to one call not only simplified the code, it also broken another constraint ... hmmm, not yet ... another dead end:(

Now I almost have it ... I just must make the code one op longer ;)

[edit]95[/edit] ... which allows to read challenge solved thread ... what easily leads to 84 ... the last step to mighty quine 81 requires further thinking.