Hacker Newsnew | past | comments | ask | show | jobs | submit | bjin's commentslogin

Claude models with max thinking effort simply scores less in code golfing than xhigh. And it's not unique to this Benchmark. In Both FrontierCode 2.0 and Coding Agent Index v2.1 (Claude Code harness), Claude Fable 5.2 with xhigh thinking effort scores more than max thinking effort.

I have wrote a dedicated section about this: https://bjin.github.io/go-codegolf-benchmark/#about/thinking...


It would still be helpful to have the results for max in the table.

If anything, it'd make the situation clear with hard numbers.


Some footnote to emphasize a bit: Select a competitor (both model or human) will show heatmap for its results for each problem and for each language. Each problem also have a full scoreboard.

Clicking model's cell (either in heatmap or each problem's full scoreboard) will display solution code for this cell.

Another astonishing solution by GPT-6.2 Astra is its Python solution for Game of Life, where you need to write a function to determine the next state of a 01 grid in Conway's Game of Life. This solution is 103 byes (20 bytes less than Googlers' record)

    g=lambda a,p=['z'*99]:[a<p and`g(zip(*r))`[1::3]or+(4<`r*2`.count('1',4)<8)for r in zip(a,p+a,a[1:]+p)]
(link to the solution with full scoreboard: https://bjin.github.io/go-codegolf-benchmark/#problems/04/sc...)

To anyone else confused, backticks quote in python2 is alias of repr() function, removed in python3.

Cool you turned this around so fast after people asked for this info in the thread. The code golf itself is incomprensible to me.

I started to write an explanation myself, then I felt that human effort is overrated and just had ChatGPT generate one for me. (It did require some additional prompting to get it right, though - I should have probably asked Astra from Codex instead of whatever model they feed you on the chat UI.)

    def g(a):
        # Make p a 1-element array of a 99-character string filled with 'z'.
        p = ['z'*99]

        # Create a view of the board that combines each row with the
        # row above and below it. The padding ensures that the first
        # and last rows also have three rows to work with.
        #
        # For example, with:
        #   a = ['001', '110', '101']
        #   p = ['zzz']
        #
        # We get:
        #   a       = ['001', '110', '101']
        #   p+a     = ['zzz', '001', '110', '101']
        #   a[1:]+p = ['110', '101', 'zzz']
        #
        # zip() stops at the shortest input, producing:
        # [
        #   ('001', 'zzz', '110'),
        #   ('110', '001', '101'),
        #   ('101', '110', 'zzz')
        # ]
        #
        # Each tuple contains the current row, the previous row
        # (or padding), and the next row (or padding), in that order.
        board = zip(a, p+a, a[1:]+p)

        result = []
        for r in board:
            # If a is still in its original orientation, transpose
            # the three rows and recursively process them.
            #
            # zip(*r) turns the three rows into columns, allowing
            # the next recursive call to process the board in the
            # other orientation.
            #
            # The backticks convert the recursive result (a list
            # of integers) to its string representation: "[0, 1, 0]"
            # (`` is just shorthand for repr(), which is supposed to
            # return a machine-readable string representation of a value.)
            # [1::3] extracts every third character, effectively
            # extracting the individual cell values from the list
            # representation.
            #
            # The comparison a<p is also a clever way to distinguish
            # the original board from the transposed board: Python 2
            # compares the different element types differently.
            #
            # Boolean expressions short-circuit in Python, and they
            # return the result of the last term evaluated, not True/False;
            # for example, `0 or 1` will evaluate to 1, not True. The original
            # golfed version makes use of this to take one of two branches
            # without spending the golf budget on writing if/else.
            if a < p:
                result.append(`g(zip(*r))`[1::3])
            else:
                # We are now looking at three adjacent columns, each
                # containing three cells: a complete 3x3 neighborhood.
                #
                # r*2 duplicates the neighborhood. Converting it to
                # a string and counting '1' gives twice the number of
                # live neighbors, plus the center cell.
                #
                # Starting the count at index 4 skips the first
                # occurrence of the center cell, but its second
                # occurrence remains.
                #
                # Therefore:
                #   dead cell with 3 neighbors: 6
                #   live cell with 2 neighbors: 5
                #   live cell with 3 neighbors: 7
                #
                # All these cases satisfy 4 < count < 8.
                #
                # Unary + on a boolean (the result of the comparison)
                # converts it to an integer (0 or 1).
                # Because we are currently in the recursively called branch,
                # the caller will turn our entire return value into a string 
                # (via backticks); therefore, we do not have to bother turning the
                # converted integers back into strings.
                result.append(+(4 < `r*2`.count('1', 4) < 8))

        return result
Most of this are pretty standard Python 2 codegolf tricks that I used to use, when I was still interested in this stuff. (I like to think my much younger and more carefree self used to be decent at codegolfing in Python.) Python 2 is weirdly weakly typed, with implicit conversions all over the place - most codegolf programs of the era will make extensive use of this. The only language-level trick that stands out to me is the `listOfChars`[1::3] to convert a list of single-digit integers to a string, and I suppose that one is kind of obvious when you think about it - just rarely comes up.

The really smart part is the way it uses recursive calls with branches with an implicit test `a<p` to check whether we are in the recursively called branch or not. Most people would have probably created a second function instead of a branch to do the counting, which would have incurred the heavy golf cost of having to type `lambda` to declare it, or passed an explicit flag to the recursive call, which also incurs character penalties.


TIL that whitespace around operator keywords like `and` is optional.

So, going through the "missing pieces" list you provided earlier, the only thing that actually holds is probably just NGU. You can insist that it's a "deal breaker" for you, fine. But attacking others being disingenuous simply because they don't agree is probably too much.

Context for others: NGU is a proprietary algorithm created by the author of madVR.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: