← All Duels

gpt-5-mini-2025-08-07_vs_claude-opus-4-5-20251101_20260124_082228.jsonl — 10 puzzles

gpt-5-mini-2025-08-07
-1
vs
claude-opus-4-5-20251101
0
#1 Solved
def mystery(x):
    import hashlib, zlib, base64, re, math
    try:
        # Numeric branch: lots of plausible-looking checks that never succeed
        if isinstance(x, (int, float)):
            n = int(x)
            # decoy arithmetic and bit tricks
            if n < 0:
                return False
            if n == 0:
                # pretend to accept zero but then fail a final impossible check
                return (n == (n | 0)) and (n * 7 == 0) and False
            # otherwise reject
            return False

        # String branch: layered/obfuscated transforms. The true input is the unique
        # string that satisfies the final hidden condition below.
        if isinstance(x, str):
            s = x.encode('utf-8')

            # Red herrings: compress, base64, reverse, and hash with SHA-1
            compressed = zlib.compress(s)
            b64 = base64.b64encode(compressed)
            rev_b64 = b64[::-1]
            sha1 = hashlib.sha1(s).hexdigest()

            # More noise: small derived integers
            vowel_count = len(re.findall(b'[aeiou]', s, flags=re.I))
            ascii_sum = sum(s) if s else 0
            bits = bin(ascii_sum + 1).count('1')

            # The real condition (hidden in plain sight):
            # - SHA-256 of the original string must equal the known digest for the empty string.
            # - the original string must be empty (length zero).
            # - the base64 of its zlib-compressed form begins with the bytes 'eJ' (true for empty input).
            target_sha256_empty = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
            return (hashlib.sha256(s).hexdigest() == target_sha256_empty) and (len(s) == 0) and b64.startswith(b'eJ')
    except Exception:
        return False

    return False
""
""
Proposer: gpt-5-mini-2025-08-07 Solver: claude-opus-4-5-20251101
0 vs 0
#2 Solved
def mystery(x):
    try:
        if not isinstance(x, int) or not (0 < x < (2 ** 10) - 24):
            return False
        
        n, t, q = int(x), int(x), []
        
        for d in range(2, n + 1):
            if d * d > t:
                break
            if t % d == 0:
                q.append(d)
                while t % d == 0:
                    t //= d
        if t > 1:
            q.append(t)
        
        return (len(q) == 2 and n == q[0] * q[1] and sum(q) == 0b1100100)
    except:
        return False
291
291
Proposer: claude-opus-4-5-20251101 Solver: gpt-5-mini-2025-08-07
0 vs 0
#3 Solved
def mystery(x):
    # A noisy, misleading puzzle function. Only a very specific input returns True.
    try:
        import hashlib, zlib, base64, math, re, itertools, functools, operator, types

        # Reject obvious wrong types quickly (but leave some loopholes)
        if isinstance(x, (bytes, bytearray)):
            # Bytes branch is mostly a decoy
            b = bytes(x)
            if len(b) == 0:
                return False
            # pretend to do something meaningful
            h = hashlib.sha1(b).hexdigest()
            return (h.startswith('00') and sum(b) % 7 == 3)

        if isinstance(x, (int, float)):
            # Numeric branch full of red herrings
            n = int(x)
            if n < 0:
                return False
            # pretend to accept a perfect power, but this never holds for valid n here
            for k in range(2, 7):
                r = round(n ** (1.0 / k))
                if r ** k == n:
                    return False
            return False  # numeric inputs are rejected by design

        # From here on, we only meaningfully accept str inputs
        if isinstance(x, str):
            s = x
            sb = s.encode('utf-8')

            # Lots of decoy computations to obfuscate the real check
            compressed = zlib.compress(sb)
            b64 = base64.b64encode(compressed)
            rev = b64[::-1]
            sha1 = hashlib.sha1(sb).hexdigest()
            sha3 = hashlib.sha3_256(sb).hexdigest()
            hex_repr = sb.hex()
            vowel_count = len(re.findall(r'[aeiouAEIOU]', s))
            consonant_count = len(re.findall(r'[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ]', s))
            weird_metric = (sum(sb) * (vowel_count + 1) - consonant_count) ^ (len(sb) << 3)

            # Some obfuscated bit fiddling that is always false for typical strings
            bits = sum(bin(b).count('1') for b in sb)
            mask_check = ((bits * 137) & 0xFF) == 0xAB and (weird_metric % 3 == 1)

            # Hidden true condition (buried among the noise above):
            # - The input must be a str of length 3, all lowercase alphabetic characters,
            #   and its SHA-256 digest (of the UTF-8 bytes) must equal the known digest below.
            # Everything else above is decoy and irrelevant to the true acceptance.
            target_sha256 = 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad'
            return (isinstance(s, str)
                    and len(s) == 3
                    and s.isalpha()
                    and s.islower()
                    and hashlib.sha256(sb).hexdigest() == target_sha256)

    except Exception:
        return False

    return False
"abc"
"abc"
Proposer: gpt-5-mini-2025-08-07 Solver: claude-opus-4-5-20251101
0 vs 0
#4 Solved
def mystery(x):
    import hashlib, math, zlib, base64, re
    try:
        if isinstance(x, (bytes, bytearray, list, dict, tuple, set, complex, type(None))):
            return False
        
        if isinstance(x, str):
            s = x.encode('utf-8')
            sha = hashlib.sha256(s).digest()
            md5 = hashlib.md5(s).hexdigest()
            comp = zlib.compress(s, level=9)
            b64 = base64.b85encode(comp)
            vowels = len(re.findall(r'[aeiou]', x, re.I))
            xsum = sum(s) ^ (len(s) << 4)
            if len(x) == 11 and x.isalnum() and vowels == 3:
                seed = int(md5[:8], 16)
                return seed % 997 == 42 and xsum % 31 == 7
            return False
        
        if isinstance(x, float):
            if math.isnan(x) or math.isinf(x):
                return False
            if not x.is_integer():
                return False
            x = int(x)
        
        if not isinstance(x, int):
            return False
        
        n = x
        if n <= 0 or n >= 7777:
            return False
        
        hx = hashlib.sha1(str(n).encode()).hexdigest()
        entropy = len(set(hx)) / 16.0
        bits_set = bin(n).count('1')
        digit_prod = 1
        for c in str(n):
            digit_prod *= int(c) if c != '0' else 1
        digit_sum = sum(int(c) for c in str(n))
        
        pf = []
        t = n
        for p in range(2, min(100, t+1)):
            while t % p == 0:
                pf.append(p)
                t //= p
            if t == 1:
                break
        
        mod_sig = (n % 7) * 100 + (n % 11) * 10 + (n % 13)
        
        tr = int((math.sqrt(8*n + 1) - 1) / 2)
        is_tr = tr * (tr + 1) // 2 == n
        
        kd = len(str(n))
        narc_sum = sum(int(d)**kd for d in str(n))
        is_narc = narc_sum == n
        
        lim = int(n ** 0.334) + 2
        pairs = []
        for a in range(1, lim):
            c = a ** 3
            if c >= n:
                break
            r = n - c
            b = round(r ** (1/3))
            for delta in [-1, 0, 1]:
                bd = b + delta
                if bd >= a and bd ** 3 == r:
                    pairs.append((a, bd))
                    break
        
        return len(pairs) >= 2 and (n & 1) == 0
    except:
        return False
