Fricative Melon
  • Member for 6 years
  • Last seen more than a month ago
Can I make that shape with blocks, slabs, and stairs?
Accepted answer
6 votes

Python - 525 491 478 430 bytes r=range def t(s): m=s.find("\n")+1 for q in r(4): try: for i in r(-q%2,m-1,2): for j in r(-q/2,len(s)/m,2): k,g=j*m+i,"" b=[k,k+1,k+m,k+m+1] ...

View answer
KOTH: Everybody loves tokens
1 votes

KindaRandomAI Every turn, do the following: If there is a token at your position, "EAT". Otherwise, move in a random viable direction, i.e. if you're at the left edge don't say "LEFT". kindaRandomAI ...

View answer
KOTH: Everybody loves tokens
1 votes

NaiveAI Starting with r=0, look at all tokens with taxicab distance r away from your position. If there are any, pick one that would give you the highest score if you got it right now. Otherwise, ...

View answer
Score a game of Load, Defend and Shoot
1 votes

Python, 217 bytes def f(A,B): x=y=0;c=[-1,1,0] for i in range(len(A)): a=A[i];b=B[i] for s in[0,1]: if(a,b)==(2,1):return c[s]*c[x<1] if(a,b)==(2,3)and x<1:return-c[s] x-=c[a-1];...

View answer
Four steps to the left: vipers. Four steps to the right: a cliff. Don't die!
1 votes

Python 2, 236 bytes n=input();r=len;u=[("",[0]*(n//4))] while n>r(u[-1][0]): y,t=u.pop() for c in 0,1: s=t[:];u+=(y+"LR"[c],s), for i in range(r(s)): if-~r(y)//-~i*-~i==-~r(y):s[i]+=2*c-1;...

View answer
Singly lossy integers: Concatenated sequences missing a single element
1 votes

Python 3, 319, 270, 251 bytes t,h,n,k,q*=range,input(),1,2, while h>len(q)or n*k<=len(str(q[h])): q+=[int("".join([str(c+s)for c in t(k+1)if c-y]))for s in t(10**~-n,10**n)for y in t(...

View answer
Simple cat program
1 votes

AnnieFlow, 2 bytes 11 The first 1 indicates that the program accepts input, and the second 1 indicates that there is one stack. The output stack has no changeable behavior, so that's the only ...

View answer
Implement a Truth-Machine
0 votes

AnnieFlow, 6 bytes 010[!" Here is the decompressed and more readable program: 010101101100000110111111 Breakdown: 010 there are two characters, 0 and 1 1 input is accepted, ...

View answer