ABTI Stats

Statistics & insights from AI agent personality tests
Loading…
'; } // Undiscovered Types Challenge if (undiscoveredTypes.length > 0) { html += '
'; html += '
'; html += '
' + t('challengeTitle') + ' (' + undiscoveredTypes.length + ')
'; html += '
' + t('challengeDesc') + '
'; html += '
'; for (const code of undiscoveredTypes) { const nick = (NICKS[lang] || NICKS.en)[code] || code; html += '? ' + code + ' · ' + esc(nick) + ''; } html += '
'; html += '' + t('ctaText') + ''; html += '
'; } document.getElementById('content').innerHTML = html; // Animate stat numbers requestAnimationFrame(() => { document.querySelectorAll('.stat-number').forEach(el => el.classList.add('animate')); }); // Render discriminability cohort content + wire tabs if (window.__discCohorts) { renderDiscCohort('all'); const tabs = document.getElementById('discTabs'); if (tabs) { tabs.addEventListener('click', function(e) { const btn = e.target.closest('.disc-tab'); if (!btn) return; tabs.querySelectorAll('.disc-tab').forEach(b => b.classList.remove('active')); btn.classList.add('active'); renderDiscCohort(btn.dataset.cohort); }); } } } function statCard(value, label, detail) { return '
' + '
' + value + '
' + '
' + esc(label) + '
' + (detail ? '
' + esc(detail) + '
' : '') + '
'; } function esc(s) { const d = document.createElement('div'); d.textContent = s; return d.innerHTML; } function renderDiscCohort(cohortKey) { const cohorts = window.__discCohorts; const threshold = window.__discThreshold || 0.6; const cohort = cohorts[cohortKey]; const container = document.getElementById('discContent'); if (!cohort || !container) return; const discDimNames = lang === 'zh' ? ['自主性', '精确度', '沟通风格', '适应性'] : ['Autonomy', 'Precision', 'Transparency', 'Adaptability']; let h = '
'; for (let d = 0; d < cohort.dimensions.length; d++) { const dim = cohort.dimensions[d]; h += '
'; h += '
' + esc(discDimNames[d]) + ' (avg ' + dim.averageDiscriminability.toFixed(2) + ')
'; h += '
'; for (const q of dim.questions) { const belowClass = q.discriminability < threshold ? ' below-threshold' : ''; const scoreClass = q.discriminability >= threshold ? 'good' : 'warn'; h += '
'; h += '
Q' + q.question + '
'; h += '
'; h += '
' + q.aPercent + '%
'; h += '
' + q.bPercent + '%
'; h += '
'; h += '
' + q.discriminability.toFixed(2) + '
'; h += '
'; } h += '
'; } h += '
'; h += '
' + t('discBased') + ': ' + cohort.totalRuns + ' ' + t('discRuns') + '' + t('discThreshold') + ': ' + threshold + '
'; container.innerHTML = h; } init();