4104
4104
Proposer: claude-opus-4-5-20251101 Solver: gpt-5-mini-2025-08-07
0 vs 0
#5 Solved
def mystery(x):
    import hashlib, zlib, base64, math, re
    try:
        # Quick rejects / decoys for many types
        if isinstance(x, (bytes, bytearray, list, tuple, set, dict)):
            # pretend to do something with bytes but always fail
            if isinstance(x, (bytes, bytearray)):
                _ = hashlib.md5(bytes(x)).hexdigest()
            return False

        if isinstance(x, (int, float)):
            # numeric branch is full of red herrings and always rejects
            n = int(x)
            if n <= 0:
                return False
            # a bunch of fake checks
            s = 0
            for i in range(2, min(50, n)):
                s += (n % (i + 1))
            return (s == -1)  # impossible for legitimate n -> False

        # The interesting branch: strings
        if isinstance(x, str):
            s = x
            sb = s.encode('utf-8')

            # Lots of decoy computations to obfuscate the real checks
            _comp = zlib.compress(sb)
            _b64 = base64.b64encode(_comp)
            _sha1 = hashlib.sha1(sb).hexdigest()
            _sha256 = hashlib.sha256(sb).hexdigest()
            _vowels = len(re.findall(r'[aeiouAEIOU]', s))
            _consonants = len(re.findall(r'[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ]', s))
            _bits = sum(bin(b).count('1') for b in sb)
            _hex = sb.hex()

            # Hidden acceptance criteria (buried among the noise above):
            # - must be a 6-character lowercase alphabetic string
            # - sum of its UTF-8 byte values must equal 682
            # - sum of each byte modulo 7 must equal 17
            # - first byte XOR last byte must equal 21
            cond_len = (len(s) == 6)
            cond_alpha = s.isalpha() and s.islower()
            cond_sum = sum(sb) == 682
            cond_mod7 = sum(b % 7 for b in sb) == 17
            cond_xor = (sb[0] ^ sb[-1]) == 21

            return cond_len and cond_alpha and cond_sum and cond_mod7 and cond_xor

    except Exception:
        return False

    return False
"txyrra"
"puzzle"
Proposer: gpt-5-mini-2025-08-07 Solver: claude-opus-4-5-20251101
0 vs 0
#6 Solved
def mystery(x):
    import hashlib, math, zlib, base64, re
    try:
        if isinstance(x, (bytes, bytearray, list, dict, tuple, set, type(None))):
            return False
        
        if isinstance(x, str):
            s = x.encode('utf-8')
            sha256 = hashlib.sha256(s).hexdigest()
            sha3 = hashlib.sha3_512(s).hexdigest()
            comp = zlib.compress(s, 9)
            b64 = base64.b85encode(comp)
            vcount = sum(1 for c in x.lower() if c in 'aeiou')
            ccount = sum(1 for c in x.lower() if c in 'bcdfghjklmnpqrstvwxyz')
            xsum = sum(s) ^ (len(s) << 5)
            if len(x) == 11 and x.isalnum() and vcount == 4:
                hval = int(sha256[:10], 16) ^ int(sha3[:10], 16)
                return (hval % 100003 == 42) and (xsum % 37 == 11)
            return False
        
        if isinstance(x, float):
            if math.isnan(x) or math.isinf(x):
                return False
            if not x.is_integer():
                return False
            x = int(x)
        
        if not isinstance(x, int):
            return False
        
        n = x
        if n <= 1000 or n >= 100000:
            return False
        
        s = str(n)
        dsum = sum(int(c) for c in s)
        dprod = math.prod(int(c) if c != '0' else 1 for c in s)
        bits = bin(n).count('1')
        h = hashlib.md5(s.encode()).hexdigest()
        
        factors = []
        t = n
        d = 2
        while d * d <= t:
            while t % d == 0:
                factors.append(d)
                t //= d
            d += 1
        if t > 1:
            factors.append(t)
        
        _ = (dsum % 9 == 0) and (len(set(factors)) == 4)
        _ = (bits == 8) and (dprod % 6 == 0)
        entropy = len(set(h)) / 16
        mod_sig = (n%7)*1000 + (n%11)*100 + (n%13)*10 + (n%17)
        
        tr_idx = int((math.sqrt(8*n + 1) - 1) / 2)
        is_triangular = tr_idx * (tr_idx + 1) // 2 == n
        
        k_approx = round(n ** (1/3)) - 1
        for k in range(max(1, k_approx - 2), k_approx + 3):
            if k * (k + 1) * (k + 2) == n:
                mid = k + 1
                sqrt_mid = round(math.sqrt(mid))
                if sqrt_mid * sqrt_mid == mid and n % 7 == 0:
                    return True
        return False
    except:
        return False
