⚡ Rootformer-Code v25 (Stage 25.2 + KhalilSWE v3.6) vs. Qwen4-35B-A3B

100% Live Browser HTML5 / Canvas / SVG Outputs & Unseen SWE-bench Shootout — Same Hardware (A100-80GB), Same Prompts

SWE-bench Verified 100
62.0% (62/100)
63.2% Unseen · 6.2× vs Vanilla Qwen3.8-27B (10%)
Unseen SWE-HO6 vs Qwen4
4/6 vs 3/6
Ours 66.7% beats Qwen4-35B-A3B ReAct (50.0%)
Qwen4 + Our KhalilSWE v3.6
5/6 (83.3%)
+33.3 pts lift & 100% patch rate on Qwen4 itself!
Dev-615 + Turāth-40 Arabic
81.63% / 75.0%
502/615 OOF (ECE 0.0413) · +7.5 pts Arabic Fast
Prompt: Single-file HTML5 Canvas simulation of 18 glowing physics balls with gravity, elasticity, trails, and HUD inside a rotating neon hexagon.
Result: Ours achieved 33.0 FPS with a crisp zero-overlap HUD vs Qwen4's 21.5 FPS, overlapping energy text, and smeared outline.
OURS Rootformer Stage 25.2 (Qaṭʿ · 39.5s) 33.0 FPS · WIN
QWEN4 Qwen4-35B-A3B (35.6s · 21.5 FPS)
Prompt: Single-file dark glassmorphism Autonomous Software Engineering Agent Telemetry Card (equal 10,240-token output cap for both models).
Result: Both finished 100% cleanly (finish=stop, 0 JS errors) — Ours (Forge-7, 7,088 tok) rendered all 4 sparkline KPI cards, dual-series bar+trendline chart, and PR pills in fewer tokens than Qwen4 (Aurora-7, 7,800 eval tok).
OURS Rootformer Stage 25.2 (7,088 tok · Clean Finish) 100% COMPLETE
QWEN4 Qwen4-35B-A3B (7,800 eval tok · Clean Finish)
Prompt: Single-file HTML5 animated scene of a pelican actively pedaling a bicycle along a parallax coastal boardwalk at sunset with Speed slider, Pause toggle, and live FPS readout (equal 10,240-token answer cap).
Result: Both animate smoothly with 0 JS errors — Ours runs at 40 FPS using 2.1× fewer tokens (6,567 vs 13,805 eval tok); Qwen4 runs at 46 FPS with a larger pelican throat pouch.
OURS Rootformer Stage 25.2 (40 FPS · 6,567 tok) 2.1× LEANER
QWEN4 Qwen4-35B-A3B (46 FPS · 13,805 eval tok)
Unseen SWE-HO6 (3 Django + 3 SymPy from heldout10): Graded zero-Docker against official hidden FAIL_TO_PASS + PASS_TO_PASS suites under an identical 16-turn cap.
Unseen GitHub Issue Qwen3.8-27B + ReAct Qwen4-35B-A3B + ReAct Ours (27B + KhalilSWE v3.6) Bonus: Qwen4-35B-A3B + Our KhalilSWE v3.6
django__django-14725FAILFAILFAILFAIL
django__django-14771FAILPASSPASSPASS
django__django-14787FAILPASSPASSPASS
sympy__sympy-22456FAILFAILPASSPASS
sympy__sympy-22914FAILPASSPASSPASS
sympy__sympy-23262FAILFAILFAILPASS
Total Resolved 0 / 6 (0.0%) 3 / 6 (50.0%) 4 / 6 (66.7%) 5 / 6 (83.3%)
1. Unseen Multi-Library BigCodeBench-Hard (RandomForest / pandas / matplotlib): Both passed 5/5 official unittests; Ours is 3× leaner (1,040 chars vs 3,113 chars).
OURS · 5/5 PASS Stage 25.2 (1,040 chars)
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
import seaborn as sns
import matplotlib.pyplot as plt

def task_func(df, target_column):
    # Separate features and target
    X = df.drop(columns=[target_column])
    y = df[target_column]
    
    # Train Random Forest Classifier
    clf = RandomForestClassifier()
    clf.fit(X, y)
    
    # Get feature importances
    feature_importances = clf.feature_importances_
    
    # Create a dataframe for sorting
    importance_df = pd.DataFrame({
        'Feature': X.columns,
        'Importance': feature_importances
    })
    
    # Sort in descending order
    importance_df = importance_df.sort_values(by='Importance', ascending=False).reset_index(drop=True)
    
    # Plot horizontal bar plot
    fig, ax = plt.subplots()
    sns.barplot(x='Importance', y='Feature', data=importance_df, ax=ax)
    ax.set_xlabel('Feature Importance Score')
    ax.set_ylabel('Features')
    ax.set_title('Visualizing Important Features')
    
    return clf, ax
