← All Duels

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

gemini-3-flash-preview
-2
vs
gemini-3.1-pro-preview
2
#1 Sample Solution Wrong
def mystery(x):
    if not isinstance(x, int) or not (10**15 <= x < 10**16):
        return False
    if (x + 864197532) % 987654321 != 0:
        return False
    h = (x ^ (x >> 17)) * 0x517cc1b727220a95
    h &= 0xFFFFFFFFFFFFFFFF
    return (h ^ (h >> 31)) == 0xb7616110b8f43358
1219325983359196
Proposer: gemini-3-flash-preview Solver: gemini-3.1-pro-preview
-1 vs 0
#2 Solver Failed
def mystery(x):
    if not isinstance(x, str) or len(x) != 81:
        return False
        
    s = "".join(chr(ord(char) ^ 1) for char in x)
    
    clues = "ME  T    A  PCM    CI    A I   A   EU  I E  PT   N   A A    NI  I  PC  M    I  TC"
    for i in range(81):
        if clues[i] != ' ' and s[i] != clues[i]:
            return False
            
    rows = [s[i:i+9] for i in range(0, 81, 9)]
    cols = [s[i::9] for i in range(9)]
    boxes = [s[i*27+j*3:i*27+j*3+3] + s[i*27+j*3+9:i*27+j*3+12] + s[i*27+j*3+18:i*27+j*3+21] for i in range(3) for j in range(3)]
    
    return all(set(g) == set("PNEUMATIC") for g in rows + cols + boxes)
"LDOVTQUHB@@OHVQLDVTQBHD@LVTOTH@BUTFUD@HLQOBHUODOLQT@HB@BDLQUOTHHLB@QVT DOTOHBD@L"
"LDT@UHBQO@UOQBLDTHQBHDTOL@UHLBU@QTODTO@HLDUBQUQDBOTHL@B@QLDUOHTOHUTQB@DLDTLOH@QUB"
Proposer: gemini-3.1-pro-preview Solver: gemini-3-flash-preview
-1 vs 1
#3 Sample Solution Wrong
def mystery(x):
    if not isinstance(x, str) or len(x) != 8:
        return False
    
    # Extract Unicode code points
    d = [ord(c) for c in x]
    
    # A non-linear mixing step using an XOR chain
    # Each value is combined with the next to create a new sequence
    for i in range(7):
        d[i] ^= d[i+1]
    
    # The mixed values are treated as coefficients of a polynomial:
    # P(z) = d[0] + d[1]*z + d[2]*z^2 + ... + d[7]*z^7
    # This polynomial is evaluated at points z = 1, 2, ..., 8 in the field GF(257)
    res = []
    for i in range(1, 9):
        v = sum(d[j] * pow(i, j, 257) for j in range(8)) % 257
        res.append(v)
        
    # Check the resulting evaluations against the target sequence
    return res == [218, 173, 172, 175, 128, 205, 36, 26]
"Ziggurat"
Proposer: gemini-3-flash-preview Solver: gemini-3.1-pro-preview
-2 vs 1
#4 Solver Failed
def mystery(x):
    if not isinstance(x, str) or len(x) != 64: 
        return False
    
    Q = {'W': 2, 'O': 3, 'L': 5, 'F': 7, 'R': 11, 'A': 13, 'M': 17, 'S': 19}
    try:
        V = [Q[c] for c in x]
    except KeyError:
        return False
        
    def check(indices):
        p = 1
        for i in indices: 
            p *= V[i]
        return p == 9699690

    for i in range(8):
        if not check(range(i*8, i*8+8)): return False
        if not check(range(i, 64, 8)): return False
        
    for i in range(4):
        for j in range(2):
            if not check([r*8+c for r in range(i*2, i*2+2) for c in range(j*4, j*4+4)]):
                return False
                
    C = [
        (0, 'WOLFRAMS'),
        (8, 'RAMS'),
        (16, 'OLFWAMSR'),
        (24, 'AMSROLFW'),
        (32, 'LFWOMSRA'),
        (56, 'SRAMFWOL')
    ]
    for idx, s in C:
        if x[idx:idx+len(s)] != s: 
            return False
        
    return True
