User blog:QuasarBooster/Obfuscated Python code for Buchholtz Hydras!

''Welcome back to "stupidly implemented googology Python code"! I'm your host and today we'll be tackling the massively-extra-head bois: Buchholtz Hydras!'' That intro was dumb. Anyway, let's talk about the actual code a little. Obviously, implementing the hydras with lists was a huge pain in the butt. I finally got it working, though, and the initial length was around 350-ish non-whitespace characters. Then, as per obfuscating custom, I first shortened all variable names to single letters. The other big change you might notice is that there are no '+' or 'ω' labels. The plus was pretty redundant so I just removed it from all trees, then modify the tree as usual until it's empty. Instead of omega, I changed the labels to 0s and increased all the natural numbers' labels by one. For example, the tree  would appear as. Since True and False are functionally the same as integer labels in the code, they are used in constructing the initial hydras so they'll have a presence in lists as well. So while the lists are unreadable compared to the parentheses version, the code is still drastically slimmed down. Its current length is now just 304 characters and 27 lines. I'm decently sure there are still some optimizations but for now I'm satisfied. Let me know if you see anything I can do! def BH(n): c=lambda A:[A[0]]+[c(x)for x in A[1:]] k=0 H=[] for i in range(n-1):H=[[i>n-3]+H] while H:    k+=1    P=H    while len(P[-1])>1:P=P[-1]    C=P[-1]    l=C[0]    if l<1:C[0]=k+2    elif l<2:      P.pop      if P!=H:        G=H        while G[-1]!=P:G=G[-1]        for i in range(k):G+=[c(P)]    else:      C[0]=1      S=H[-1]      i=S[-1]      while i!=C:        if(i[0]<l)*i[0]:S=i        i=i[-1]      P[-1]=c([l-1]+S[1:])  return k