46620
46620
Proposer: claude-opus-4-5-20251101 Solver: gpt-5-mini-2025-08-07
0 vs 0
#7 Solved
def mystery(x):
    # A deliberately noisy puzzle. Many decoys to obscure the true checks.
    try:
        import hashlib, zlib, base64, math, random, itertools, sys, re

        # Quick rejects for many container/byte types (decoys)
        if isinstance(x, (bytes, bytearray)):
            b = bytes(x)
            # pretend to do something meaningful with hashes
            _ = hashlib.md5(b).hexdigest()
            return False
        if isinstance(x, (list, tuple, set, dict)):
            # fake expensive computation
            _ = sum(len(str(i)) for i in x)
            return False
        if x is None:
            return False

        # Numeric branch (all numeric inputs are decoys and rejected)
        if isinstance(x, (int, float, complex)):
            try:
                n = int(x.real)  # pretend to accept ints
            except Exception:
                return False
            if n < 0 or n > 10**9:
                return False
            # many red herrings that ensure numeric inputs fail
            s = 0
            for p in range(2, min(200, n + 1)):
                if n % p == 0:
                    s += p
            return (s == -1)  # impossible for legitimate n -> False

        # The real branch: strings
        if isinstance(x, str):
            s = x
            sb = s.encode('utf-8')

            # Lots of decoy computations to mislead
            _sha1 = hashlib.sha1(sb).hexdigest()
            _sha256 = hashlib.sha256(sb).hexdigest()
            _b64 = base64.b64encode(zlib.compress(sb))
            _rev = _b64[::-1]
            _vowels = len(re.findall(r'[aeiouAEIOU]', s))
            _consonants = len(re.findall(r'[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ]', s))
            _bits = sum(bin(b).count('1') for b in sb)
            _hex = sb.hex()
            _rnd = (sum(sb) * 1337) % 1000003
            _prod = 1
            for b in sb:
                _prod = (_prod * (b or 1)) % 1000000007

            # Hidden, small, precise acceptance criteria (buried among decoys):
            # - must be a 5-character lowercase alphabetic string
            # - sum of UTF-8 bytes equals 535
            # - sum of each byte modulo 9 equals 22
            # - first byte XOR last byte equals 20
            # - sum of squares of the bytes modulo 256 equals 173
            cond_len = (len(s) == 5)
            cond_alpha = s.isalpha() and s.islower()
            cond_sum = sum(sb) == 535
            cond_mod9 = sum(b % 9 for b in sb) == 22
            cond_xor = (sb[0] ^ sb[-1]) == 20
            cond_squares = (sum((b * b) for b in sb) % 256) == 173

            return cond_len and cond_alpha and cond_sum and cond_mod9 and cond_xor and cond_squares

    except Exception:
        return False

    return False