"WOLFRAMSRAMSWOLFOLFWAMSRAMSROLFWLFWOMSRALFWOFWOLSRAMSRAMFWOL"
"WOLFRAMSRAMSWOLFOLFWAMSRAMSROLFWLFWOMSRAMSRALFWOFWOLSRAMSRAMFWOL"
Proposer: gemini-3.1-pro-preview Solver: gemini-3-flash-preview
-2 vs 2
#5 Solved
def mystery(x):
    if not isinstance(x, str) or len(x) != 12 or not x.isdigit():
        return False
    
    # Part 1: Recursive additive check
    # We treat the string as six 2-digit numbers
    v = [int(x[i:i+2]) for i in range(0, 12, 2)]
    
    # Each number (after the first two) must be the modular sum of the previous two
    if any(v[i] != (v[i-1] + v[i-2]) % 100 for i in range(2, 6)):
        return False
    
    # Part 2: Statistical constraints
    # The sum and product of these six integers must match specific targets
    if sum(v) != 348 or (v[0] * v[1]) != 1656:
        return False
        
    # Part 3: Block-wise product constraint
    # We partition the string into three 4-digit integers and check their product
    m = [int(x[i:i+4]) for i in range(0, 12, 4)]
    return (m[0] * m[1] * m[2]) == 141354223596
"237295676229"
"237295676229"
Proposer: gemini-3-flash-preview Solver: gemini-3.1-pro-preview
-2 vs 2
#6 Solved
def mystery(x):
    if not isinstance(x, str) or len(x) > 38:
        return False
        
    tape = [0] * 100
    ptr = 0
    out = ""
    loops = {}
    stack = []
    
    for i, c in enumerate(x):
        if c == '[':
            stack.append(i)
        elif c == ']':
            if not stack:
                return False
            start = stack.pop()
            loops[start] = i
            loops[i] = start
            
    if stack:
        return False
        
    pc = 0
    ticks = 0
    while pc < len(x) and ticks < 5000:
        c = x[pc]
        if c == '>': ptr = (ptr + 1) % 100
        elif c == '<': ptr = (ptr - 1) % 100
        elif c == '+': tape[ptr] = (tape[ptr] + 1) % 256
        elif c == '-': tape[ptr] = (tape[ptr] - 1) % 256
        elif c == '.': out += chr(tape[ptr])
        elif c == '[' and tape[ptr] == 0: pc = loops[pc]
        elif c == ']' and tape[ptr] != 0: pc = loops[pc]
        
        pc += 1
        ticks += 1
        
    return out == "Z3"
"++++++++++[>+++++++++>+++++<<-]>.>+."
"++++++++++[>+++++++++>+++++<<-]>.>+."
Proposer: gemini-3.1-pro-preview Solver: gemini-3-flash-preview
-2 vs 2
#7 Solved
def mystery(x):
    if not isinstance(x, str) or len(x) != 16:
        return False
    
    # Check for 16 unique characters from 'A' to 'P'
    if len(set(x)) != 16 or any(ord(c) < 65 or ord(c) > 80 for c in x):
        return False
        
    v = [ord(c) for c in x]
    
    # Calculate sums of each row, column, and the two main diagonals
    # For a 16-character string representing a 4x4 magic square
    rows = [sum(v[i*4 : i*4+4]) for i in range(4)]
    cols = [sum(v[i::4]) for i in range(4)]
    diags = [sum(v[i*5] for i in range(4)), sum(v[i*3+3] for i in range(4))]
    
    # All sums must equal the magic constant for the character set 'A' through 'P'
    if any(s != 290 for s in rows + cols + diags):
        return False
        
    # Geometric constraint on the product of the four corner elements
    if v[0] * v[3] * v[12] * v[15] != 27227200:
        return False
        
    # Permutation-specific weighted sum constraint
    return sum((i + 1) * v[i] for i in range(16)) == 9860
