Emil
  • Member for 7 years, 6 months
  • Last seen this week
The Rock, Paper, Scissors, Lizard, Spock Tournament of Epicness
28 votes

Pony (Python 2) This is based on a rock-paper-scissors bot I wrote some time ago for a programming challenge at the end of a Udacity online class. I changed it to include Spock and lizard and made ...

View answer
Rearrange pixels in image so it can't be recognized and then get it back
17 votes

Python 2 (self-inverse, no randomness, context-sensitive) This won't win any prizes for "least recognizable", but maybe it can score as "interesting". :-) I wanted to make something context-...

View answer
Paint by Numbers
15 votes

Python 2 with PIL Also a Python solution and probably very much a work in progress: from PIL import Image, ImageFilter import random def draw(file_name, P, N, M=3): img = Image.open(file_name, '...

View answer
Print ASCII Voxels
Accepted answer
12 votes

Python ( 444 361 354 bytes) Edit: I found another bug that would omit a corner cross in very special cases. A straight forward fix added 50 bytes to the code so I tried to golf it down a bit further. ...

View answer
Short drawing programme
10 votes

Processing - 93 · 0.9 = 83.7 With next to no overhead for drawing, but a very verbose syntax, in Processing the best score is probably reached without any nice features and only one bonus: void ...

View answer
Help me with trigonometry!
8 votes

Python, 436 + 1909 = 2345 This must be one of the most inefficient solutions imaginable and mathematicians will probably cringe, but I've managed to throw something together that actually simplifies ...

View answer
Find the largest fragile prime
7 votes

Python 2, 828 digits 5048 digits ...

View answer
Swipe Type Converter
6 votes

Python 2, Turnarounds, 224 226 230 232 and 230 234 passes This is quite a straight forward approach: Find the points where the flow of letters changes direction (plus start and end). Output the ...

View answer
Tips for King of the Hill bots
5 votes

Use a meta strategy For almost every clever strategy there's another strategy that beats it: For example, your opponent might use exactly the same reasoning as you to anticipate your next move and ...

View answer
The Rock, Paper, Scissors, Lizard, Spock Tournament of Epicness
4 votes

Dienstag (Python 2) My first entry Pony seems to fare quite well with all its second guessing (tripple guessing, ...) and meta reasoning. But is that even necessary? So, here is Dienstag, Pony's ...

View answer
Keep your distance!
3 votes

Gustav (Python 2) This is a pretty straight forward meta strategy, shamelessly copied from one of my old answers in a similar KotH challenge. It considers a few simple strategies, looks how they ...

View answer
Relative vs Absolute
3 votes

Python, 171 139 No way near as short as the other solutions, but I guess it should be relatively good for what can be done with Python: def f(i):a,b='NWSE','FLBR';I=map(a.find,'N'+i);return''.join((...

View answer
Unscramble the Source Code
2 votes

Python 2, 13 This one might be very easy for some; for me it came as quite a surprise. Code: print (70-70) Output: 49

View answer
Evolution of "Hello World!"
2 votes

Answer 94 - Processing //[]([.]c;main() { print("Hello World!"); //#[;]#bye;dnl</> Distance 7 from answer 93

View answer
Create a grid as close to a square as possible
2 votes

Python, 79 75 (no bonuses) The bonuses seem tricky, so here is a pretty simple Python function: def f(N):c=max(x*((x*x<=N)>N%x)for x in range(1,N+1));print(N/c*'O'+'\n')*c

View answer
Good Versus Evil
2 votes

Gustav, Python 2 This program follows another player's last choice, selecting the player based on how well following them would have performed over the last rounds. For a wider range to choose from, ...

View answer
Convert a Point of the Compass to Degrees
1 votes

Python 3, 149 bytes I tried a recursive algorithmic approach. The quarter winds were harder to handle than I thought at first, so this solution grew relatively long. def f(s): if'W'in s:s=s.replace(...

View answer
RNA to Protein Translation
1 votes

Python 2, 370 358 354 bytes This is a very straight forward approach using no compression, just trying to pack the information quite densly: s=lambda x:x and[x[:3]]+s(x[3:])or[] def f(I):O=''.join(d*...

View answer
The Saltine Challenge
1 votes

Python, 299 I thought I was being clever but the solution turned out to be overly complicated and longer than any straight forward approach, yet I couldn't resist to post it. The program explicitly ...

View answer
Output all numbers below certain number containing certain digits
1 votes

Python 2, 202 191 Another try at Python, using the same idea as @August's Ruby solution: a=raw_input() s=[x for x in range(input())if any(c in`x`for c in a)] for _,g in __import__('itertools')....

View answer
Unscramble the Source Code
0 votes

Python 2, 45 [safe] Code: 3 ((([])))**``,,::-=>ccddeeiinoopprrttuuuuuuw (Contains one newline and no further whitespace.) Output: 67156035937662544426 Hint (though I'm not sure it helps): ...

View answer
Programming Praxis - Survive like Flavius Josephus
0 votes

Python 2, 96 95 bytes Since the obvious way to do it in Python was already taken, I had to do it recursively. :) r=range x=lambda o,l,m:l and x(o+l[:1],l[m:]+l[1:m],m)or o j=lambda n,m:x([],r(m-1,n)+...

View answer