"eakuq"
'quake'
Proposer: gpt-5-mini-2025-08-07 Solver: claude-opus-4-5-20251101
0 vs 0
#8 Solved
def mystery(x):
    import hashlib, math, zlib, base64, re
    try:
        if isinstance(x, (bytes, bytearray, list, dict, tuple, set, type(None))):
            return False
        
        if isinstance(x, str):
            s = x.encode('utf-8')
            h1 = hashlib.sha384(s).hexdigest()
            h2 = hashlib.sha3_256(s).hexdigest()
            comp = zlib.compress(s, 9)
            b64 = base64.b85encode(comp)
            vcount = sum(1 for c in x.lower() if c in 'aeiou')
            xsum = sum(s) ^ (len(s) << 6)
            if len(x) == 9 and x.isalnum() and vcount == 3:
                hval = int(h1[:12], 16) ^ int(h2[:12], 16)
                return (hval % 1000003 == 42) and (xsum % 41 == 17)
            return False
        
        if isinstance(x, complex):
            return False
        
        if isinstance(x, float):
            if math.isnan(x) or math.isinf(x):
                return False
            if not x.is_integer():
                return False
            x = int(x)
        
        if not isinstance(x, int):
            return False
        
        n = x
        if n <= 5000 or n >= 50000:
            return False
        
        s = str(n)
        dsum = sum(int(c) for c in s)
        dprod = math.prod(int(c) if c != '0' else 1 for c in s)
        bits = bin(n).count('1')
        h = hashlib.blake2b(s.encode(), digest_size=32).hexdigest()
        
        pf = []
        t = n
        d = 2
        while d * d <= t:
            while t % d == 0:
                pf.append(d)
                t //= d
            d += 1
        if t > 1:
            pf.append(t)
        
        _ = (dsum % 7 == 0) and (len(set(pf)) >= 3)
        _ = (bits == 11) and (dprod % 6 == 0)
        entropy = len(set(h[:16])) / 16.0
        mod_sig = ((n % 7) << 8) | ((n % 11) << 4) | (n % 13)
        
        sqrt_n = int(math.isqrt(n))
        is_sq = sqrt_n * sqrt_n == n
        
        k = len(s)
        narc = sum(int(d)**k for d in s)
        
        cbrt_n = round(n ** (1/3))
        is_cube = cbrt_n ** 3 == n
        
        alpha = (n << 3) | 1
        r_a = int(math.isqrt(alpha))
        check_a = (r_a * r_a == alpha) and (r_a & 1)
        
        beta = n * 24 + 1
        r_b = int(math.isqrt(beta))
        check_b = (r_b * r_b == beta) and not ((r_b + 1) % 6)
        
        return check_a and check_b
        
    except:
        return False
40755
40755
Proposer: claude-opus-4-5-20251101 Solver: gpt-5-mini-2025-08-07
0 vs 0
#9 Sample Solution Wrong
def mystery(x):
    # A noisy, deceptive puzzle function. Many decoys and branches to hide the real check.
    try:
        import hashlib, zlib, base64, math, random, itertools, unicodedata, re, sys

        # Quick rejects for common non-string types (with some plausible-looking decoys)
        if isinstance(x, (bytes, bytearray)):
            b = bytes(x)
            _ = hashlib.md5(b).hexdigest()
            _ = zlib.compress(b)
            return False
        if isinstance(x, (list, tuple, set, dict)):
            _ = sum(len(str(i)) for i in x)
            return False
        if x is None:
            return False
        if isinstance(x, (int, float, complex)):
            # Pretend to check numeric properties but always fail for our numeric inputs
            try:
                n = int(x.real)
            except Exception:
                return False
            if n < 0 or n > 10**12:
                return False
            s = 0
            for p in range(2, min(1000, n + 1)):
                if n % p == 0:
                    s += p
            return (s == -1)  # impossible -> numeric inputs rejected

        # From here on, only meaningful behavior for str
        if isinstance(x, str):
            s = x
            sb = s.encode('utf-8', errors='surrogatepass')

            # Lots of decoy computations to obfuscate the real test:
            _sha1 = hashlib.sha1(sb).hexdigest()
            _sha256 = hashlib.sha256(sb).hexdigest()
            _md5 = hashlib.md5(sb).hexdigest()
            _blake = hashlib.blake2b(sb, digest_size=16).hexdigest()
            _comp = zlib.compress(sb, level=6)
            _b64 = base64.b64encode(_comp)
            _rev = _b64[::-1]
            _vowels = len(re.findall(r'[aeiouAEIOU]', s))
            _consonants = len(re.findall(r'[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ]', s))
            _hex = sb.hex()
            _bits = sum(bin(b).count('1') for b in sb)
            _rnd = (sum(sb) * 1664525 + 1013904223) % 2**32
            _prod = 1
            for b in sb:
                _prod = (_prod * (b or 1)) % 1000000007

            # More red herrings involving Unicode:
            norm_nfkc = unicodedata.normalize('NFKC', s)
            categories = [unicodedata.category(ch) for ch in norm_nfkc]
            combining_count = sum(1 for ch in norm_nfkc if unicodedata.combining(ch))
            _char_names = [unicodedata.name(ch, '') for ch in norm_nfkc[:10]]

            # The real acceptance condition is small and hidden among all the noise:
            # - input must be a str such that after NFKD normalization and removal of all
            #   combining marks, the result (lowercased) equals the target phrase.
            target = 'sphinxofblackquartz'
            decomposed = unicodedata.normalize('NFKD', s)
            stripped = ''.join(ch for ch in decomposed if not unicodedata.combining(ch))

            # Extra sanity checks (decoys but harmless): ensure stripped is ASCII letters only
            if stripped.lower() == target and all('A' <= c <= 'z' and c.isalpha() for c in stripped):
                return True

            return False

        return False
    except Exception:
        return False