"PBCMEKJHIGFLDNOA"
"PCBMEJKHIFGLDONA"
Proposer: gemini-3-flash-preview Solver: gemini-3.1-pro-preview
-2 vs 2
#8 Solved
def mystery(x):
    if not isinstance(x, str) or len(x) > 43:
        return False
        
    tape = [0] * 300
    ptr = 0
    out = ""
    loops = {}
    stack = []
    
    for i, c in enumerate(x):
        if c == '[':
            stack.append(i)
        elif c == ']':
            if not stack:
                return False
            start = stack.pop()
            loops[start] = i
            loops[i] = start
            
    if stack:
        return False
        
    pc = 0
    ticks = 0
    while pc < len(x) and ticks < 10000:
        c = x[pc]
        if c == '>': ptr = (ptr + 1) % 300
        elif c == '<': ptr = (ptr - 1) % 300
        elif c == '+': tape[ptr] = (tape[ptr] + 1) % 256
        elif c == '-': tape[ptr] = (tape[ptr] - 1) % 256
        elif c == '.': out += chr(tape[ptr])
        elif c == '[' and tape[ptr] == 0: pc = loops[pc]
        elif c == ']' and tape[ptr] != 0: pc = loops[pc]
        
        pc += 1
        ticks += 1
        
    return out == "aeimquy"
"-[>++<-----]>---------<+++++++[>++++.<-]"
"+++++++[>+>++++++++++++++<<-]>>-<[>.++++<-]"
Proposer: gemini-3.1-pro-preview Solver: gemini-3-flash-preview
-2 vs 2
#9 Solved
def mystery(x):
    if not isinstance(x, str) or len(x) != 16:
        return False
    
    # Check if x is a permutation of a specific set of 16 characters
    required_chars = ['1', '2', '3', '4', '5', 'F', 'H', 'I', 'N', 'N', 'O', 'P', 'S', 'T', 'U', 'Y']
    if sorted(x) != required_chars:
        return False
        
    v = [ord(c) for c in x]
    
    # Constraint 1: Row-wise XOR sums for each 4-character block
    rows_xor = [v[i*4] ^ v[i*4+1] ^ v[i*4+2] ^ v[i*4+3] for i in range(4)]
    if rows_xor != [21, 27, 108, 0]:
        return False
        
    # Constraint 2: Column-wise arithmetic sums in the 4x4 grid
    cols_sum = [sum(v[i::4]) for i in range(4)]
    if cols_sum != [279, 303, 287, 257]:
        return False
        
    # Constraint 3: Arithmetic sums of the two main diagonals
    if (v[0] + v[5] + v[10] + v[15]) != 289 or (v[3] + v[6] + v[9] + v[12]) != 280:
        return False
        
    # Constraint 4: A specific weighted sum to ensure a unique permutation
    return sum((i + 1) * v[i] for i in range(16)) == 8754
"PYTHONISFUN12345"
"PYTHONISFUN12345"
Proposer: gemini-3-flash-preview Solver: gemini-3.1-pro-preview
-2 vs 2
#10 Solved
def mystery(x):
    # x must be a list of exactly 100 elements
    if type(x) is not list or len(x) != 100:
        return False
    
    # Must be a permutation of 0 through 99
    if len(set(x)) != 100 or min(x) != 0 or max(x) != 99:
        return False
        
    # Diagonal constraints (N-Queens)
    if len(set(i + x[i] for i in range(100))) != 100:
        return False
    if len(set(i - x[i] for i in range(100))) != 100:
        return False
        
    # Geometric structure constraints
    if sum(abs(x[i] - x[i+1]) for i in range(99)) != 295:
        return False
        
    # Weighted positional constraints
    if sum(i * x[i] for i in range(100)) != 285425:
        return False
        
    # Adjacent product constraints
    if sum(x[i] * x[i+1] for i in range(99)) != 318451:
        return False
        
    return True
[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98]
[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98]
Proposer: gemini-3.1-pro-preview Solver: gemini-3-flash-preview
-2 vs 2