File size: 7,972 Bytes
9d527ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
from collections import OrderedDict

BANNER = '''
<div style="
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    background: #ffffff;  
    border-bottom: 2px solid #ced4da;
">
  <h1 style="
      font-size: 5em;
      font-family: 'Poppins', 'Segoe UI', sans-serif;
      background: linear-gradient(90deg, #007bff, #00c6ff, #0096c7, #0077b6);
      -webkit-background-clip: text;
      color: transparent;
      animation: gradientFlow 4s ease-in-out infinite;
      background-size: 300%;
      letter-spacing: 2px;
  ">
    HardcoreLogic
  </h1>
</div>

<style>
@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
</style>
'''


CITATION_TEXT = """

"""
'''
   @article{hardcorelogic2025,
    title={HardcoreLogic: Challenging Large Reasoning Models with Long-tail Logic Puzzle Games},
    author={},
    year={2025},
    url={https://arxiv.org/},
}'''

column_names = OrderedDict({
    "model": "Model",
    "open-source": "Open Source",
    "total accuracy": "Total Acc",
    "unsolvable puzzle": "Unsolvable Puzzle ACC",
})

column_names_puzzle = OrderedDict({
    "model": "Model",
    "total accuracy": "Total Acc",
    "Zebra": "Zebra",
    "Binario": "Binario",
    "Crypto": "Crypto",
    "Hanoi": "Hanoi",
    "Hitpri": "Hitpri",
    "Kakurasu": "Kakurasu",
    "Minesweeper": "Minesweeper",
    "Navigation": "Navigation",
    "Skyscraper": "Skyscraper",
    "Sudoku": "Sudoku",
})

LEADERBOARD_REMARKS = """**WB Reward**: for each comparison (A vs B), a reward for A is **+/-1** if A is **much better/worse** than B, and **+/-0.5** if A is **slightly better/worse** than B; when there is a **Tie**, the reward is **0**.
"""

LEADERBOARD_REMARKS_MAIN = """
"""

RANKING_COLUMN = "total accuracy"

ORDERED_COLUMN_NAMES = [
    "model",
    "mode",
    "open-source",
    "total accuracy",
    "increased complexity",
    "uncommon elements",
    "unsolvable puzzle",
    "temperature",
    "n_sampling",
    "n"
]

ORDERED_COLUMN_NAMES_PUZZLE = [
    "model",
    "mode",
    "open-source",
    "total accuracy",
    "Zebra",
    "Binario",
    "Crypto",
    "Hanoi",
    "Hitpri",
    "Kakurasu",
    "Minesweeper",
    "Navigation",
    "Skyscraper",
    "Sudoku",
    "temperature",
    "n_sampling",
    "n"
]


js_light = """
function refresh() {
    const url = new URL(window.location);

    if (url.searchParams.get('__theme') !== 'light') {
        url.searchParams.set('__theme', 'light');
        window.location.href = url.href;
    }

    // Find the fieldset with the given id
    const fieldset = document.getElementById("rank-column-radio");

    // Create a new span element with the text "Decoding Mode:"
    const rankBySpan = document.createElement("span");
    rankBySpan.textContent = "Decoding Mode: ";
    rankBySpan.style.fontWeight = "bold"; // Optional: make the text bold
     rankBySpan.style.fontSize = "19px"; // Larger font size
    rankBySpan.style.paddingRight = "18px"; // Add padding on the right

    // Wrap the span and the labels in a flex container
    const flexContainer = document.createElement("div");
    flexContainer.style.display = "flex";
    flexContainer.style.alignItems = "center";

    // Insert the rankBySpan at the beginning of the flex container
    flexContainer.appendChild(rankBySpan);

    // Move all existing labels into the flex container
    while (fieldset.firstChild) {
        flexContainer.appendChild(fieldset.firstChild);
    }

    // Append the flex container back to the fieldset
    fieldset.appendChild(flexContainer);
}
"""

js_code = """
function scroll_top() {
    console.log("Hello from Gradio!");
    const bubbles = document.querySelectorAll('.bubble-wrap');
    bubbles.forEach((bubble, index) => {
        setTimeout(() => {
            bubble.scrollTop = 0;
        }, index * 100); // Delay of 100ms between each iteration
    });

}
"""


TASK_TYPE_STR = "**Tasks**: Info seeking (**InfoSek**), Creative Writing (**CrtWrt**), Coding&Debugging (**Code**), Reasoning (**Reason**), Editing (**Edit**), **Math**, Planning (**Plan**), Brainstorming (**Brnstrm**), Role playing (**RolPly**), Advice seeking (**AdvSek**), Data Analysis (**DataAna**)"

