← All Duels

grok-4_vs_gpt-5.2-pro-2025-12-11_20260125_005422.jsonl — 10 puzzles

grok-4
-1
vs
gpt-5.2-pro-2025-12-11
1
#1 Solved
def mystery(x):
    o0o0o = x
    if not isinstance(o0o0o, int) or o0o0o <= 10000:
        return False
    l1l1l = set()
    l1l1l.add(1)
    o0o = 2
    while o0o * o0o <= o0o0o:
        if o0o0o % o0o == 0:
            l1l1l.add(o0o)
            l1l1l.add(o0o0o // o0o)
        o0o += 1
    o0o0 = sum(l1l1l)
    useless = 0
    for _ in range(10):
        useless += o0o * _
    return o0o0 == o0o0o
33550336
33550336
Proposer: grok-4 Solver: gpt-5.2-pro-2025-12-11
0 vs 0
#2 Solved
def mystery(x):
    import math, struct

    # Only accept *actual* floats (no ints, no strings).
    if type(x) is not float:
        return False
    if not math.isfinite(x) or x <= 0.0:
        return False

    def _u64_from_f64(v):
        return struct.unpack("<Q", struct.pack("<d", v))[0]

    def _mix(u):
        # A bijective 64-bit "finalizer"-style mix (permutation of 0..2^64-1).
        m = (1 << 64) - 1
        u &= m
        u ^= (u >> 33)
        u = (u * 0xff51afd7ed558ccd) & m
        u ^= (u >> 33)
        u = (u * 0xc4ceb9fe1a85ec53) & m
        u ^= (u >> 33)
        return u & m

    # Reconstruct a hidden hex-float literal from XOR-masked bytes.
    enc = (
        34, 223, 108, 18, 210, 104, 69, 116, 147, 57, 9,
        132, 63, 20, 37, 197, 101, 76, 202, 56, 64
    )
    key = (
        (1 << 4) + 2,      # 18
        0xA0 + 7,          # 167
        0x5F - 2,          # 93
        0x3F - 3,          # 60
        0xF0 - 0x0F,       # 225
        3 * 3,             # 9
        0x70 + 7           # 119
    )
    hx = "".join(chr(b ^ key[i % len(key)]) for i, b in enumerate(enc))

    # Target float is defined only indirectly via hx.
    t = float.fromhex(hx)

    ux = _u64_from_f64(x)
    ut = _u64_from_f64(t)

    # Extra noise (doesn't change the condition, but tries to hide it).
    if ((ux ^ (ux >> 7) ^ (ux >> 13)) & 0xF) != ((ut ^ (ut >> 7) ^ (ut >> 13)) & 0xF):
        return False

    return _mix(ux) == _mix(ut)
float.fromhex("0x1.3a2f4d5e6c7b8p+17")
float.fromhex('0x1.3a2f4d5e6c7b8p+17')
Proposer: gpt-5.2-pro-2025-12-11 Solver: grok-4
0 vs 0
#3 Solved
def mystery(x):
    o0o0o = x
    if not isinstance(o0o0o, int) or o0o0o <= 10000:
        return False
    l1l1l = {}
    oo0oo = o0o0o
    l1l = 2
    while l1l * l1l <= oo0oo:
        o0o = 0
        while oo0oo % l1l == 0:
            o0o += 1
            oo0oo //= l1l
        if o0o > 0:
            if o0o > 1:
                return False
            l1l1l[l1l] = 1
        if l1l == 2:
            l1l = 3
        else:
            l1l += 2
    if oo0oo > 1:
        l1l1l[oo0oo] = 1
    if len(l1l1l) < 3:
        return False
    useless = ""
    for _ in range(5):
        useless += str(_ * l1l)
    for ll1 in l1l1l:
        if (o0o0o - 1) % (ll1 - 1) != 0:
            return False
    return True
10585
10585
Proposer: grok-4 Solver: gpt-5.2-pro-2025-12-11
0 vs 0
#4 Solved
def mystery(x):
    import hashlib

    # Only accept *actual* strings (not bytes, not ints).
    if type(x) is not str:
        return False

    # Basic sanity constraints (mostly noise, but also blocks weird encodings).
    if any((ord(c) < 32 or ord(c) > 126) for c in x):
        return False

    _e = [85, 53, 30, 180, 80, 246, 141, 155, 206, 149, 117, 36, 103, 48, 87, 85]
    _k = (0x13, 0x37, 0xC0, 0xDE, 0x42)

    def _m(i):
        return (i * 73 + 41) & 0xFF

    # Decrypt the hidden target string.
    _tb = bytes((_e[i] ^ _k[i % len(_k)] ^ _m(i)) for i in range(len(_e)))
    try:
        _t = _tb.decode("ascii")
    except Exception:
        return False

    # Hashing pipeline (extra mixing for obfuscation).
    def _dig(s):
        b = s.encode("utf-8")
        h1 = hashlib.sha256(b + b"\x00" + b[::-1]).digest()
        h2 = bytes((h1[i] ^ ((i * 17 + 93) & 0xFF)) for i in range(32))
        return hashlib.sha256(h2).hexdigest()

    # Candidate normalization (subtle but not helpful).
    _c = x.strip()
    if len(_c) != len(_t):
        return False

    # Red-herring arithmetic check tied to the hidden target.
    _ws_c = sum((i + 1) * ord(_c[i]) for i in range(len(_c)))
    _ws_t = sum((i + 1) * ord(_t[i]) for i in range(len(_t)))
    if _ws_c != _ws_t:
        return False

    # Final check.
    return _dig(_c) == _dig(_t)
"open_sesame_2026"
"open_sesame_2026"
Proposer: gpt-5.2-pro-2025-12-11 Solver: grok-4
0 vs 0
#5 Solved
def mystery(x):
    o0o0o = x
    if not isinstance(o0o0o, int) or o0o0o <= 10000000:
        return False
    import math
    l1l1l = 0
    oo0oo = int(math.pow(o0o0o, 1/3)) + 2
    for o0o in range(1, oo0oo):
        l1l = o0o * o0o * o0o
        ll1ll = o0o0o - l1l
        if ll1ll <= 0:
            continue
        o0o0 = math.pow(ll1ll, 1/3)
        oo0 = int(o0o0 + 0.5)
        if oo0 >= o0o or oo0 <= 0:
            continue
        if (oo0 * oo0 * oo0) == ll1ll:
            l1l1l += 1
    useless = 0
    for _ in range(10):
        useless += oo0 * _
    return l1l1l >= 2
87539319
87539319
Proposer: grok-4 Solver: gpt-5.2-pro-2025-12-11
0 vs 0
#6 Solved
def mystery(x):
    # Accept either an int or a string representing an int (base-0: "123", "0xff", "0b1010"...).
    if isinstance(x, bool):
        return False
    if isinstance(x, str):
        s = x.strip().replace("_", "")
        if not s:
            return False
        try:
            x = int(s, 0)
        except Exception:
            return False
    if type(x) is not int:
        return False

    m = (1 << 64) - 1
    if x < 0 or x > m:
        return False

    # --- Reconstruct hidden 8-byte target (obfuscated) ---
    enc = (222, 135, 176, 253, 130, 171, 17, 3)

    def ks(i):
        # tiny keystream (reversible): deliberately overcomplicated for only 8 bytes
        a = (0xA7 + 17 * i) & 0xFF
        b = (i * i + 11) & 0xFF
        return (a ^ b) & 0xFF

    tb = bytes((enc[i] ^ ks(i)) & 0xFF for i in range(8))
    t = int.from_bytes(tb, "little")

    # --- A bijective 64-bit mix (SplitMix64 finalizer-like) ---
    def mix(u):
        u &= m
        u ^= (u >> 30) & m
        u = (u * 0xBF58476D1CE4E5B9) & m
        u ^= (u >> 27) & m
        u = (u * 0x94D049BB133111EB) & m
        u ^= (u >> 31) & m
        return u & m

    # --- Extra "noise" constraints tied to the hidden target ---
    # (They don't leak the target directly, but they prune random guesses.)
    g = (t ^ (t >> 1)) & m
    if ((x ^ (x >> 1)) & m).bit_count() != g.bit_count():
        return False

    # Mod-arithmetic check on low 32 bits (prime modulus just below 2^32).
    P = 4294967291
    if pow(x & 0xFFFFFFFF, 5, P) != pow(t & 0xFFFFFFFF, 5, P):
        return False

    # Final check: equality hidden behind a bijection
    return mix(x) == mix(t)
0x2133737233763372
0x2133737233763372
Proposer: gpt-5.2-pro-2025-12-11 Solver: grok-4
0 vs 0
#7 Solved
def mystery(x):
    o0o0o = x
    if not isinstance(o0o0o, int) or o0o0o <= 100000000:
        return False
    import math
    l1l1l = 0
    oo0oo = int(math.pow(o0o0o, 0.25)) + 2
    for o0o in range(1, oo0oo):
        l1l = o0o ** 4
        ll1ll = o0o0o - l1l
        if ll1ll <= 0:
            continue
        o0o0 = math.pow(ll1ll, 0.25)
        oo0 = int(o0o0 + 0.5)
        if oo0 >= o0o or oo0 <= 0:
            continue
        if (oo0 ** 4) == ll1ll:
            l1l1l += 1
    useless = 0
    for _ in range(10):
        useless += oo0 * _
    return l1l1l >= 2
635318657
635318657
Proposer: grok-4 Solver: gpt-5.2-pro-2025-12-11
0 vs 0
#8 Solver Failed
def mystery(x):
    import hashlib

    # --- accept int, or a string that can be parsed as an int (base-0) ---
    if isinstance(x, bool):
        return False
    if isinstance(x, str):
        s = x.strip().replace("_", "")
        if not s:
            return False
        try:
            x = int(s, 0)
        except Exception:
            return False
    if type(x) is not int:
        return False

    M128 = (1 << 128) - 1
    M64 = (1 << 64) - 1
    if x < 0 or x > M128:
        return False

    # --- reconstruct hidden 16-byte target -> 128-bit integer t ---
    enc = (
        66, 108, 164, 211, 220, 49, 253, 23,
        93, 60, 175, 148, 206, 177, 177, 217
    )

    def k(i):
        a = (i * 73 + 41) & 0xFF
        b = (i * i * 19 + 7) & 0xFF
        return (a ^ b ^ 0xA6) & 0xFF

    def add(i):
        return (i * 17 + 93) & 0xFF

    tb = bytes((((enc[i] ^ k(i)) - add(i)) & 0xFF) for i in range(16))
    t = int.from_bytes(tb, "big")

    # --- derive round keys from t (doesn't reveal t directly) ---
    seed = hashlib.blake2s(tb, digest_size=32).digest()
    keys = [int.from_bytes(seed[i * 8:(i + 1) * 8], "little") for i in range(4)]

    def rol64(v, r):
        r &= 63
        v &= M64
        return ((v << r) | (v >> (64 - r))) & M64

    def F(r, kk):
        r &= M64
        r ^= kk & M64
        r = (r * 0x9E3779B97F4A7C15) & M64
        r ^= rol64(r, 17) ^ (r >> 29)
        r = (r * 0xBF58476D1CE4E5B9) & M64
        r ^= (r >> 32)
        return r & M64

    def perm128(u):
        u &= M128
        L = (u >> 64) & M64
        R = u & M64
        for i in range(10):
            kk = (keys[i & 3] ^ (0xA5A5A5A5A5A5A5A5 + i * 0x123456789ABCDEF)) & M64
            L, R = R, (L ^ F(R, kk)) & M64
        return ((L & M64) << 64) | (R & M64)

    # --- extra "noise" constraints tied to the hidden target (prunes guesses) ---
    gx = ((x ^ (x >> 1)) & M128).bit_count()
    gt = ((t ^ (t >> 1)) & M128).bit_count()
    if gx != gt:
        return False

    P1 = 18446744073709551557  # prime close to 2^64
    if pow(x & M64, 7, P1) != pow(t & M64, 7, P1):
        return False

    P2 = 18446744073709551533  # another nearby prime
    if pow((x >> 64) & M64, 11, P2) != pow((t >> 64) & M64, 11, P2):
        return False

    # Final check hidden behind a bijection (so effectively x must equal the hidden target).
    return perm128(x) == perm128(t)
0x6d346b335f31745f6834726421216859
int.from_bytes(b"m4k3_1t_h4rd!!XY", "big")
Proposer: gpt-5.2-pro-2025-12-11 Solver: grok-4
0 vs 1
#9 Sample Solution Wrong
def mystery(x):
    import hashlib

    if isinstance(x, bool):
        return False
    if isinstance(x, str):
        s = x.strip().replace("_", "")
        if not s:
            return False
        try:
            x = int(s, 0)
        except Exception:
            return False
    if type(x) is not int:
        return False

    M128 = (1 << 128) - 1
    M64 = (1 << 64) - 1
    if x < 0 or x > M128:
        return False

    enc = (
        200, 178, 214, 28, 100, 126, 154, 232,
        0, 186, 254, 180, 156, 102, 82, 128
    )

    def k(i):
        a = (i * 61 + 29) & 0xFF
        b = (i * i * 23 + 11) & 0xFF
        return (a ^ b ^ 0xB5) & 0xFF

    def add(i):
        return (i * 19 + 107) & 0xFF

    tb = bytes((((enc[i] ^ k(i)) - add(i)) & 0xFF) for i in range(16))
    t = int.from_bytes(tb, "big")

    seed = hashlib.blake2s(tb).digest()
    keys = [int.from_bytes(seed[j * 8 : (j + 1) * 8], "little") for j in range(4)]

    def rol64(v, r):
        r &= 63
        v &= M64
        return ((v << r) | (v >> (64 - r))) & M64

    def F(r, kk):
        r &= M64
        r ^= kk
        r = (r * 0xC6A4A7935BD1E995) & M64
        r ^= rol64(r, 19) ^ (r >> 23)
        r = (r * 0x85EBCA6B) & M64
        r ^= (r >> 13)
        return r

    def perm128(u):
        u &= M128
        L = (u >> 64) & M64
        R = u & M64
        for i in range(12):
            kk = (keys[i % 4] ^ (0x5A5A5A5A5A5A5A5A + i * 0xFEDCBA9876543210)) & M64
            L, R = R, (L ^ F(R, kk)) & M64
        return ((L << 64) | R) & M128

    gx = ((x ^ (x >> 1)) & M128).bit_count()
    gt = ((t ^ (t >> 1)) & M128).bit_count()
    if gx != gt:
        return False

    P1 = 18446744073709551557
    if pow(x & M64, 13, P1) != pow(t & M64, 13, P1):
        return False

    P2 = 18446744073709551533
    if pow((x >> 64) & M64, 17, P2) != pow((t >> 64) & M64, 17, P2):
        return False

    return perm128(x) == perm128(t)
"0x000102030405060708090a0b0c0d0e0f"
Proposer: grok-4 Solver: gpt-5.2-pro-2025-12-11
-1 vs 1
#10 Solved
def mystery(x):
    import hashlib

    # --- accept int, or a string that can be parsed as an int (base-0) ---
    if isinstance(x, bool):
        return False
    if isinstance(x, str):
        s = x.strip().replace("_", "")
        if not s:
            return False
        # mild character filter (mostly noise)
        ok = "0123456789abcdefABCDEFxXoObB+-"
        if any(c not in ok for c in s):
            return False
        try:
            x = int(s, 0)
        except Exception:
            return False
    if type(x) is not int:
        return False

    M96 = (1 << 96) - 1
    M48 = (1 << 48) - 1
    if x < 0 or x > M96:
        return False

    # --- reconstruct hidden 12-byte target -> 96-bit integer t ---
    enc = (156, 189, 248, 13, 212, 21, 176, 229, 201, 182, 5, 58)

    def k(i):
        a = (37 * i + 101) & 0xFF
        b = (11 * i * i + 17) & 0xFF
        return (a ^ b ^ 0xA6) & 0xFF

    def add(i):
        return (29 * i + 77) & 0xFF

    tb = bytes((((enc[i] ^ k(i)) - add(i)) & 0xFF) for i in range(12))
    t = int.from_bytes(tb, "big") & M96

    # --- derive round keys from the hidden bytes ---
    seed = hashlib.blake2s(tb, digest_size=32).digest()
    keys = [int.from_bytes(seed[i * 8:(i + 1) * 8], "little") for i in range(4)]

    def rol64(v, r):
        r &= 63
        v &= (1 << 64) - 1
        return ((v << r) | (v >> (64 - r))) & ((1 << 64) - 1)

    def F(r48, kk):
        # 48-bit output function (intentionally over-mixed, but still deterministic)
        r = r48 & M48
        u = (r ^ (kk & M48) ^ ((kk >> 16) & M48)) & ((1 << 64) - 1)
        u = (u * 0x9E3779B97F4A7C15) & ((1 << 64) - 1)
        u ^= rol64(u, 21) ^ (u >> 17)
        u = (u * 0xBF58476D1CE4E5B9) & ((1 << 64) - 1)
        u ^= (u >> 32)
        return u & M48

    def perm96(u):
        u &= M96
        L = (u >> 48) & M48
        R = u & M48
        for i in range(11):
            kk = (keys[i & 3] ^ (0xA5A5A5A5A5A5A5A5 + i * 0x1F123BB5)) & ((1 << 64) - 1)
            L, R = R, (L ^ F(R, kk)) & M48
        return (((L & M48) << 48) | (R & M48)) & M96

    # --- extra constraints tied to the hidden target (noise / pruning) ---
    gx = ((x ^ (x >> 1)) & M96).bit_count()
    gt = ((t ^ (t >> 1)) & M96).bit_count()
    if gx != gt:
        return False

    MOD = 281474976710597  # odd 48-bit-ish modulus (doesn't need to be prime)
    if pow(x & M48, 9, MOD) != pow(t & M48, 9, MOD):
        return False

    # pointless "work" that shouldn't help
    junk = 0
    z = (x ^ 0x123456789ABCDEF) & ((1 << 64) - 1)
    for i in range(17):
        junk ^= ((z + i * 0x9E37) * (i + 3)) & ((1 << 64) - 1)
    if (junk & 1) != (junk & 1):
        return False

    # Final check hidden behind a bijection => effectively forces x == t.
    return perm96(x) == perm96(t)
0x0123456789ABCDEFFEDCBA98
"0x0123456789ABCDEFFEDCBA98"
Proposer: gpt-5.2-pro-2025-12-11 Solver: grok-4
-1 vs 1