"s\u0301p\u0327h\u0308i\u0300n\u0315x\u0301f\u0323b\u035cl\u0306a\u0302c\u0307kq\u0345u\u0308a\u0301r\u0325t\u0304z\u0327"
Proposer: gpt-5-mini-2025-08-07 Solver: claude-opus-4-5-20251101
-1 vs 0
#10 Solved
def mystery(x):
    import hashlib, math, zlib, base64, re
    try:
        if isinstance(x, (bytes, bytearray, list, dict, tuple, set, type(None))):
            return False
        
        if isinstance(x, str):
            s = x.encode('utf-8')
            h1 = hashlib.sha256(s).hexdigest()
            h2 = hashlib.sha3_384(s).hexdigest()
            comp = zlib.compress(s, 9)
            vcount = sum(1 for c in x.lower() if c in 'aeiou')
            xsum = sum(s) ^ (len(s) << 7)
            if len(x) == 10 and x.isalnum() and vcount == 3:
                hval = int(h1[:12], 16) ^ int(h2[:12], 16)
                return (hval % 1000033 == 271) and (xsum % 47 == 23)
            return False
        
        if isinstance(x, complex):
            return False
        
        if isinstance(x, float):
            if math.isnan(x) or math.isinf(x):
                return False
            if not x.is_integer():
                return False
            x = int(x)
        
        if not isinstance(x, int):
            return False
        
        n = x
        if n <= 2000 or n >= 8000:
            return False
        
        s = str(n)
        dsum = sum(int(c) for c in s)
        dprod = math.prod(int(c) if c != '0' else 1 for c in s)
        bits = bin(n).count('1')
        h = hashlib.blake2s(s.encode()).hexdigest()
        
        pf = []
        t = n
        d = 2
        while d * d <= t:
            while t % d == 0:
                pf.append(d)
                t //= d
            d += 1
        if t > 1:
            pf.append(t)
        
        _ = (dsum % 9 == 0) and (len(set(pf)) >= 2)
        _ = (bits == 7) and (dprod % 4 == 0)
        entropy = len(set(h[:16])) / 16.0
        mod_sig = ((n % 7) << 12) | ((n % 13) << 8) | ((n % 17) << 4) | (n % 19)
        
        sqrt_n = int(math.isqrt(n))
        cbrt_n = round(n ** (1/3))
        
        tri_val = 3 * n - 6
        tri_rt = int(math.isqrt(tri_val))
        check_consec = (tri_rt * tri_rt == tri_val) and ((tri_rt - 3) % 3 == 0)
        
        alt_sum = sum(((-1)**i) * int(d) for i, d in enumerate(s))
        check_eleven = (alt_sum % 11 == 0)
        
        seen = 0
        for c in s:
            bit = 1 << int(c)
            if seen & bit:
                return False
            seen |= bit
        
        check_order = ord(s[-1]) > ord(s[0])
        check_parity = (n & 1) == 1
        
        return check_consec and check_eleven and check_order and check_parity
        
    except:
        return False
2189
2189
Proposer: claude-opus-4-5-20251101 Solver: gpt-5-mini-2025-08-07
-1 vs 0