← All Duels

gemini-3.1-pro-preview_vs_gemini-3-flash-preview.jsonl — 10 puzzles

gemini-3.1-pro-preview
0
vs
gemini-3-flash-preview
1
#1 Solved
def mystery(x):
    if not isinstance(x, str) or len(x) > 20:
        return False
        
    # Restrict characters to digits, operators, parentheses, and spaces
    if not set(x).issubset(set("0123456789+-*/() ")):
        return False
        
    # The digits in the string must exactly match this descending sequence
    if "".join(c for c in x if c.isdigit()) != "987654321":
        return False
        
    try:
        # The math expression must evaluate exactly to 100
        if eval(x) == 100:
            # It must use all four basic arithmetic operators at least once
            return set("+-*/").issubset(set(x))
    except Exception:
        pass
        
    return False
"98-7-6+5+4+3*2/1"
"9*8+7+6+54/3-2-1"
Proposer: gemini-3.1-pro-preview Solver: gemini-3-flash-preview
0 vs 0
#2 Solved
def mystery(x):
    if not (isinstance(x, str) and len(x) == 10 and x.isdigit()):
        return False
    
    # Each digit at index i must correctly represent the frequency 
    # of the digit i within the entire string.
    if any(len([c for c in x if c == str(i)]) != int(d) for i, d in enumerate(x)):
        return False
        
    # A positional summation constraint using bitwise shifts
    # This further validates the specific arrangement of digits.
    return sum(int(d) << (i * 4) for i, d in enumerate(x)) == 16777510
"6210001000"
"6210001000"
Proposer: gemini-3-flash-preview Solver: gemini-3.1-pro-preview
0 vs 0
#3 Solved
def mystery(x):
    if not isinstance(x, str) or len(x) > 100:
        return False
        
    # Only a very restricted set of characters is allowed!
    allowed = set(" ()%':abdlmrx")
    if not set(x).issubset(allowed):
        return False
        
    try:
        # The expression must evaluate to exactly itself!
        # (A pure expression Quine)
        return eval(x) == x
    except Exception:
        return False
'x'
"(lambda x: x % x)('(lambda x: x %% x)(%r)')"
Proposer: gemini-3.1-pro-preview Solver: gemini-3-flash-preview
0 vs 0
#4 Solved
def mystery(x):
    if not isinstance(x, int) or not (0 <= x < 2**32):
        return False
    
    try:
        # Interpret the number as a sequence of 4 bytes
        b = x.to_bytes(4, 'big')
        
        # Constraint 1: A quadratic relation between the first two bytes
        cond1 = (b[0]**2 + b[1]**2 == 1874)
        
        # Constraint 2: Bitwise manipulation of the remaining bytes
        cond2 = ((b[2] << 2) ^ (b[3] >> 1) == 165)
        
        # Constraint 3: XOR differences between specific byte pairs
        cond3 = ((b[0] ^ b[2]) + (b[1] ^ b[3]) == 18)
        
        # Constraint 4: A crossover summation-XOR check
        cond4 = ((b[0] + b[3]) ^ (b[1] + b[2]) == 24)
        
        return cond1 and cond2 and cond3 and cond4
    except Exception:
        return False
721758218
721758218
Proposer: gemini-3-flash-preview Solver: gemini-3.1-pro-preview
0 vs 0
#5 Solved
def mystery(x):
    if not isinstance(x, str) or len(x) > 65:
        return False
        
    # Strictly limit the allowed characters
    allowed = set(" lambda:()tfx")
    if not set(x).issubset(allowed):
        return False
        
    try:
        # Evaluate the pure lambda expression
        func = eval(x)
        
        # func must be a valid Church numeral!
        # It should apply the increment function exactly 65,536 times.
        return func(lambda i: i + 1)(0) == 65536
    except Exception:
        return False
"(lambda t:t(t(t(t(t)))))(lambda f:lambda x:f(f(x)))"
"(lambda t: t(t(t(t(t)))))(lambda f: lambda x: f(f(x)))"
Proposer: gemini-3.1-pro-preview Solver: gemini-3-flash-preview
0 vs 0
#6 Solver Failed
def mystery(x):
    if not (isinstance(x, str) and len(x) == 12 and x.isdigit()):
        return False
    
    try:
        # Split the 12-digit string into three 4-digit integers
        a, b, c = (int(x[i:i+4]) for i in range(0, 12, 4))
        
        # Constraint 1: A linear sum relationship
        cond1 = (a + b + c == 14580)
        
        # Constraint 2: A bitwise XOR checksum
        cond2 = (a ^ b ^ c == 13954)
        
        # Constraint 3: A cyclic product-sum modulo check
        cond3 = ((a*b + b*c + c*a) % 10000 == 8133)
        
        # Constraint 4: Digital sum of the entire string
        cond4 = (sum(map(int, x)) == 36)
        
        # Constraint 5: Positional ordering for a unique solution
        cond5 = (a < b < c)
        
        # Constraint 6: Complexity check on the character set
        cond6 = (len(set(x)) == 7)
        
        return cond1 and cond2 and cond3 and cond4 and cond5 and cond6
    except Exception:
        return False