QWEN4 · 5/5 PASS Qwen4-35B-A3B (3,113 chars)
import pandas as pd
import numpy as np
from sklearn.ensemble import RandomForestClassifier
import seaborn as sns
import matplotlib.pyplot as plt


def task_func(df, target_column):
    """
    Train a Random Forest classifier on a dataframe (using `target_column` as the
    label) and plot the feature importances as a horizontal bar plot.

    Parameters
    ----------
    df : pandas.DataFrame
        The dataframe containing the features and the column of interest.
    target_column : str
        The name of the column used as the classification target.

    Returns
    -------
    (sklearn.ensemble.RandomForestClassifier, matplotlib.axes.Axes)
        The trained random forest classifier and the Axes object of the
        plotted bar chart.
    """
    # ------------------------------------------------------------------
    # 1. Split the data into features (X) and target (y)
    # ------------------------------------------------------------------
    X = df.drop(columns=[target_column])
    y = df[target_column]

    # ------------------------------------------------------------------
    # 2. Encode any non numeric (categorical / boolean) feature columns so
    #    that the random forest can consume them.
    # ------------------------------------------------------------------
    non_numeric = X.select_dtypes(include=["object", "category", "bool", "string"]).columns
    if len(non_numeric) > 0:
        X = pd.get_dummies(X, columns=list(non_numeric))

    # ------------------------------------------------------------------
    # 3. Train the random forest classifier
    # ------------------------------------------------------------------
    clf = RandomForestClassifier()
    clf.fit(X, y)

    # ------------------------------------------------------------------
    # 4. Collect and sort the feature importances in descending order
    # ------------------------------------------------------------------
    importances = clf.feature_importances_
    feature_names = np.asarray(X.columns)

    sorted_idx = np.argsort(importances)[::-1]          # descending order
    sorted_importances = np.asarray(importances)[sorted_idx]
    sorted_features = feature_names[sorted_idx]

    # ------------------------------------------------------------------
    # 5. Plot: importances on the x-axis, feature names on the y-axis
    # ------------------------------------------------------------------
    fig, ax = plt.subplots(figsize=(10, 6))
    ax.barh(sorted_features, sorted_importances, color="skyblue", edgecolor="black")
    ax.set_xlabel("Feature Importance Score")
    ax.set_ylabel("Features")
    ax.set_title("Visualizing Important Features")
    fig.tight_layout()

    return clf, ax


if __name__ == "__main__":
    # Simple demo
    data = pd.DataFrame({
        "feature1": np.random.rand(100),
        "feature2": np.random.rand(100),
        "feature3": np.random.rand(100),
        "category": np.random.choice(["a", "b", "c"], 100),
        "target": np.random.choice([0, 1], 100),
    })
    model, axis = task_func(data, "target")
    plt.show()
2. Classical Arabic Turāth DAG & Lexicographical Kahn Validator: Both passed 10/10 hidden asserts; Ours is 40% leaner with zero stray debug prints (2,096 chars vs 3,456 chars).
OURS · 10/10 PASS Stage 25.2 (2,096 chars)
def analyze_isnad_dag(chains: list[list[str]], unreliable: set[str]) -> dict:
    from heapq import heappush, heappop

    nodes = set()
    edges = set()

    for chain in chains:
        for n in chain:
            nodes.add(n)
        for i in range(len(chain) - 1):
            edges.add((chain[i], chain[i + 1]))

    # Check for self-loops (direct cycle)
    for u, v in edges:
        if u == v:
            return {"valid_dag": False, "topological_order": [], "authentic_chains": 0, "longest_clean_path": 0}

    # Build adjacency and in-degree
    adj = {n: [] for n in nodes}
    in_degree = {n: 0 for n in nodes}
    for u, v in edges:
        adj[u].append(v)
        in_degree[v] += 1

    # Kahn's algorithm with lexicographic tie-breaking
    heap = [n for n in nodes if in_degree[n] == 0]
    heap.sort()
    topo = []
    while heap:
        u = heappop(heap)
        topo.append(u)
        for v in adj[u]:
            in_degree[v] -= 1
            if in_degree[v] == 0:
                heappush(heap, v)

    if len(topo) != len(nodes):
        return {"valid_dag": False, "topological_order": [], "authentic_chains": 0, "longest_clean_path": 0}

    # Authentic chains: non-empty and no narrator in unreliable
    authentic_chains = 0
    for chain in chains:
        if len(chain) > 0 and not any(n in unreliable for n in chain):
            authentic_chains += 1

    # Longest clean path (number of nodes) in subgraph of reliable nodes
    clean_nodes = {n for n in nodes if n not in unreliable}
    if not clean_nodes:
        longest_clean_path = 0
    else:
        dp = {n: 1 for n in clean_nodes}
        for u in topo:
            if u not in clean_nodes:
                continue
            for v in adj[u]:
                if v in clean_nodes:
                    if dp[u] + 1 > dp[v]:
                        dp[v] = dp[u] + 1
        longest_clean_path = max(dp.values())

    return {
        "valid_dag": True,
        "topological_order": topo,
        "authentic_chains": authentic_chains,
        "longest_clean_path": longest_clean_path
    }