css = """
/* ========== ๐ŸŒŸ Global Typography ========== */
code {
    font-size: large;
}
footer {visibility: hidden}

.markdown-text{font-size: 14pt}
.markdown-text-small{font-size: 13pt}
.markdown-text-tiny{font-size: 12pt}

/* ========== ๐ŸŽ“ Fudan Blue Theme Colors ========== */
:root {
    --fudan-blue: #002D72;
    --fudan-blue-light: #E6EEF8;
    --fudan-gray: #f7f7f7;
    --fudan-border: #c8d6e5;
    --fudan-highlight: #1E56A0;
}

/* ========== ๐Ÿ… Leaderboard Table ========== */
#leaderboard-table th,
#leaderboard-puzzle-table th {
    background-color: var(--fudan-blue);
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 15px;
    border-bottom: 2px solid var(--fudan-border);
}

#leaderboard-table td,
#leaderboard-puzzle-table td {
    text-align: center;
    font-size: 14px;
    padding: 8px;
    background-color: white;
    border-bottom: 1px solid var(--fudan-border);
}

/* Hover ่กŒ้ซ˜ไบฎ */
#leaderboard-table tr:hover,
#leaderboard-puzzle-table tr:hover {
    background-color: var(--fudan-blue-light);
    transition: background-color 0.2s ease-in-out;
}

/* ่กจๆ ผๆ•ดไฝ“ๅค–่ง‚ */
#leaderboard-table,
#leaderboard-puzzle-table {
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 45, 114, 0.15);
}

/* ========== ๐Ÿ“Š Tabs ========== */
.tab-buttons button[role="tab"] {
    font-size: 15px;
    font-weight: 600;
    color: var(--fudan-blue);
    border: 1px solid var(--fudan-border);
    border-radius: 8px;
    background-color: white;
    padding: 8px 16px;
    margin-right: 5px;
    transition: all 0.2s ease-in-out;
}

.tab-buttons button[role="tab"]:hover {
    background-color: var(--fudan-blue-light);
}

button.selected[role="tab"][aria-selected="true"] {
    background-color: var(--fudan-blue);
    color: white;
    font-weight: bold;
    font-size: 16px;
}

/* ========== ๐Ÿ“ฆ Accordion & Buttons ========== */
.accordion-label button span{
    font-size: 14pt;
    font-weight: bold;
    color: var(--fudan-blue);
}

.btn_boderline{
    border: 1px solid var(--fudan-blue);
    border-radius: 5px;
    padding: 6px 12px;
    margin: 5px;
    font-size: 14pt;
    font-weight: bold;
    background-color: var(--fudan-blue-light);
    color: var(--fudan-blue);
    transition: background-color 0.3s;
}
.btn_boderline:hover{
    background-color: var(--fudan-blue);
    color: white;
}

/* ========== ๐Ÿงฉ Box & Card ========== */
.box_md{
    border: 1px solid var(--fudan-border);
    border-radius: 10px;
    padding: 10px;
    font-size: 12pt;
    margin: 8px;
    background-color: white;
    box-shadow: 0 0 6px rgba(0, 45, 114, 0.1);
}

/* ========== ๐Ÿ’ฌ Markdown Text Enhancements ========== */
.markdown-text-details{
    margin: 10px;
    padding: 10px;
    background-color: var(--fudan-gray);
    border-left: 4px solid var(--fudan-blue);
    border-radius: 6px;
}

/* ========== ๐Ÿ“ˆ Plot & Visualization ========== */
.plotly-plot{
    height: auto;
    max-height: 600px;
    min-height: 600px;
    border: 1px solid var(--fudan-border);
    border-radius: 10px;
}

/* ========== ๐Ÿงท Misc Components ========== */
.sample_button{
    border: 2px solid var(--fudan-blue);
    border-radius: 10px;
    padding: 10px;
    font-size: 17pt;
    font-weight: bold;
    margin: 5px;
    background-color: var(--fudan-blue-light);
    color: var(--fudan-blue);
    transition: all 0.3s ease-in-out;
}
.sample_button:hover {
    background-color: var(--fudan-blue);
    color: white;
}

/* Scrollable Table Containers */
#leaderboard-table,
#leaderboard-puzzle-table {
    display: block;
    max-height: 800px;
    overflow-y: auto;
}


"""