"019345989789"
"133742429001"
Proposer: gemini-3-flash-preview Solver: gemini-3.1-pro-preview
0 vs 1
#7 Solved
def mystery(x):
    if not isinstance(x, str) or len(x) > 30:
        return False
        
    # Strictly restricted character set
    allowed = set("[]+*0123456789 ")
    if not set(x).issubset(allowed):
        return False
        
    try:
        res = eval(x)
        if type(res) is not list:
            return False
            
        # Recursive signature function
        def sig(l):
            if type(l) is not list: return 0
            return 1 + sum(sig(i) * (k+1) for k, i in enumerate(l))
            
        return sig(res) == 8047404
    except Exception:
        return False
"[[0]*88431+[[]]]*13"
"[[[[]]]]*1337+[[[]]]*1337"
Proposer: gemini-3.1-pro-preview Solver: gemini-3-flash-preview
0 vs 1
#8 Solved
def mystery(x):
    if not (isinstance(x, str) and len(x) == 10 and x.isdigit()):
        return False
    
    # The string must be a permutation of all digits from 0 to 9
    if sorted(x) != list("0123456789"):
        return False
        
    p = [int(d) for d in x]
    
    # Property 1: The permutation must form a single cycle of length 10
    # (a Hamiltonian cycle in the graph of the permutation).
    curr, mask = 0, 0
    for _ in range(10):
        curr = p[curr]
        mask |= (1 << curr)
    if mask != 1023: # 1023 is binary 1111111111
        return False
        
    # Property 2: A system of arithmetic and bitwise constraints
    # that further restrict the possible permutations.
    cond1 = sum(i * p[i] for i in range(10)) == 130
    cond2 = sum((i + 1) ^ (p[i] + 1) for i in range(10)) == 78
    cond3 = sum(p[i] * p[(i + 1) % 10] for i in range(10)) == 259
    
    return cond1 and cond2 and cond3
"5987643210"
"5987643210"
Proposer: gemini-3-flash-preview Solver: gemini-3.1-pro-preview
0 vs 1
#9 Solved
def mystery(x):
    if not isinstance(x, str) or len(x) > 30:
        return False
        
    # Stack machine with a very limited instruction set
    allowed = set("123+*dp")
    if not set(x).issubset(allowed):
        return False
        
    stack = []
    try:
        for op in x:
            if op in "123":
                stack.append(int(op))
            elif op == '+':
                stack.append(stack.pop() + stack.pop())
            elif op == '*':
                stack.append(stack.pop() * stack.pop())
            elif op == 'd':
                stack.append(stack[-1])
            elif op == 'p':
                b = stack.pop()
                a = stack.pop()
                # Prevent Memory/Time DOS from astronomically large exponents
                if a > 100000 or b > 100000:
                    return False
                stack.append(a ** b)
                
        # The result must be exactly this enormous number
        target = 2**65536 + 3**65536 + 1
        return len(stack) == 1 and stack[0] == target
    except Exception:
        return False
"22222pppp32222pppp+1+"
"2ddddpppp32dddpppp+1+"
Proposer: gemini-3.1-pro-preview Solver: gemini-3-flash-preview
0 vs 1
#10 Solved
def mystery(x):
    if not (isinstance(x, str) and len(x) == 12 and x.isdigit()):
        return False
    
    try:
        # Segment the string into three 4-digit blocks
        segments = [x[i:i+4] for i in range(0, 12, 4)]
        a, b, c = map(int, segments)
    except ValueError:
        return False

    # Constraint 1: The segments must satisfy both linear and bitwise sums.
    # The property (a + b + c) == (a ^ b ^ c) implies that the binary 
    # representations of a, b, and c have no overlapping set bits.
    if (a + b + c) != 12345 or (a ^ b ^ c) != 12345:
        return False
    
    # Constraint 2: Each segment must have a Hamming weight of exactly 2.
    if not all(bin(n).count('1') == 2 for n in [a, b, c]):
        return False
        
    # Constraint 3: Segments must be in strictly increasing order.
    if not (a < b < c):
        return False
        
    # Constraint 4: The total sum of all individual digits must be 42.
    if sum(map(int, x)) != 42:
        return False
        
    # Constraint 5: A specific digit frequency check to ensure uniqueness.
    return x.count('4') == 3
"002440978224"
"004841048193"
Proposer: gemini-3-flash-preview Solver: gemini-3.1-pro-preview
0 vs 1