That was part of the reason for the 15 limit. I figured an infinite printer would be trivial in some languages (I'm not sure which, but I guess there are some).
Bah, optimal is a pain in the button for any classical computer. The problem is always the same, too many representation possibilities, though this is mitigated in BF
When I was younger, I use to play a word game called Word chain. It was very simple. The first player chooses a word; the next player says another word that starts with the same letter the previous word ended with. This goes on forever until somebody gives up! Trick is, you cannot use the same wo...
I just feel sad that I just lost the opportunity to beat a language and now somebody who wrote almost just what I was going to write beat me in my language
But do you really think that a golfed down version of my program is fair to be posted, that too mot as a community wiki? he should have just told me how to golf down my language...
Number of cells used in optimal BF representation of a constant
Relavent.
Your task is deceptively simple. Given a number n (or a character C with char code value n in your encoding), output the number of cells utilized in the optimal representation of that number n in a standard Brainf*** inte...
I think this is rather difficult to quantify. If the 3% stems from replacing a tiny part of the code with a slightly shorter part, it's probably too similar. If the whole code is different, even 1 byte can be a significant improvement.
Python, 156 112 bytes
a=map(chr,range(65,91))
s=raw_input().upper()
print ''.join([dict(zip(a,a[::-1])).get(i,i) for i in s])==s[::-1]
Basically, it makes a dictionary of the translation with uppercase letters and the input is capitalized (if everything were lowercase instead, that would add 5...
@TanMath In addition to the comment I left on your answer, please consider treating the (completely valid) first post of a new user a bit friendlier next time. You can't know if they came up with the same approach independently, and even if they didn't, neither of your answers is competitive enough to win.
Also I'd probably personally consider a 33% improvement substantial enough to warrant a separate answer in any case (unless those 33% come from improving the compression of a single string, say).
In any case, I think there's more harm done in putting off a new user than in getting beaten with your own idea once.
Python 2, 202 - 10 = 192 bytes
a= ['if num==15:print"STOP!!!";exit()','print num','print"a=",a','print"num=",num+1', 'for s in a:print s']
num= 1
print num
if num==15:print"STOP!!!";exit()
print"a=",a
print"num=",num+1
for s in a:print s
Never going to win, but fun. :P
Without the bonus: 176 ...
well, it's all still very much on paper. and probably slightly too ambitious which is why I'm not making much progress. anyway, I don't want to spill too many details at this stage. so triangles ;)
I love these reviews on metacritic. Review 1: Old-style gaming in futuristic shoes [...] Review 2: If you're looking to try something that's genuinely new and not just a refinement or tweak of some existing genre or play mechanic, you really owe it to yourself to play this.
@quintopia IIRC Life on a Penrose tiling is TC, and certainly Life on a standard grid is, so I think it's highly likely that there's a cellular automaton on a polyiamond tiling which is TC.
I think he is talking about the actual tiling itself. The way Wang Tiles work, it is possible to translate a Turing machine into a set of Wang tiles, so that halting / not halting is translated into periodic / aperiodic tiling.
@PeterTaylor wait, is the TC'ness of Wang tiles also based on cellular automata? I thought it was more something like the tiling generated by some initial subset of tiles.
This is a cross-post from a post on MathSE due to lack of answers.
To illustrate my question I provide the following example.
The website Online Turing Machine provides a Turing Machine simulator. The following program adds 1 to any binary number.
q0,1 => q0,1,>
q0,0 => q0,0,>
q0,_ => q1,_,
Do-nothing Polyglot
Challenge
This challenge requires you to write a polyglot which contains a comment in as many languages as possible.
The comment must say This is a polyglot comment.
The program must do nothing at all.
Besides comments, your code may contain no-ops from the language(s) you...