QWEN4 · 10/10 PASS Qwen4-35B-A3B (3,456 chars)
import heapq


def analyze_isnad_dag(chains: list[list[str]], unreliable: set[str]) -> dict:
    """
    تحليل رسم الإسناد الموجّه المُجمَّع من كل سلاسل الإسناد.

    يعيد:
        {
          "valid_dag": bool,
          "topological_order": list[str],   # كسني أبجدي عند التساوي
          "authentic_chains": int,
          "longest_clean_path": int
        }
    """
    invalid = {
        "valid_dag": False,
        "topological_order": [],
        "authentic_chains": 0,
        "longest_clean_path": 0,
    }

    if unreliable is None:
        unreliable = set()

    nodes: set[str] = set()
    adj: dict[str, set] = {}
    indeg: dict[str, int] = {}
    edge_set: set[tuple[str, str]] = set()

    # ---- بناء الرسم البياني المُجمَّع (عقد + حواف فريدة) ----
    for chain in chains:
        if chain is None:
            continue
        chain = list(chain)
        if not chain:
            continue
        for name in chain:
            nodes.add(name)
            if name not in adj:
                adj[name] = set()
                indeg[name] = 0
        for a, b in zip(chain, chain[1:]):
            if a == b:
                # حلقة ذاتية => دورة موجهة حتماً
                adj.setdefault(a, set())
                indeg.setdefault(a, 0)
                if (a, b) not in edge_set:
                    edge_set.add((a, b))
                    adj[a].add(b)
                    indeg[b] += 1
                continue
            if (a, b) not in edge_set:
                edge_set.add((a, b))
                adj[a].add(b)
                indeg[b] += 1

    if not nodes:
        return {
            "valid_dag": True,
            "topological_order": [],
            "authentic_chains": 0,
            "longest_clean_path": 0,
        }

    # ---- خوارزمية كان مع أولوية صغرى (كسني أبجدي) ----
    heap = [n for n in nodes if indeg[n] == 0]
    heapq.heapify(heap)
    order: list[str] = []

    while heap:
        u = heapq.heappop(heap)
        order.append(u)
        for v in sorted(adj[u]):
            indeg[v] -= 1
            if indeg[v] == 0:
                heapq.heappush(heap, v)

    if len(order) != len(nodes):
        # توجد دورة موجهة (أو حلقة ذاتية)
        return invalid

    # ---- عدد السلاسل الصحيحة (خالية من الرواة غير الموثوقين) ----
    authentic_chains = 0
    for chain in chains:
        if chain is None:
            continue
        if not chain:
            continue
        ok = True
        for name in chain:
            if name in unreliable:
                ok = False
                break
        if ok:
            authentic_chains += 1

    # ---- أطول مسار موجّه يمر فقط برواة موثوقين (DP على الترتيب الطوبولوجي) ----
    dp: dict[str, int] = {}
    for u in order:
        if u in unreliable:
            continue
        if u not in dp:
            dp[u] = 1
        base = dp[u]
        for v in adj[u]:
            if v in unreliable:
                continue
            if dp.get(v, 0) < base + 1:
                dp[v] = base + 1

    longest_clean_path = max(dp.values()) if dp else 0

    return {
        "valid_dag": True,
        "topological_order": order,
        "authentic_chains": authentic_chains,
        "longest_clean_path": longest_clean_path,
    }


if __name__ == "__main__":
    print(analyze_isnad_dag([["مالك", "نافع", "ابن عمر"]], {"ابن عمر"}))
    print(analyze_isnad_dag([["أ", "ب"], ["ب", "أ"]], set()))
    print(analyze_isnad_dag([], set()))