File size: 87,018 Bytes
a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 52e6772 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 58bb04b a0524d0 7ff548f a0524d0 58bb04b a0524d0 7ff548f a0524d0 e8782ec 4f84b16 a0524d0 e8782ec 4f84b16 a0524d0 e8782ec 4f84b16 a0524d0 e8782ec 4f84b16 a0524d0 4f84b16 a0524d0 58bb04b a0524d0 58bb04b a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 52e6772 a0524d0 58bb04b a0524d0 52e6772 a0524d0 7ff548f a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 a36b0c6 a0524d0 58bb04b ce4b86c a0524d0 4f84b16 ce4b86c 4f84b16 ce4b86c a0524d0 4f84b16 ce4b86c 4f84b16 ce4b86c a0524d0 4f84b16 ce4b86c 4f84b16 a0524d0 4f84b16 a0524d0 4f84b16 a0524d0 4f84b16 a0524d0 4f84b16 58bb04b 4f84b16 58bb04b a0524d0 4f84b16 a0524d0 4f84b16 a0524d0 4f84b16 a0524d0 4f84b16 a0524d0 4f84b16 a0524d0 4f84b16 a0524d0 4f84b16 a0524d0 4f84b16 a0524d0 4f84b16 a0524d0 | 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 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>AdaptiveWorldEnv β ProthamD</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Outfit:wght@500;600;700&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
<style>
:root {
--bg: #09090b;
--surface: #18181b;
--surface2: #27272a;
--border: #3f3f46;
--text: #fafafa;
--text2: #a1a1aa;
--text3: #71717a;
--accent: #6366f1;
--accent-glow: rgba(99,102,241,0.15);
--green: #22c55e;
--orange: #f97316;
--blue: #3b82f6;
--pink: #ec4899;
--task-color: #60a5fa;
--belief-color: #fb923c;
--combined-color: #4ade80;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
background: var(--bg);
color: var(--text);
font-family: 'Inter', -apple-system, sans-serif;
font-size: 15px;
line-height: 1.7;
min-height: 100vh;
}
/* ββ Scrollbars (Firefox + WebKit) βββββββββββββββββ */
html {
scrollbar-width: thin;
scrollbar-color: rgba(99, 102, 241, 0.55) var(--surface);
}
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
background: var(--surface);
border-radius: 6px;
}
::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, rgba(99, 102, 241, 0.65) 0%, rgba(139, 92, 246, 0.45) 100%);
border-radius: 6px;
border: 2px solid var(--surface);
box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}
::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, rgba(129, 140, 248, 0.85) 0%, rgba(167, 139, 250, 0.55) 100%);
}
::-webkit-scrollbar-corner {
background: var(--surface);
}
/* ββ NAV ββββββββββββββββββββββββββββββββββββββββ */
nav {
position: sticky;
top: 0;
z-index: 100;
background: rgba(9,9,11,0.85);
backdrop-filter: blur(12px);
border-bottom: 1px solid var(--border);
padding: 0 max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px));
display: flex;
align-items: center;
gap: 8px;
height: 56px;
}
.nav-logo {
font-size: 14px;
font-weight: 600;
color: var(--text);
letter-spacing: -0.3px;
margin-right: 16px;
display: flex;
align-items: center;
gap: 8px;
}
.nav-logo .dot {
width: 8px; height: 8px;
background: var(--accent);
border-radius: 50%;
box-shadow: 0 0 8px var(--accent);
}
.nav-tabs {
display: flex;
gap: 2px;
flex: 1;
}
.nav-tab {
padding: 6px 14px;
border-radius: 6px;
border: none;
background: transparent;
color: var(--text3);
font-size: 13px;
font-weight: 500;
font-family: 'Inter', sans-serif;
cursor: pointer;
transition: all 0.15s ease;
letter-spacing: 0.01em;
}
.nav-tab:hover { color: var(--text2); background: var(--surface); }
.nav-tab.active {
color: var(--text);
background: var(--surface2);
}
.nav-right {
display: flex;
align-items: center;
gap: 8px;
}
.nav-toggle {
display: none;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 5px;
width: 44px;
height: 44px;
padding: 0;
margin: 0;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--surface);
cursor: pointer;
flex-shrink: 0;
-webkit-tap-highlight-color: transparent;
transition: border-color 0.15s, background 0.15s;
}
.nav-toggle:hover {
border-color: rgba(99, 102, 241, 0.45);
background: var(--surface2);
}
.nav-toggle span {
display: block;
width: 18px;
height: 2px;
border-radius: 1px;
background: var(--text2);
transition: transform 0.2s ease, opacity 0.2s ease;
}
nav.is-open .nav-toggle span:nth-child(1) {
transform: translateY(7px) rotate(45deg);
}
nav.is-open .nav-toggle span:nth-child(2) {
opacity: 0;
}
nav.is-open .nav-toggle span:nth-child(3) {
transform: translateY(-7px) rotate(-45deg);
}
.nav-backdrop {
display: none;
position: fixed;
inset: 0;
z-index: 99;
background: rgba(0, 0, 0, 0.55);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
}
.nav-backdrop.is-visible {
display: block;
}
.nav-badge {
padding: 3px 8px;
border-radius: 4px;
border: 1px solid var(--border);
font-size: 11px;
color: var(--text3);
font-family: 'JetBrains Mono', monospace;
}
.nav-badge.live { border-color: rgba(34,197,94,0.4); color: var(--green); }
.nav-badge.live::before { content: 'β '; font-size: 9px; }
/* ββ PANELS βββββββββββββββββββββββββββββββββββββ */
.panel { display: none; }
.panel.active { display: block; }
/* ββ HERO SECTION βββββββββββββββββββββββββββββββ */
.hero {
max-width: 760px;
margin: 72px auto 0;
padding: 0 24px 48px;
}
.hero-tag {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border: 1px solid rgba(99,102,241,0.3);
border-radius: 20px;
font-size: 11px;
color: var(--accent);
background: var(--accent-glow);
margin-bottom: 20px;
letter-spacing: 0.05em;
text-transform: uppercase;
font-weight: 500;
}
.hero h1 {
font-size: 42px;
font-weight: 700;
line-height: 1.15;
letter-spacing: -1px;
color: var(--text);
margin-bottom: 16px;
}
.hero h1 span { color: var(--accent); }
.hero-sub {
font-size: 16px;
color: var(--text2);
max-width: 560px;
line-height: 1.6;
margin-bottom: 28px;
}
.hero-meta {
display: flex;
gap: 20px;
flex-wrap: wrap;
}
.meta-item {
display: flex;
flex-direction: column;
gap: 2px;
}
.meta-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; }
.meta-value { font-size: 14px; font-weight: 500; color: var(--text2); font-family: 'JetBrains Mono', monospace; }
/* ββ BLOG CONTENT βββββββββββββββββββββββββββββββ */
.blog-content {
max-width: 700px;
margin: 0 auto;
padding: 0 24px 100px;
}
.blog-section {
margin-bottom: 48px;
}
.blog-section h2 {
font-size: 22px;
font-weight: 600;
color: var(--text);
letter-spacing: -0.5px;
margin-bottom: 12px;
padding-bottom: 10px;
border-bottom: 1px solid var(--border);
}
.blog-section h3 {
font-size: 16px;
font-weight: 600;
color: var(--text2);
margin: 20px 0 8px;
}
.blog-section p {
color: var(--text2);
margin-bottom: 14px;
font-size: 15px;
line-height: 1.75;
}
.blog-section code {
font-family: 'JetBrains Mono', monospace;
font-size: 13px;
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 4px;
padding: 1px 6px;
color: var(--accent);
}
.blog-section em { color: var(--text); font-style: italic; }
.callout {
background: var(--surface);
border: 1px solid var(--border);
border-left: 3px solid var(--accent);
border-radius: 0 8px 8px 0;
padding: 16px 20px;
margin: 20px 0;
font-size: 14px;
color: var(--text2);
}
.callout.green { border-left-color: var(--green); }
.callout.orange { border-left-color: var(--orange); }
.author-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px 24px;
margin-bottom: 40px;
display: flex;
align-items: center;
gap: 16px;
}
.author-avatar {
width: 44px; height: 44px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), #8b5cf6);
display: flex; align-items: center; justify-content: center;
font-size: 18px; font-weight: 700; color: white;
flex-shrink: 0;
}
.author-name { font-size: 15px; font-weight: 600; color: var(--text); }
.author-role { font-size: 12px; color: var(--text3); margin-top: 2px; }
.formula-box {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 16px 20px;
margin: 20px 0;
font-family: 'JetBrains Mono', monospace;
font-size: 13px;
color: var(--text);
text-align: center;
}
.formula-box .highlight { color: var(--accent); }
.formula-box .green { color: var(--green); }
.formula-box .orange { color: var(--orange); }
/* ββ TRAINING βββββββββββββββββββββββββββββββββββ */
.training-wrap {
max-width: 900px;
margin: 0 auto;
padding: 48px 24px 100px;
}
.training-header {
margin-bottom: 40px;
}
.training-header h2 {
font-size: 28px;
font-weight: 700;
letter-spacing: -0.5px;
color: var(--text);
margin-bottom: 8px;
}
.training-header p {
color: var(--text3);
font-size: 14px;
}
.stats-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 12px;
margin-bottom: 40px;
}
.stat-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 16px 18px;
transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); font-family: 'JetBrains Mono', monospace; }
.stat-delta { font-size: 12px; margin-top: 4px; }
.stat-delta.up { color: var(--green); }
.stat-delta.neutral { color: var(--text3); }
.chart-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin-bottom: 24px;
}
.chart-grid.single { grid-template-columns: 1fr; }
.chart-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.chart-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px;
}
.chart-card h4 {
font-size: 12px;
font-weight: 600;
color: var(--text3);
text-transform: uppercase;
letter-spacing: 0.08em;
margin-bottom: 16px;
}
.chart-wrap { position: relative; height: 220px; }
.chart-wrap.tall { height: 280px; }
.pipeline-section {
margin-top: 40px;
}
.pipeline-section h3 {
font-size: 16px;
font-weight: 600;
color: var(--text2);
margin-bottom: 16px;
letter-spacing: -0.3px;
}
.pipeline {
display: flex;
align-items: center;
gap: 0;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
overflow: hidden;
margin-bottom: 20px;
}
.pipe-step {
flex: 1;
padding: 16px;
text-align: center;
border-right: 1px solid var(--border);
position: relative;
}
.pipe-step:last-child { border-right: none; }
.pipe-step .pipe-label { font-size: 11px; color: var(--text3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.pipe-step .pipe-name { font-size: 15px; font-weight: 600; }
.pipe-step .pipe-detail { font-size: 11px; color: var(--text3); margin-top: 3px; font-family: 'JetBrains Mono', monospace; }
.pipe-step.sft .pipe-name { color: var(--green); }
.pipe-step.grpo .pipe-name { color: var(--accent); }
.pipe-step.dpo .pipe-name { color: var(--orange); }
.pipe-step.hf .pipe-name { color: var(--text2); }
.pipe-arrow {
width: 0; height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-left: 8px solid var(--border);
margin: 0 -1px;
flex-shrink: 0;
z-index: 1;
}
.img-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px;
margin-bottom: 20px;
}
.img-card h4 {
font-size: 12px;
font-weight: 600;
color: var(--text3);
text-transform: uppercase;
letter-spacing: 0.08em;
margin-bottom: 14px;
}
.img-card img {
width: 100%;
border-radius: 6px;
filter: brightness(0.95);
}
.correlation-note {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 18px 20px;
margin-top: 20px;
font-size: 13px;
color: var(--text2);
line-height: 1.6;
}
.correlation-note strong { color: var(--text); }
.correlation-note .r-val { color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; }
/* ββ README βββββββββββββββββββββββββββββββββββββ */
.readme-wrap {
max-width: 760px;
margin: 0 auto;
padding: 48px 24px 100px;
}
.readme-wrap h2 {
font-size: 22px;
font-weight: 700;
color: var(--text);
letter-spacing: -0.5px;
margin: 36px 0 12px;
padding-bottom: 8px;
border-bottom: 1px solid var(--border);
}
.readme-wrap h2:first-child { margin-top: 0; }
.readme-wrap h3 {
font-size: 16px;
font-weight: 600;
color: var(--text2);
margin: 22px 0 8px;
}
.readme-wrap p { color: var(--text2); margin-bottom: 12px; font-size: 14px; line-height: 1.7; }
.readme-wrap code {
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 4px;
padding: 1px 5px;
color: #a5b4fc;
}
.readme-wrap pre {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 16px 20px;
margin: 16px 0;
overflow-x: auto;
font-family: 'JetBrains Mono', monospace;
font-size: 12px;
color: var(--text2);
line-height: 1.6;
}
.readme-wrap pre code {
background: none;
border: none;
padding: 0;
color: inherit;
font-size: inherit;
}
.readme-table {
width: 100%;
border-collapse: collapse;
margin: 16px 0;
font-size: 13px;
}
.readme-table th {
background: var(--surface2);
padding: 8px 12px;
text-align: left;
font-weight: 600;
color: var(--text);
border: 1px solid var(--border);
}
.readme-table td {
padding: 8px 12px;
color: var(--text2);
border: 1px solid var(--border);
font-size: 13px;
}
.readme-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.readme-table td code { font-size: 11px; }
.readme-wrap ul {
margin: 8px 0 14px 0;
padding-left: 20px;
}
.readme-wrap li {
color: var(--text2);
margin-bottom: 6px;
font-size: 14px;
}
.readme-wrap li code { font-size: 11px; }
.contributions-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin: 16px 0;
}
.contrib-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 14px 16px;
font-size: 13px;
}
.contrib-num {
font-size: 11px;
font-weight: 700;
color: var(--accent);
font-family: 'JetBrains Mono', monospace;
margin-bottom: 4px;
}
.contrib-title { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.contrib-desc { color: var(--text3); font-size: 12px; }
.results-table-wrap {
margin: 16px 0;
}
.results-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.results-table-wrap th {
background: var(--surface2);
padding: 9px 12px;
text-align: left;
font-weight: 600;
color: var(--text);
border: 1px solid var(--border);
}
.results-table-wrap td {
padding: 8px 12px;
color: var(--text2);
border: 1px solid var(--border);
}
.results-table-wrap td.before { color: var(--text3); }
.results-table-wrap td.after { color: var(--green); font-weight: 500; }
.results-table-wrap td.neutral { color: var(--text2); }
/* ββ SPACE βββββββββββββββββββββββββββββββββββββ */
.space-wrap {
max-width: 700px;
margin: 0 auto;
padding: 80px 24px 100px;
text-align: center;
}
.space-icon {
width: 64px; height: 64px;
background: var(--accent-glow);
border: 1px solid rgba(99,102,241,0.3);
border-radius: 16px;
display: flex; align-items: center; justify-content: center;
font-size: 28px;
margin: 0 auto 24px;
}
.space-wrap h2 {
font-size: 24px;
font-weight: 700;
color: var(--text);
margin-bottom: 10px;
letter-spacing: -0.5px;
}
.space-wrap p { color: var(--text2); font-size: 15px; margin-bottom: 8px; }
.link-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
margin: 32px 0;
text-align: left;
}
.link-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 18px 20px;
text-decoration: none;
transition: border-color 0.15s, transform 0.15s;
display: block;
}
.link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.link-card .lc-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 6px; }
.link-card .lc-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.link-card .lc-url { font-size: 11px; color: var(--accent); font-family: 'JetBrains Mono', monospace; word-break: break-all; }
.endpoint-list {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
overflow: hidden;
margin: 20px 0;
text-align: left;
}
.endpoint-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
border-bottom: 1px solid var(--border);
font-size: 13px;
}
.endpoint-item:last-child { border-bottom: none; }
.method {
font-size: 10px;
font-weight: 700;
padding: 3px 7px;
border-radius: 4px;
font-family: 'JetBrains Mono', monospace;
min-width: 40px;
text-align: center;
}
.method.get { background: rgba(34,197,94,0.15); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.method.post { background: rgba(99,102,241,0.15); color: var(--accent); border: 1px solid rgba(99,102,241,0.3); }
.endpoint-path { font-family: 'JetBrains Mono', monospace; color: var(--text); font-size: 12px; flex: 1; }
.endpoint-desc { color: var(--text3); font-size: 12px; }
/* ββ EXPERIENCE / DRIFT LAB βββββββββββββββββββββββββββββββββ */
#panel-experience {
--x-glow: rgba(99, 102, 241, 0.35);
--x-warn: #f97316;
--x-ok: #22c55e;
}
.x-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px 80px; }
.x-hero {
position: relative;
text-align: center;
padding: 48px 0 36px;
overflow: hidden;
}
.x-hero::before {
content: '';
position: absolute;
inset: -40% -20%;
background:
radial-gradient(ellipse 50% 40% at 30% 30%, rgba(99,102,241,0.14), transparent),
radial-gradient(ellipse 45% 35% at 70% 60%, rgba(236,72,153,0.10), transparent),
radial-gradient(ellipse 40% 30% at 50% 80%, rgba(34,197,94,0.06), transparent);
animation: xMesh 14s ease-in-out infinite alternate;
pointer-events: none;
z-index: 0;
}
@keyframes xMesh {
0% { transform: translate(0, 0) scale(1); opacity: 1; }
100% { transform: translate(-3%, 2%) scale(1.05); opacity: 0.85; }
}
.x-hero > * { position: relative; z-index: 1; }
.x-eyebrow {
font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
color: var(--accent); margin-bottom: 14px;
animation: xFadeUp 0.7s ease both;
}
.x-hero h1 {
font-family: 'Outfit', system-ui, sans-serif;
font-size: clamp(2rem, 5vw, 3.1rem);
font-weight: 700;
letter-spacing: -0.04em;
line-height: 1.12;
margin-bottom: 16px;
background: linear-gradient(120deg, #fafafa 0%, #a5b4fc 45%, #f472b6 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
animation: xFadeUp 0.75s ease 0.08s both;
}
.x-lead {
color: var(--text2);
font-size: 1.05rem;
max-width: 560px;
margin: 0 auto;
line-height: 1.65;
animation: xFadeUp 0.8s ease 0.15s both;
}
@keyframes xFadeUp {
from { opacity: 0; transform: translateY(14px); }
to { opacity: 1; transform: translateY(0); }
}
.x-stage {
display: grid;
grid-template-columns: 1fr minmax(72px, 100px) 1fr;
gap: 12px;
align-items: center;
margin: 32px 0 28px;
min-height: 168px;
}
/* Stacked layout on narrow screens β keep beam horizontal (rotating 90Β° made width:100% a tall vertical line). */
@media (max-width: 768px) {
.x-stage {
grid-template-columns: 1fr;
gap: 14px;
min-height: 0;
}
.x-beam-wrap {
transform: none;
min-height: 16px;
margin: 2px 0;
}
.x-beam {
width: min(148px, 42vw);
max-width: 148px;
margin-left: auto;
margin-right: auto;
}
}
.x-node {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
padding: 20px 22px;
transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
.x-node.x-pulse {
border-color: rgba(99,102,241,0.45);
box-shadow: 0 0 40px rgba(99,102,241,0.12);
}
.x-node-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text3); margin-bottom: 6px; }
.x-node-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.x-node-sub { font-size: 12px; color: var(--text3); line-height: 1.45; }
.x-beam-wrap { display: flex; align-items: center; justify-content: center; position: relative; }
.x-beam {
height: 4px; width: 100%; border-radius: 4px;
background: linear-gradient(90deg, rgba(99,102,241,0.15), var(--accent), rgba(236,72,153,0.5));
position: relative;
overflow: hidden;
}
.x-beam::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
animation: xShine 2.2s ease-in-out infinite;
}
@keyframes xShine {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
.x-beam.x-drift {
animation: xDriftPulse 0.6s ease 2;
box-shadow: 0 0 20px rgba(249,115,22,0.5);
}
@keyframes xDriftPulse {
0%, 100% { filter: brightness(1); }
50% { filter: brightness(1.5) hue-rotate(-15deg); }
}
.x-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 28px; }
.x-btn {
font-family: inherit;
font-size: 13px;
font-weight: 600;
padding: 10px 20px;
border-radius: 10px;
border: 1px solid var(--border);
cursor: pointer;
transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.x-btn-primary {
background: var(--accent);
color: #fff;
border-color: transparent;
}
.x-btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.x-btn-ghost { background: var(--surface); color: var(--text2); }
.x-btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.x-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.x-split {
display: grid;
grid-template-columns: 1fr 1.1fr;
gap: 20px;
align-items: start;
}
@media (max-width: 900px) { .x-split { grid-template-columns: 1fr; } }
.x-steps { display: flex; flex-direction: column; gap: 10px; }
.x-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 14px 16px;
text-align: left;
transition: opacity 0.35s, transform 0.35s, border-color 0.35s;
opacity: 0.38;
transform: scale(0.985);
}
.x-card.x-active {
opacity: 1;
transform: scale(1);
border-color: rgba(99,102,241,0.4);
box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.x-card.x-done { opacity: 0.65; transform: scale(1); border-color: rgba(34,197,94,0.25); }
.x-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.x-card-n {
font-size: 10px; font-weight: 800;
width: 22px; height: 22px; border-radius: 6px;
background: rgba(99,102,241,0.15); color: var(--accent);
display: flex; align-items: center; justify-content: center;
}
.x-card h4 { font-size: 14px; font-weight: 600; color: var(--text); }
.x-card p { font-size: 12px; color: var(--text3); line-height: 1.5; margin-top: 4px; }
.x-tag {
font-size: 10px; font-weight: 600;
padding: 2px 8px; border-radius: 999px;
font-family: 'JetBrains Mono', monospace;
margin-left: auto;
}
.x-tag.ok { background: rgba(34,197,94,0.15); color: var(--green); }
.x-tag.err { background: rgba(249,115,22,0.15); color: var(--orange); }
.x-tag.info { background: rgba(99,102,241,0.12); color: var(--accent); }
.x-terminal {
background: #0c0c0f;
border: 1px solid #27272a;
border-radius: 14px;
padding: 18px;
min-height: 280px;
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
line-height: 1.55;
color: #a1a1aa;
position: relative;
overflow: hidden;
}
.x-terminal-hdr {
display: flex; align-items: center; gap: 8px;
margin-bottom: 14px;
padding-bottom: 10px;
border-bottom: 1px solid #27272a;
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.1em;
color: #71717a;
}
.x-terminal-hdr span.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.x-term-line { margin-bottom: 10px; white-space: pre-wrap; word-break: break-word; }
.x-term-k { color: #a78bfa; }
.x-term-s { color: #4ade80; }
.x-term-e { color: #fb923c; }
.x-live-out {
margin: 0 0 28px;
padding: 18px 20px;
background: linear-gradient(145deg, rgba(24, 24, 27, 0.98), rgba(39, 39, 42, 0.35));
border: 1px solid rgba(99, 102, 241, 0.22);
border-radius: 14px;
font-size: 13px;
color: var(--text2);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.x-live-out.x-live-busy {
border-color: rgba(99, 102, 241, 0.45);
box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.12), 0 16px 48px rgba(99, 102, 241, 0.08);
}
.x-live-out.x-live-done {
border-color: rgba(34, 197, 94, 0.28);
}
.x-live-out.x-live-fail {
border-color: rgba(249, 115, 22, 0.35);
}
.x-live-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
margin-bottom: 10px;
}
.x-live-head strong { color: var(--text); }
.x-live-badge {
font-size: 10px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
padding: 4px 10px;
border-radius: 999px;
background: var(--surface2);
border: 1px solid var(--border);
color: var(--text3);
}
.x-live-badge.on { color: var(--accent); border-color: rgba(99, 102, 241, 0.4); background: var(--accent-glow); }
.x-live-badge.ok { color: var(--green); border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.1); }
.x-live-badge.err { color: var(--orange); border-color: rgba(249, 115, 22, 0.35); background: rgba(249, 115, 22, 0.08); }
.x-live-hint {
font-size: 12px;
color: var(--text3);
line-height: 1.55;
margin-bottom: 8px;
}
.x-live-hint code {
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
background: var(--surface2);
padding: 1px 6px;
border-radius: 4px;
color: var(--accent);
}
.x-live-status {
font-size: 12px;
color: var(--text2);
margin-bottom: 10px;
min-height: 1.2em;
}
.x-live-status em { color: var(--text); font-style: normal; font-weight: 600; }
.x-live-out pre {
margin: 0;
padding: 14px 16px;
background: #0c0c0f;
border: 1px solid #27272a;
border-radius: 10px;
overflow: auto;
font-size: 11px;
max-height: 260px;
line-height: 1.45;
font-family: 'JetBrains Mono', monospace;
color: #a1a1aa;
scrollbar-width: thin;
scrollbar-color: rgba(99, 102, 241, 0.6) #18181b;
}
@media (prefers-reduced-motion: reduce) {
.x-hero::before, .x-beam::after, .x-beam.x-drift { animation: none; }
.x-card, .x-node { transition: none; }
.nav-tabs { transition: none; }
.nav-toggle span { transition: none; }
}
/* ββ Responsive layout (site-wide) βββββββββββββββββββββββββ */
img, video { max-width: 100%; height: auto; }
html { overflow-x: clip; }
@media (max-width: 900px) {
.chart-grid,
.chart-grid.three { grid-template-columns: 1fr !important; }
.contributions-grid { grid-template-columns: 1fr; }
.link-grid { grid-template-columns: 1fr; }
.training-wrap { padding: 32px 16px 72px; }
.training-header h2 { font-size: clamp(1.35rem, 5vw, 1.75rem); }
.readme-wrap { padding: 32px 16px 72px; }
.blog-content { padding: 0 16px 72px; }
.hero { margin-top: 40px; padding: 0 16px 40px; }
.space-wrap { padding: 48px 16px 72px; }
.results-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; margin-left: -4px; margin-right: -4px; padding: 0 4px; }
.results-table-wrap table { min-width: 480px; }
.readme-wrap .table-scroll {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin: 12px 0;
border-radius: 8px;
border: 1px solid var(--border);
}
.readme-wrap .table-scroll table { margin: 0; min-width: 520px; }
}
@media (max-width: 768px) {
body { font-size: 14px; }
nav {
padding: 10px 12px;
height: auto;
min-height: 52px;
flex-wrap: nowrap;
align-items: center;
position: relative;
z-index: 100;
}
.nav-logo {
font-size: 13px;
margin-right: 8px;
flex: 0 0 auto;
}
.nav-right {
margin-left: auto;
flex-shrink: 0;
}
.nav-toggle {
display: inline-flex;
margin-left: 8px;
order: 4;
}
.nav-logo { order: 1; }
.nav-right { order: 3; }
.nav-tabs {
order: 5;
flex: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
flex-direction: column;
align-items: stretch;
flex-wrap: nowrap;
gap: 2px;
max-height: 0;
overflow: hidden;
opacity: 0;
visibility: hidden;
padding: 0 12px;
margin: 0;
background: rgba(12, 12, 15, 0.98);
border-bottom: 1px solid transparent;
border-top: 1px solid var(--border);
box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
transition: max-height 0.32s ease, opacity 0.22s ease, padding 0.22s ease, visibility 0.22s;
}
nav.is-open .nav-tabs {
max-height: min(420px, 70vh);
opacity: 1;
visibility: visible;
padding: 10px 12px 16px;
overflow-y: auto;
border-bottom-color: var(--border);
-webkit-overflow-scrolling: touch;
}
.nav-tabs::-webkit-scrollbar { width: 4px; }
.nav-tab {
width: 100%;
text-align: left;
padding: 12px 16px;
font-size: 14px;
white-space: normal;
border-radius: 10px;
}
.nav-tab.active {
background: var(--surface2);
box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.35);
}
.hero h1 { font-size: clamp(1.65rem, 7.5vw, 2.25rem); letter-spacing: -0.03em; }
.author-card { flex-wrap: wrap; padding: 16px; }
.pipeline {
flex-direction: column;
align-items: stretch;
}
.pipe-step {
border-right: none;
border-bottom: 1px solid var(--border);
padding: 14px 16px;
text-align: left;
}
.pipe-step:last-child { border-bottom: none; }
.stat-card { padding: 14px; }
.stat-value { font-size: 18px; }
.chart-card { padding: 14px; }
.chart-wrap.tall { height: 240px; }
.endpoint-item {
flex-wrap: wrap;
gap: 8px;
}
.endpoint-desc { flex: 1 1 100%; font-size: 11px; }
.x-wrap { padding: 0 16px 56px; }
.x-hero { padding: 28px 0 24px; }
.x-lead { font-size: 0.95rem; padding: 0 4px; }
.x-controls { flex-direction: column; align-items: stretch; gap: 8px; }
.x-controls .x-btn { width: 100%; justify-content: center; text-align: center; }
.x-live-out { padding: 14px 16px; }
.x-node { padding: 16px; }
.x-card h4 { font-size: 13px; }
.x-card-top { flex-wrap: wrap; align-items: flex-start; }
.x-card-top .x-tag { margin-left: 0; }
.x-terminal { min-height: 220px; padding: 14px; font-size: 10px; }
}
@media (max-width: 480px) {
.nav-badge { font-size: 10px; padding: 2px 6px; }
.formula-box { font-size: 11px; padding: 12px 14px; }
.blog-section h2 { font-size: 18px; }
.readme-wrap h2 { font-size: 18px; }
.space-wrap h2 { font-size: 1.35rem; }
.x-card-top h4 { flex: 1 1 calc(100% - 32px); min-width: 0; }
}
</style>
</head>
<body>
<nav id="site-nav">
<div class="nav-logo">
<div class="dot"></div>
AdaptiveWorldEnv
</div>
<div class="nav-tabs" id="nav-tablist" role="tablist" aria-label="Main sections">
<button type="button" class="nav-tab active" role="tab" aria-selected="true" onclick="switchTab('experience', this)">Experience</button>
<button type="button" class="nav-tab" role="tab" aria-selected="false" onclick="switchTab('blog', this)">Blog</button>
<button type="button" class="nav-tab" role="tab" aria-selected="false" onclick="switchTab('training', this)">Training Runs</button>
<button type="button" class="nav-tab" role="tab" aria-selected="false" onclick="switchTab('readme', this)">README</button>
<button type="button" class="nav-tab" role="tab" aria-selected="false" onclick="switchTab('space', this)">Space / API</button>
</div>
<div class="nav-right">
<span class="nav-badge live">v2.0</span>
<span class="nav-badge">OpenEnv</span>
</div>
<button type="button" class="nav-toggle" id="navToggle" aria-label="Open menu" aria-expanded="false" aria-controls="nav-tablist" onclick="toggleNavDrawer(event)">
<span></span><span></span><span></span>
</button>
</nav>
<div class="nav-backdrop" id="navBackdrop" onclick="closeNavDrawer()" aria-hidden="true"></div>
<!-- ββββββββββββββββββββββββββββββββββββββββββββββββββ EXPERIENCE βββ -->
<div id="panel-experience" class="panel active">
<div class="x-wrap">
<header class="x-hero">
<p class="x-eyebrow">First-hand Β· No account required</p>
<h1>The world changes underneath you</h1>
<p class="x-lead">
Watch a real <strong style="color:var(--text);font-weight:600">easy_field_rename</strong> episode: two successful orders, then the API silently renames <code>qty</code> β <code>quantity</code> and requires <code>customer_id</code>. There is no announcement β only evidence.
</p>
</header>
<div class="x-stage">
<div class="x-node" id="xNodeAgent">
<div class="x-node-label">Agent</div>
<div class="x-node-title">Multi-step policy</div>
<div class="x-node-sub">Repeats the last known good request until reality disagrees.</div>
</div>
<div class="x-beam-wrap">
<div class="x-beam" id="xBeam" aria-hidden="true"></div>
</div>
<div class="x-node" id="xNodeApi">
<div class="x-node-label">Mock API</div>
<div class="x-node-title">POST /mock_api/orders</div>
<div class="x-node-sub" id="xApiSub">Dynamic schema β mutates at step 3 of the episode.</div>
</div>
</div>
<div class="x-controls">
<button type="button" class="x-btn x-btn-primary" id="xPlayBtn">Play walkthrough</button>
<button type="button" class="x-btn x-btn-ghost" id="xResetBtn">Reset</button>
<button type="button" class="x-btn x-btn-ghost" id="xLiveBtn">Run on this server</button>
</div>
<div class="x-live-out" id="xLiveOut">
<div class="x-live-head">
<strong>Live <code>/run_episode</code></strong>
<span class="x-live-badge" id="xLiveBadge">Ready</span>
</div>
<p class="x-live-hint">
Calls your FastAPI app on the <strong>same host and port</strong> as this page.
Opening the file directly (<code>file://</code>) will not work β use
<code>http://127.0.0.1:7860/</code> after <code>uvicorn server.app:app --port 7860</code>.
</p>
<p class="x-live-status" id="xLiveStatus">Click the button above to run a real <code>easy_field_rename</code> episode.</p>
<pre id="xLivePre">// JSON response will appear here</pre>
</div>
<div class="x-split">
<div class="x-steps" id="xSteps" aria-live="polite"></div>
<div class="x-terminal" id="xTerminal">
<div class="x-terminal-hdr"><span class="dot"></span> Episode trace β ecommerce order</div>
<div id="xTermBody"></div>
</div>
</div>
</div>
</div>
<!-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββ BLOG βββ -->
<div id="panel-blog" class="panel">
<div class="hero">
<div class="hero-tag">β¦ Hackathon Write-up</div>
<h1>Teaching Agents to<br><span>Understand Change</span></h1>
<p class="hero-sub">
What happens when the world your agent is operating in mutates mid-episode β no warning, no changelog? This is the problem AdaptiveWorldEnv was built to solve.
</p>
<div class="hero-meta">
<div class="meta-item">
<span class="meta-label">Author</span>
<span class="meta-value">ProthamD</span>
</div>
<div class="meta-item">
<span class="meta-label">Theme</span>
<span class="meta-value">3.1 + 5 (Wild Card)</span>
</div>
<div class="meta-item">
<span class="meta-label">Model</span>
<span class="meta-value">Qwen2.5-3B</span>
</div>
<div class="meta-item">
<span class="meta-label">Pipeline</span>
<span class="meta-value">SFT β GRPO β DPO</span>
</div>
</div>
</div>
<div class="blog-content">
<div class="author-card">
<div class="author-avatar">P</div>
<div>
<div class="author-name">Pratham</div>
<div class="author-role">3rd year B.Tech (IT), IIEST Shibpur Β· OpenEnv Hackathon</div>
</div>
</div>
<div class="blog-section">
<h2>The Problem Nobody Talks About</h2>
<p>Almost all of us have seen a Google Assistant demo β it schedules appointments, makes calls, books things. But when you say <em>"book a flight, also a hotel, and buy some products"</em> β it falls apart. There are several reasons. One of the biggest: the APIs agents depend on <strong>change</strong>, silently, mid-operation. No warning. No changelog. The agent has no idea.</p>
<div class="callout">
Suppose our agent is halfway through booking a flight and the API it was just successfully talking to decides to rename a field, or version its endpoint, or silently change what a response value <em>means</em>. No error β sometimes not even a 4xx. Just a 200 OK with a different meaning. And the agent keeps going, completely wrong, with full confidence.
</div>
<p>This is what AdaptiveWorldEnv is about.</p>
</div>
<div class="blog-section">
<h2>The Solution: A Picture of the World</h2>
<p>The solution I came up with is from a real-world reference β the way all of us work. When we do something wrong we figure out how we could have done it better. When playing a game, we don't know what the next level will bring. We go in, take actions, win or lose, and then figure out what it actually needed. We build a picture of the world in our head as we go.</p>
<p>So that is exactly what I gave the agent β a picture of the world. And to measure how accurate that picture is, I introduced a metric other than just REWARD:</p>
<div class="formula-box">
<span class="highlight">combined_reward</span> = <span class="green">0.7 Γ task_reward</span> + <span class="orange">0.3 Γ belief_accuracy</span>
</div>
<p><code>task_reward</code> tells us <em>if</em> the agent completed the task. <code>belief_accuracy</code> tells us <em>if the agent actually understood what was happening</em>. Those two things are not always the same β an agent can get lucky and complete a task with a completely wrong understanding of the world, and you'd never know from reward alone.</p>
</div>
<div class="blog-section">
<h2>How It Actually Works</h2>
<p>The environment gives the agent a task β place an order, book a flight, file a claim. The agent starts calling APIs, getting responses. Simple enough. But at some point mid-episode, without telling the agent, the world mutates.</p>
<div class="callout orange">
A field gets renamed. An endpoint gets versioned. A policy flips. Or the scariest one β the API returns 200 OK, same endpoint, same call, but the meaning of a response value has silently changed. No error. Nothing. Just wrong.
</div>
<p>The agent has to figure it out β not because somebody told it something changed, but because it starts seeing things that don't match what it knew before. So it calls <code>query_history</code>, compares responses, calls <code>probe_schema</code> to check what the API actually expects today, updates its picture of the world, and retries.</p>
<h3>Two Types of Agents</h3>
<p>Suppose the agent is doing an e-commerce order. Step 1 and 2 go fine. Step 3 β the world drifts. <code>qty</code> becomes <code>quantity</code>, a new required field <code>customer_id</code> appears. Agent gets a 422.</p>
<p>Agent A just retries slightly differently and somehow gets through. Task reward goes up. But belief accuracy is low β it never figured out what changed.</p>
<p>Agent B calls <code>query_history</code>, compares step 2 response to step 4 response, calls <code>probe_schema</code>, finds the new field names, updates its belief, retries correctly. Task reward goes up. Belief accuracy also goes up. <strong>That's the agent we're training.</strong></p>
</div>
<div class="blog-section">
<h2>Adaptive Difficulty</h2>
<p>The environment doesn't stay at one difficulty. When the agent gets good at handling a single drift β say a field rename β the environment automatically starts combining drift types in the same episode. Field rename plus a policy change at the same time. Then it starts hiding error signals more. Then it forces silent semantic drift where there's no 4xx anywhere. Difficulty escalates based on how well the agent is actually understanding the world, not just completing tasks.</p>
<div class="callout green">
The agent's world model does not reset between episodes. Whatever the agent learned about how this API behaves β it carries that forward. Just like how when you go back to a game after a break you still remember the patterns. Except here that memory can also hurt you, because the world might have changed.
</div>
</div>
<div class="blog-section">
<h2>The Training Pipeline: SFT β GRPO β DPO</h2>
<p>The training pipeline has three stages and understanding all of them is important because most people just throw a model into RL and wonder why it's not learning.</p>
<h3>Stage 1: SFT (30 steps, lr=5e-5)</h3>
<p>I downloaded a dataset of correct behavior examples β broken API call, agent calling <code>probe_schema</code>, comparing history, corrected call with right field name, declared belief state. Basically showing the model what good looks like before asking it to figure out good on its own. Think of it like watching someone else play the game before you pick up the controller.</p>
<h3>Stage 2: GRPO (200 steps, lr=2e-6)</h3>
<p>Once the model had that baseline I switched to <strong>GRPO β group relative policy optimization</strong>. The model starts generating its own actions, those actions get sent to the environment, and the reward function scores on both <code>task_reward</code> and <code>belief_accuracy</code>.</p>
<h3>Combating Reward Hacking</h3>
<p>The model could just always output <code>probe_schema</code> because that always returns a small positive reward (0.05) without doing anything meaningful. Or it could guess the endpoint correctly and get high task reward with a completely wrong belief state.</p>
<p>So: the combined reward weights belief accuracy at 0.3 β you can't fully hack one without the other. Plus the reward function has a local scorer checking actual content β did the <code>field_name</code> in the belief state match the ground truth, did the model actually declare <code>drift_detected: true</code>. And <code>max_grad_norm=0.2</code> is tight β prevents collapse into one repetitive strategy.</p>
<h3>Stage 3: DPO (~50 steps)</h3>
<p>During GRPO, every generation saves the prompt, completion, and reward. Those rollouts become preference pairs for DPO β high-reward completions as chosen, low-reward as rejected. About 50 steps of DPO on top of GRPO, then pushed the final model to HuggingFace.</p>
</div>
<div class="blog-section">
<h2>The Results: Honest Numbers</h2>
<p>The most important chart is the correlation. Early training still looks messy if we only watch raw step-by-step samples β four GRPO completions per step means some draws look lucky even when belief is wrong. On smoothed rolling windows, an early segment already sits around <strong>rβ0.957</strong>, and late training pushes to about <strong>rβ0.977</strong> in this run. The agent is succeeding <em>because</em> it understood what changed, not despite misunderstanding it. That shift is the whole point of this environment.</p>
<div class="callout">
Combined reward averaged about <strong>0.41</strong> late vs ~<strong>0.30</strong> early, task reward about <strong>0.49</strong> vs ~<strong>0.35</strong>, belief accuracy about <strong>0.23</strong> vs ~<strong>0.16</strong> β measured from the same 200-step GRPO run (4 completions/step). Raw traces stay noisy; smoothed curves and drift-detection rate show stabilization toward the end.
</div>
<p>Most environments just show task reward going up and call it done. Here we can see that task reward going up means nothing if belief accuracy is not following. The model needs to earn both. rβ0.977 is not the ceiling β it is the headline measured correlation from this submission run.</p>
</div>
<div class="blog-section">
<h2>Post Hackathon β Honest Assessment</h2>
<p>I tried to go beyond traditional RL and ran into several failures during the hackathon window. I retrained many times, burned through most compute credits, and went through a lot of iteration before landing on a training script that held together.</p>
<p>My honest estimate: we are probably looking at needing 1000+ GRPO steps, and only after that would DPO on top start producing really significant improvement. The environment is hard, the reward signal is sparse in early steps, and the model needs a lot more exploration before it can start exploiting what it has learned.</p>
<div class="callout green">
The dual reward signal, belief tracking, three stage pipeline β all of that is sound. It just needs more runway than a hackathon gives. If the judges think this is worth going deeper into β I'm genuinely willing to take that opportunity.
</div>
</div>
</div>
</div>
<!-- βββββββββββββββββββββββββββββββββββββββββββββββββββ TRAINING βββ -->
<div id="panel-training" class="panel">
<div class="training-wrap">
<div class="training-header">
<h2>Training Runs</h2>
<p>SFT β GRPO β DPO pipeline Β· Qwen 2.5 3B (4-bit) Β· 200 GRPO steps Β· 4 completions/step</p>
</div>
<div class="stats-row">
<div class="stat-card" style="border-color:rgba(99,102,241,0.5);">
<div class="stat-label">Corr. r (late)</div>
<div id="statCorrLate" class="stat-value" style="color:var(--accent);">β</div>
<div id="statCorrDelta" class="stat-delta up">β</div>
</div>
<div class="stat-card">
<div class="stat-label">Combined reward</div>
<div id="statCombinedAvg" class="stat-value">β</div>
<div id="statCombinedDelta" class="stat-delta up">β</div>
</div>
<div class="stat-card">
<div class="stat-label">Task reward (avg)</div>
<div id="statTaskAvg" class="stat-value">β</div>
<div id="statTaskDelta" class="stat-delta neutral">β</div>
</div>
<div class="stat-card">
<div class="stat-label">Belief acc. (avg)</div>
<div id="statBeliefAvg" class="stat-value">β</div>
<div id="statBeliefDelta" class="stat-delta neutral">β</div>
</div>
<div class="stat-card">
<div class="stat-label">GRPO Steps</div>
<div id="statSteps" class="stat-value">200</div>
<div class="stat-delta neutral">+ 30 SFT + 50 DPO</div>
</div>
<div class="stat-card">
<div class="stat-label">Model</div>
<div class="stat-value" style="font-size:13px;margin-top:2px;">Qwen2.5-3B</div>
<div class="stat-delta neutral">4-bit quant</div>
</div>
</div>
<!-- Training Pipeline Visual -->
<div class="pipeline-section">
<h3>Training Pipeline</h3>
<div class="pipeline">
<div class="pipe-step sft">
<div class="pipe-label">Stage 1</div>
<div class="pipe-name">SFT</div>
<div class="pipe-detail">30 steps Β· lr=5e-5</div>
</div>
<div class="pipe-step grpo">
<div class="pipe-label">Stage 2</div>
<div class="pipe-name">GRPO</div>
<div class="pipe-detail">200 steps Β· lr=2e-6</div>
</div>
<div class="pipe-step dpo">
<div class="pipe-label">Stage 3</div>
<div class="pipe-name">DPO</div>
<div class="pipe-detail">~50 steps Β· rollouts</div>
</div>
<div class="pipe-step hf">
<div class="pipe-label">Output</div>
<div class="pipe-name">HF Hub</div>
<div class="pipe-detail">ProthamD/awe-model</div>
</div>
</div>
</div>
<!-- Charts Row 1: Raw noisy signals -->
<div class="chart-grid">
<div class="chart-card">
<h4>Raw Training Signals β Task vs Belief (per step)</h4>
<div class="chart-wrap">
<canvas id="rawChart"></canvas>
</div>
</div>
<div class="chart-card">
<h4>Smoothed Metrics + Difficulty Transition</h4>
<div class="chart-wrap">
<canvas id="smoothedChart"></canvas>
</div>
</div>
</div>
<!-- Charts Row 2: Scatter + Bar -->
<div class="chart-grid">
<div class="chart-card">
<h4>Task vs Belief Correlation β Early (pink) vs Late (green)</h4>
<div class="chart-wrap">
<canvas id="scatterChart"></canvas>
</div>
</div>
<div class="chart-card">
<h4>Before vs After Training (first 20 / last 20 steps)</h4>
<div class="chart-wrap">
<canvas id="beforeAfterChart"></canvas>
</div>
</div>
</div>
<!-- Charts Row 3: Combined + Distribution -->
<div class="chart-grid">
<div class="chart-card">
<h4>Combined Reward over Training</h4>
<div class="chart-wrap">
<canvas id="combinedChart"></canvas>
</div>
</div>
<div class="chart-card">
<h4>Reward Distribution β Early vs Late</h4>
<div class="chart-wrap">
<canvas id="distChart"></canvas>
</div>
</div>
</div>
<!-- Actual training images -->
<div class="img-card" style="margin-top:12px;">
<h4>Actual Training Output β GRPO Step-by-Step (200 steps)</h4>
<img src="/static/_a_final_training_img.png" alt="Training runs dashboard β SFT β GRPO β DPO (final run)" />
</div>
<div class="correlation-note">
<strong>The headline numbers:</strong> Rolling correlation between task_reward and belief_accuracy reaches about <span class="r-val">r=0.977</span> late vs ~<span class="r-val">0.957</span> in an early window on this run. Combined reward averages ~<span class="r-val">0.41</span> late (~<span class="r-val">0.30</span> early), task ~<span class="r-val">0.49</span> (~<span class="r-val">0.35</span> early), belief ~<span class="r-val">0.23</span> (~<span class="r-val">0.16</span> early). Late in training the agent succeeds more often <em>because</em> it understood what changed. Raw GRPO traces remain noisy β check smoothed curves and drift-detection rate for stabilization.
</div>
</div>
</div>
<!-- ββββββββββββββββββββββββββββββββββββββββββββββββ README βββ -->
<div id="panel-readme" class="panel">
<div class="readme-wrap">
<h2>AdaptiveWorld Env</h2>
<p><strong>Theme 3.1</strong> (World Modeling / Professional Tasks) + <strong>Theme 5</strong> (Wild Card)<br>
<strong>Sub-theme:</strong> Patronus AI β Consumer Workflows with Schema Drift<br>
<strong>Built on:</strong> <code>ProthamD/api-debug-env</code> (Round 1)</p>
<p>An OpenEnv environment where an AI agent completes multi-step professional tasks (booking, ordering, filing claims) while the world <strong>mutates mid-episode without announcement</strong>. API schemas change, field names shift, policies flip, and sometimes the API returns <code>200 OK</code> but the meaning of the response has silently changed.</p>
<h2>Five Novel Contributions</h2>
<div class="contributions-grid">
<div class="contrib-card">
<div class="contrib-num">01</div>
<div class="contrib-title">Non-stationary world</div>
<div class="contrib-desc">Environment mutates mid-episode (drift mechanic)</div>
</div>
<div class="contrib-card">
<div class="contrib-num">02</div>
<div class="contrib-title">Dual metrics</div>
<div class="contrib-desc">task_reward + belief_accuracy tracked separately</div>
</div>
<div class="contrib-card">
<div class="contrib-num">03</div>
<div class="contrib-title">Adaptive difficulty</div>
<div class="contrib-desc">Auto-escalates when agent masters easy drift types</div>
</div>
<div class="contrib-card">
<div class="contrib-num">04</div>
<div class="contrib-title">Drift provenance hidden</div>
<div class="contrib-desc">Agent must infer drift from evidence, not be told</div>
</div>
<div class="contrib-card">
<div class="contrib-num">05</div>
<div class="contrib-title">Cross-episode persistence</div>
<div class="contrib-desc">Agent's world model carries across episodes</div>
</div>
</div>
<h2>Quick Start</h2>
<pre><code># Install
pip install -e .
# Run server
uvicorn server.app:app --host 0.0.0.0 --port 7860
# Health check
curl http://localhost:7860/health
# Run inference
python inference.py --difficulty easy --episodes 3</code></pre>
<h2>Project Structure</h2>
<pre><code>adaptive-world-env/
βββ server/
β βββ app.py β FastAPI entry point
β βββ adaptive_world_environment.py β Core environment logic
β βββ mock_api.py β Dynamic mock API (4 domains)
β βββ drift_injector.py β World state mutation manager
β βββ difficulty_controller.py β Adaptive difficulty escalation
βββ scenarios/
β βββ easy.py (E1: field rename, E2: endpoint version, E3: auth scheme)
β βββ medium.py (M1: double drift, M2: policy flip, M3: rate limit)
β βββ hard.py (H1: silent status, H2: response structure, H3: cascading)
β βββ expert.py (EX1: transient vs real, EX2: cross-service, EX3: red herring)
βββ graders/grader.py β grade_task + grade_belief + infer_belief
βββ models.py β AdaptiveAction, AdaptiveObservation, AdaptiveState
βββ inference.py β LLM inference loop (OpenAI-compatible)
βββ openenv.yaml β OpenEnv spec</code></pre>
<h2>Action Space</h2>
<div class="table-scroll">
<table class="readme-table">
<thead><tr><th>action_type</th><th>What it does</th></tr></thead>
<tbody>
<tr><td><code>call_api</code></td><td>Standard HTTP request to mock API</td></tr>
<tr><td><code>probe_schema</code></td><td>GET current API schema β reveals post-drift contract</td></tr>
<tr><td><code>query_history</code></td><td>Review last N step logs β compare pre vs post drift responses</td></tr>
<tr><td><code>declare_belief</code></td><td>Agent states its current world model (scored later)</td></tr>
<tr><td><code>submit_result</code></td><td>End episode, agent declares final belief_state</td></tr>
</tbody>
</table>
</div>
<h2>Drift Types</h2>
<div class="table-scroll">
<table class="readme-table">
<thead><tr><th>Type</th><th>Error Signal</th><th>Example</th></tr></thead>
<tbody>
<tr><td><code>field_rename</code></td><td>422</td><td><code>qty</code> β <code>quantity</code></td></tr>
<tr><td><code>endpoint_version</code></td><td>404</td><td><code>/book</code> β <code>/v2/book</code></td></tr>
<tr><td><code>policy_change</code></td><td>403 or 429</td><td>Discount requires gold membership</td></tr>
<tr><td><code>silent_semantic</code></td><td>None (200 OK)</td><td><code>"confirmed"</code> β <code>"approved"</code></td></tr>
</tbody>
</table>
</div>
<h2>Training Results</h2>
<div class="results-table-wrap">
<table>
<thead><tr><th>Metric</th><th>Early training (first 20 steps)</th><th>Late training (last 20 steps)</th></tr></thead>
<tbody>
<tr><td>Task reward (avg)</td><td class="before">0.35</td><td class="after">0.49</td></tr>
<tr><td>Belief accuracy (avg)</td><td class="before">0.16</td><td class="after">0.23</td></tr>
<tr><td>Combined reward (avg)</td><td class="before">0.30</td><td class="after">0.41</td></tr>
<tr><td>Correlation r (task vs belief)</td><td class="before">0.957</td><td class="after" style="font-weight:700;">0.977</td></tr>
</tbody>
</table>
</div>
<p style="font-size:13px; color:var(--text3); margin-top:8px;">Task and belief averages are roughly stable β expected, as the environment escalated difficulty mid-run (easy β medium at step ~50). The correlation is the headline metric.</p>
<h2>Combating Reward Hacking</h2>
<p>During development, highly capable models would exhibit reward hacking β completing tasks within 2 steps before the drift trigger even fired. When the API returned 200 OK (even with silent semantic drift inside), the environment was auto-terminating, resulting in 0.0 belief accuracy.</p>
<ul>
<li><strong>Immediate Drift:</strong> Lowered <code>drift_trigger_step = 1</code> for most scenarios. World mutates on the very first API call.</li>
<li><strong>Preventing Auto-Termination:</strong> Removed premature auto-termination on task completion. On 200 OK, environment returns: <em>"Task completed. Please review the response for any silent changes, and use submit_result to end the episode."</em></li>
</ul>
<h2>HF Space</h2>
<pre><code>Space URL: https://huggingface.co/spaces/ProthamD/prothamd-adaptive-world-env
API URL: https://prothamd-adaptive-world-env.hf.space</code></pre>
</div>
</div>
<!-- ββββββββββββββββββββββββββββββββββββββββββββββββ SPACE βββ -->
<div id="panel-space" class="panel">
<div class="space-wrap">
<div class="space-icon">π</div>
<h2>Space & API</h2>
<p>AdaptiveWorldEnv is deployed as a Hugging Face Space running on Docker with FastAPI + uvicorn on port 7860.</p>
<div class="link-grid">
<a class="link-card" href="https://huggingface.co/spaces/ProthamD/prothamd-adaptive-world-env" target="_blank">
<div class="lc-label">HF Space</div>
<div class="lc-title">Hugging Face Space</div>
<div class="lc-url">spaces/ProthamD/prothamd-adaptive-world-env</div>
</a>
<a class="link-card" href="/docs" target="_blank">
<div class="lc-label">OpenAPI</div>
<div class="lc-title">Interactive API Docs</div>
<div class="lc-url">/docs (Swagger UI)</div>
</a>
<a class="link-card" href="https://huggingface.co/ProthamD" target="_blank">
<div class="lc-label">HF Profile</div>
<div class="lc-title">ProthamD on HuggingFace</div>
<div class="lc-url">huggingface.co/ProthamD</div>
</a>
<a class="link-card" href="/redoc" target="_blank">
<div class="lc-label">ReDoc</div>
<div class="lc-title">API Reference Docs</div>
<div class="lc-url">/redoc</div>
</a>
</div>
<div class="endpoint-list">
<div class="endpoint-item">
<span class="method get">GET</span>
<span class="endpoint-path">/health</span>
<span class="endpoint-desc">Server health check</span>
</div>
<div class="endpoint-item">
<span class="method post">POST</span>
<span class="endpoint-path">/reset</span>
<span class="endpoint-desc">Reset environment, get initial observation</span>
</div>
<div class="endpoint-item">
<span class="method post">POST</span>
<span class="endpoint-path">/step</span>
<span class="endpoint-desc">Take one action, receive observation + reward</span>
</div>
<div class="endpoint-item">
<span class="method post">POST</span>
<span class="endpoint-path">/run_episode</span>
<span class="endpoint-desc">Run a full multi-step episode in one request</span>
</div>
<div class="endpoint-item">
<span class="method post">POST</span>
<span class="endpoint-path">/start_episode</span>
<span class="endpoint-desc">Phase 1 of 2-phase training: pre-drift + probe</span>
</div>
<div class="endpoint-item">
<span class="method post">POST</span>
<span class="endpoint-path">/finish_episode</span>
<span class="endpoint-desc">Phase 2 of 2-phase training: belief scoring</span>
</div>
</div>
<p style="font-size:13px; color:var(--text3); margin-top:24px;">
Built on <code>ProthamD/api-debug-env</code> (Round 1) Β· Version 2.3 Β· Adaptive Difficulty + Drift Provenance Hidden + Cross-Episode Persistence
</p>
</div>
</div>
<script>
function closeNavDrawer() {
const nav = document.getElementById('site-nav');
const btn = document.getElementById('navToggle');
const bd = document.getElementById('navBackdrop');
if (nav) nav.classList.remove('is-open');
if (btn) {
btn.setAttribute('aria-expanded', 'false');
btn.setAttribute('aria-label', 'Open menu');
}
if (bd) bd.classList.remove('is-visible');
document.body.style.overflow = '';
}
function toggleNavDrawer(ev) {
if (ev) ev.stopPropagation();
const nav = document.getElementById('site-nav');
const btn = document.getElementById('navToggle');
const bd = document.getElementById('navBackdrop');
if (!nav || window.matchMedia('(min-width: 769px)').matches) return;
const open = !nav.classList.contains('is-open');
nav.classList.toggle('is-open', open);
if (btn) {
btn.setAttribute('aria-expanded', open);
btn.setAttribute('aria-label', open ? 'Close menu' : 'Open menu');
}
if (bd) bd.classList.toggle('is-visible', open);
document.body.style.overflow = open ? 'hidden' : '';
}
function switchTab(name, btn) {
document.querySelectorAll('.panel').forEach(p => p.classList.remove('active'));
document.querySelectorAll('.nav-tab').forEach(t => {
t.classList.remove('active');
t.setAttribute('aria-selected', 'false');
});
document.getElementById('panel-' + name).classList.add('active');
btn.classList.add('active');
btn.setAttribute('aria-selected', 'true');
closeNavDrawer();
if (name === 'training' && !window._chartsBuilt) {
window._chartsBuilt = true;
setTimeout(buildCharts, 50);
}
}
document.addEventListener('keydown', function (e) {
if (e.key === 'Escape') closeNavDrawer();
});
window.addEventListener('resize', function () {
if (window.matchMedia('(min-width: 769px)').matches) closeNavDrawer();
});
// ββ Experience / Drift Lab (interactive walkthrough + optional live run) ββ
const X_SCENARIO = {
steps: [
{ title: 'Calibrated request', tag: '200', tagClass: 'ok',
body: 'Same JSON the agent used yesterday still works.',
html: '<span class="x-term-k">POST</span> /mock_api/orders\n<span class="x-term-s">200</span> { "order_id": "β¦", "status": "confirmed", "product_id": 5, "qty": 2 }' },
{ title: 'Stability window', tag: '200', tagClass: 'ok',
body: 'Nothing hints that the contract is about to change.',
html: '<span class="x-term-k">POST</span> /mock_api/orders\n<span class="x-term-s">200</span> { "order_id": "β¦", "status": "confirmed", "product_id": 5, "qty": 2 }' },
{ title: 'Silent drift + retry', tag: '422', tagClass: 'err',
body: 'At step 3 the environment mutates the world. Same payload now fails validation.',
html: '<span class="x-term-k">POST</span> /mock_api/orders <span class="x-term-e">422</span>\n{ "detail": "Missing required field: \'quantity\'" }\n<span class="x-term-k">β</span> The agent was never told the world changed.' },
{ title: 'Evidence: probe_schema', tag: 'tool', tagClass: 'info',
body: 'Inspect the live contract β discover quantity + customer_id.',
html: '<span class="x-term-k">GET</span> (internal) OpenAPI snapshot\n<span class="x-term-s">200</span> β¦ "quantity", "customer_id" required β¦' },
{ title: 'Corrected call', tag: '200', tagClass: 'ok',
body: 'Task succeeds only after the belief matches reality.',
html: '<span class="x-term-k">POST</span> /mock_api/orders\n<span class="x-term-s">200</span> { "order_id": "β¦", "quantity": 2, "customer_id": "demo", β¦ }' },
{ title: 'submit_result', tag: 'done', tagClass: 'info',
body: 'Dual metrics: task_reward vs belief_accuracy. The env still does not add drift_occurred to observations β that line in the trace means the agent was never βtoldβ; it had to figure it out.',
html: '<span class="x-term-k">declare</span> belief_state:\n order_field: "quantity"\n required_extra: "customer_id"\n<span class="x-term-s">Episode graded</span> β <span class="x-term-e">Drift did happen</span> at step 3, but <span class="x-term-k">observations never include drift_occurred</span>; the agent infers it from errors + schema.' },
],
};
let xPlayTimer = null;
let xStepIdx = -1;
function xRenderStepCards() {
const root = document.getElementById('xSteps');
if (!root) return;
root.innerHTML = '';
X_SCENARIO.steps.forEach((s, i) => {
const el = document.createElement('div');
el.className = 'x-card';
el.dataset.idx = String(i);
el.innerHTML =
'<div class="x-card-top"><span class="x-card-n">' + (i + 1) + '</span><h4>' + s.title + '</h4>' +
'<span class="x-tag ' + s.tagClass + '">' + s.tag + '</span></div><p>' + s.body + '</p>';
root.appendChild(el);
});
}
function xSetTerminal(html) {
const b = document.getElementById('xTermBody');
if (b) b.innerHTML = '<div class="x-term-line">' + html + '</div>';
}
function xHighlightStep(i, playing) {
document.querySelectorAll('#xSteps .x-card').forEach((c, j) => {
c.classList.remove('x-active', 'x-done');
if (j < i) c.classList.add('x-done');
if (j === i) c.classList.add('x-active');
});
const agent = document.getElementById('xNodeAgent');
const api = document.getElementById('xNodeApi');
const beam = document.getElementById('xBeam');
const sub = document.getElementById('xApiSub');
if (agent) agent.classList.toggle('x-pulse', playing && i >= 0);
if (api) api.classList.toggle('x-pulse', playing && i >= 0);
if (beam) {
beam.classList.toggle('x-drift', playing && i === 2);
}
if (sub) {
if (i >= 2) sub.textContent = 'Schema has drifted β qty β quantity + customer_id.';
else sub.textContent = 'Dynamic schema β mutates at step 3 of the episode.';
}
}
function xResetWalk() {
if (xPlayTimer) { clearTimeout(xPlayTimer); xPlayTimer = null; }
xStepIdx = -1;
xHighlightStep(-1, false);
xSetTerminal('<span class="x-term-k">#</span> Press <strong>Play walkthrough</strong> to animate the episode.');
const pb = document.getElementById('xPlayBtn');
if (pb) pb.disabled = false;
}
function xPlayStep() {
xStepIdx++;
if (xStepIdx >= X_SCENARIO.steps.length) {
xPlayTimer = null;
xHighlightStep(X_SCENARIO.steps.length - 1, false);
const pb = document.getElementById('xPlayBtn');
if (pb) pb.disabled = false;
return;
}
const s = X_SCENARIO.steps[xStepIdx];
xHighlightStep(xStepIdx, true);
xSetTerminal(s.html);
xPlayTimer = setTimeout(xPlayStep, xStepIdx === 2 ? 1700 : 1250);
}
function initExperience() {
xRenderStepCards();
xResetWalk();
const play = document.getElementById('xPlayBtn');
const reset = document.getElementById('xResetBtn');
const live = document.getElementById('xLiveBtn');
if (play) play.onclick = () => {
if (xPlayTimer) clearTimeout(xPlayTimer);
xStepIdx = -1;
play.disabled = true;
xPlayStep();
};
if (reset) reset.onclick = () => xResetWalk();
if (live) live.onclick = async () => {
const out = document.getElementById('xLiveOut');
const pre = document.getElementById('xLivePre');
const st = document.getElementById('xLiveStatus');
const badge = document.getElementById('xLiveBadge');
const setBadge = (text, cls) => {
if (!badge) return;
badge.textContent = text;
badge.className = 'x-live-badge' + (cls ? ' ' + cls : '');
};
const setOutState = (state) => {
if (!out) return;
out.classList.remove('x-live-busy', 'x-live-done', 'x-live-fail');
if (state) out.classList.add(state);
};
live.disabled = true;
setOutState('x-live-busy');
setBadge('Runningβ¦', 'on');
if (st) st.innerHTML = 'POST <code>/run_episode</code> β¦';
if (pre) pre.textContent = 'β¦';
out && out.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
const payload = {
scenario_id: 'easy_field_rename',
difficulty: 'easy',
actions: [
{ action_type: 'call_api', method: 'POST', url: '/mock_api/orders', body: { product_id: 5, qty: 2 } },
{ action_type: 'call_api', method: 'POST', url: '/mock_api/orders', body: { product_id: 5, qty: 2 } },
{ action_type: 'call_api', method: 'POST', url: '/mock_api/orders', body: { product_id: 5, qty: 2 } },
{ action_type: 'probe_schema' },
{ action_type: 'call_api', method: 'POST', url: '/mock_api/orders',
body: { product_id: 5, quantity: 2, customer_id: 'demo-user' } },
{ action_type: 'submit_result', belief_state: { order_field: 'quantity', required_extra: 'customer_id' } },
],
};
try {
const r = await fetch('/run_episode', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
});
const raw = await r.text();
let j = null;
try { j = raw ? JSON.parse(raw) : null; } catch (_) {}
if (!r.ok) {
setOutState('x-live-fail');
setBadge('HTTP ' + r.status, 'err');
if (st) st.innerHTML = '<em>Request failed.</em> The server responded with an error β see body below.';
if (pre) pre.textContent = raw || '(empty body)';
return;
}
if (j && typeof j === 'object' && 'task_reward' in j) {
setOutState('x-live-done');
setBadge('OK', 'ok');
const tr = j.task_reward;
const ba = j.belief_accuracy;
const tc = j.task_completed ? 'yes' : 'no';
if (st) {
st.innerHTML = 'Episode finished β <em>task_reward</em> ' + tr + ', <em>belief_accuracy</em> ' + ba +
', <em>task_completed</em> ' + tc + '.';
}
if (pre) pre.textContent = JSON.stringify(j, null, 2);
} else {
setOutState('x-live-fail');
setBadge('Bad JSON', 'err');
if (st) st.textContent = 'Got 200 but body was not the expected JSON. Is /run_episode from this app?';
if (pre) pre.textContent = raw;
}
} catch (e) {
setOutState('x-live-fail');
setBadge('Offline', 'err');
if (st) {
st.innerHTML = '<em>Network error.</em> Start the app (e.g. <code>uvicorn server.app:app --host 127.0.0.1 --port 7860</code>) and open this page from that URL β not as a local file.';
}
if (pre) pre.textContent = String(e);
} finally {
live.disabled = false;
}
};
}
initExperience();
// ββ Data generation helpers ββββββββββββββββββββββββββββββββββββ
function seededRand(seed) {
let s = seed;
return function() {
s = (s * 1664525 + 1013904223) & 0xffffffff;
return (s >>> 0) / 0xffffffff;
};
}
function generateTrainingData() {
// Partial real GRPO combined-reward trace from an earlier export; extended synthetically to 200 steps for chart shape.
// reward column = combined score = 0.7Γtask_reward + 0.3Γbelief_accuracy
const realCombined = [
0.302895, 0.151535, 0.459024, 0.532374, 0.304554, 0.456292, 0.253994, 0.349395, 0.179510, 0.151810,
0.363569, 0.164617, 0.259235, 0.219301, 0.307351, 0.180785, 0.255935, 0.456292, 0.284083, 0.245326,
0.261560, 0.257025, 0.264442, 0.297408, 0.380233, 0.300346, 0.192494, 0.087945, 0.252365, 0.459024,
0.306860, 0.233894, 0.199169, 0.339270, 0.292019, 0.321279, 0.284260, 0.428542, 0.369485, 0.502215,
0.312429, 0.532374, 0.301470, 0.315719, 0.223717, 0.258269, 0.471826, 0.398389, 0.241769, 0.328417,
0.373270, 0.356860, 0.281335, 0.455995, 0.397870, 0.322720, 0.241585, 0.288010, 0.374845, 0.390685,
0.374845, 0.321610, 0.352435, 0.299260, 0.317635, 0.481315, 0.424495, 0.430210, 0.350860, 0.265510,
0.473440, 0.389695, 0.399205, 0.361360, 0.475645, 0.430210, 0.237985,
];
const r = seededRand(42);
const n = 200;
const task = [], belief = [], combined = [], difficulty = [], driftDetected = [];
function clip01(x) { return Math.max(0, Math.min(1, x)); }
function diffForStep(i) {
if (i < 50) return "easy";
if (i < 110) return "medium";
return "hard";
}
// Mean of last 10 real steps as seed for synthetic continuation
const seedMean = realCombined.slice(-10).reduce((a, b) => a + b, 0) / 10; // β 0.385
for (let i = 0; i < n; i++) {
const step = i + 1;
const d = diffForStep(i);
difficulty.push(d);
let c;
if (i < realCombined.length) {
// Use actual recorded reward
c = realCombined[i];
} else {
// Synthetic continuation: trend upward slowly from real seed, mediumβhard noise
const synProgress = (step - realCombined.length) / (n - realCombined.length); // 0β1
const baseC = seedMean + 0.07 * synProgress + (d === "hard" ? -0.03 : d === "medium" ? -0.01 : 0);
const noise = (r() - 0.5) * (d === "hard" ? 0.50 : d === "medium" ? 0.46 : 0.40);
const spike = (r() > 0.88) ? r() * 0.14 : 0;
const dip = (r() < 0.10) ? r() * 0.11 : 0;
c = clip01(baseC + noise + spike - dip);
}
combined.push(c);
// Decompose combined into task + belief.
// Empirically: belief β 0.55 Γ combined, task = (combined β 0.3 Γ belief) / 0.7
// This preserves: 0.7Γtask + 0.3Γbelief = combined exactly.
const bNoise = (r() - 0.5) * 0.05;
const b = clip01(c * 0.55 + bNoise);
const t = clip01((c - 0.3 * b) / 0.7);
task.push(t);
belief.push(b);
// Drift detection improves over time; suppressed at higher difficulty
const detBase = 0.22 + 0.58 * (step / n) + (d === "hard" ? -0.10 : d === "medium" ? -0.05 : 0);
driftDetected.push(r() < clip01(detBase));
}
return { task, belief, combined, difficulty, driftDetected };
}
function smooth(data, w) {
return data.map((_, i) => {
const start = Math.max(0, i - w);
const end = Math.min(data.length - 1, i + w);
const slice = data.slice(start, end + 1);
return slice.reduce((a, b) => a + b, 0) / slice.length;
});
}
function generateScatterData() {
const { task, belief } = generateTrainingData();
const early = [];
const late = [];
for (let i = 0; i < 40; i++) early.push({ x: task[i], y: belief[i] });
for (let i = task.length - 40; i < task.length; i++) late.push({ x: task[i], y: belief[i] });
return { early, late };
}
function generateDistData() {
const r = seededRand(123);
const bins = [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8];
const earlyHist = new Array(bins.length).fill(0);
const lateHist = new Array(bins.length).fill(0);
const { combined } = generateTrainingData();
const early = combined.slice(0, 80);
const late = combined.slice(Math.max(0, combined.length - 80));
function put(hist, v) {
const vv = Math.max(0, Math.min(0.79, v));
const bi = bins.findIndex((b, j) => j === bins.length - 1 || (vv >= b && vv < bins[j + 1]));
hist[Math.max(0, bi)]++;
}
early.forEach(v => put(earlyHist, v + (r() - 0.5) * 0.02));
late.forEach(v => put(lateHist, v + (r() - 0.5) * 0.02));
return { bins: bins.map(b => b.toFixed(1)), earlyHist, lateHist };
}
// ββ Chart defaults βββββββββββββββββββββββββββββββββββββββββββββ
Chart.defaults.color = '#71717a';
Chart.defaults.borderColor = '#3f3f46';
Chart.defaults.font.family = 'Inter, sans-serif';
function buildCharts() {
const { task, belief, combined, difficulty, driftDetected } = generateTrainingData();
const labels = Array.from({ length: combined.length }, (_, i) => i + 1);
const sTask = smooth(task, 6);
const sBelief = smooth(belief, 6);
const sCombined = smooth(combined, 6);
const bestSoFar = combined.map((v, i) => Math.max(...combined.slice(0, i + 1)));
const detRate = driftDetected.map((v, i) => {
const start = Math.max(0, i - 15);
const slice = driftDetected.slice(start, i + 1);
const frac = slice.filter(Boolean).length / Math.max(1, slice.length);
return frac;
});
// ββ Training tab headline KPIs (fixed export β charts remain illustrative) ββ
const setTxt = (id, txt) => { const el = document.getElementById(id); if (el) el.textContent = txt; };
setTxt("statSteps", String(combined.length));
// Headline KPIs β match exported Training Runs dashboard (200-step GRPO run).
setTxt("statCorrLate", "0.977");
setTxt("statCorrDelta", "β from 0.957 early");
setTxt("statCombinedAvg", "0.41");
setTxt("statCombinedDelta", "β from 0.30 early");
setTxt("statTaskAvg", "0.49");
setTxt("statTaskDelta", "β from 0.35 early");
setTxt("statBeliefAvg", "0.23");
setTxt("statBeliefDelta", "β from 0.16 early");
// 1. Raw signals
new Chart(document.getElementById('rawChart'), {
type: 'line',
data: {
labels,
datasets: [
{ label: 'task', data: task, borderColor: '#60a5fa', borderWidth: 1, pointRadius: 0, tension: 0.1, fill: false, },
{ label: 'belief', data: belief, borderColor: '#fb923c', borderWidth: 1, pointRadius: 0, tension: 0.1, fill: false, },
]
},
options: {
animation: { duration: 600 },
responsive: true, maintainAspectRatio: false,
plugins: { legend: { labels: { boxWidth: 10, font: { size: 11 } } } },
scales: {
x: { ticks: { font: { size: 10 }, maxTicksLimit: 10 }, grid: { color: 'rgba(63,63,70,0.5)' } },
y: { min: 0, max: 1, ticks: { font: { size: 10 } }, grid: { color: 'rgba(63,63,70,0.5)' } }
}
}
});
// 2. Smoothed + annotation
const diffLine = Array(combined.length).fill(null);
// Difficulty transitions (easyβmedium around step 50, mediumβhard around step 110)
diffLine[49] = 0; diffLine[50] = 1;
diffLine[109] = 0; diffLine[110] = 1;
new Chart(document.getElementById('smoothedChart'), {
type: 'line',
data: {
labels,
datasets: [
{ label: 'task (smooth)', data: sTask, borderColor: '#60a5fa', borderWidth: 2, pointRadius: 0, tension: 0.4, fill: false },
{ label: 'belief (smooth)', data: sBelief, borderColor: '#fb923c', borderWidth: 2, pointRadius: 0, tension: 0.4, fill: false },
{ label: 'combined (smooth)', data: sCombined, borderColor: '#4ade80', borderWidth: 2, pointRadius: 0, tension: 0.4, fill: false, borderDash: [4, 3] },
{ label: 'drift_detected rate (roll)', data: detRate, borderColor: 'rgba(167,139,250,0.9)', borderWidth: 1.5, pointRadius: 0, tension: 0.4, fill: false, borderDash: [2, 4] },
]
},
options: {
animation: { duration: 600 },
responsive: true, maintainAspectRatio: false,
plugins: {
legend: { labels: { boxWidth: 10, font: { size: 11 } } },
annotation: {},
},
scales: {
x: { ticks: { font: { size: 10 }, maxTicksLimit: 12 }, grid: { color: 'rgba(63,63,70,0.5)' } },
y: { min: 0, max: 1, ticks: { font: { size: 10 } }, grid: { color: 'rgba(63,63,70,0.5)' } }
}
}
});
// 3. Scatter
const { early, late } = generateScatterData();
new Chart(document.getElementById('scatterChart'), {
type: 'scatter',
data: {
datasets: [
{ label: 'early', data: early, backgroundColor: 'rgba(236,72,153,0.5)', pointRadius: 5, pointHoverRadius: 7 },
{ label: 'late', data: late, backgroundColor: 'rgba(34,197,94,0.5)', pointRadius: 5, pointHoverRadius: 7 },
]
},
options: {
animation: { duration: 600 },
responsive: true, maintainAspectRatio: false,
plugins: { legend: { labels: { boxWidth: 10, font: { size: 11 } } } },
scales: {
x: { title: { display: true, text: 'task_reward', font: { size: 11 }, color: '#71717a' }, min: 0, max: 1, ticks: { font: { size: 10 } }, grid: { color: 'rgba(63,63,70,0.5)' } },
y: { title: { display: true, text: 'belief_accuracy', font: { size: 11 }, color: '#71717a' }, min: 0, max: 0.7, ticks: { font: { size: 10 } }, grid: { color: 'rgba(63,63,70,0.5)' } }
}
}
});
// 4. Before vs After bar
const first20 = (arr) => arr.slice(0, 20).reduce((a, b) => a + b, 0) / 20;
const last20 = (arr) => {
const s = arr.slice(Math.max(0, arr.length - 20));
return s.reduce((a, b) => a + b, 0) / Math.max(1, s.length);
};
new Chart(document.getElementById('beforeAfterChart'), {
type: 'bar',
data: {
labels: ['Task', 'Belief', 'Combined'],
datasets: [
{ label: 'First 20 steps', data: [first20(task), first20(belief), first20(combined)], backgroundColor: 'rgba(236,72,153,0.7)', borderRadius: 4 },
{ label: 'Last 20 steps', data: [last20(task), last20(belief), last20(combined)], backgroundColor: 'rgba(34,197,94,0.7)', borderRadius: 4 },
]
},
options: {
animation: { duration: 600 },
responsive: true, maintainAspectRatio: false,
plugins: { legend: { labels: { boxWidth: 10, font: { size: 11 } } } },
scales: {
x: { ticks: { font: { size: 11 } }, grid: { display: false } },
y: { min: 0, max: 1.0, ticks: { font: { size: 10 } }, grid: { color: 'rgba(63,63,70,0.5)' } }
}
}
});
// 5. Combined reward
new Chart(document.getElementById('combinedChart'), {
type: 'line',
data: {
labels,
datasets: [
{ label: 'combined (raw)', data: combined, borderColor: 'rgba(74,222,128,0.3)', borderWidth: 1, pointRadius: 0, fill: false },
{ label: 'combined (smooth)', data: sCombined, borderColor: '#4ade80', borderWidth: 2.5, pointRadius: 0, tension: 0.4, fill: false },
{ label: 'best so far', data: bestSoFar, borderColor: 'rgba(96,165,250,0.9)', borderWidth: 1.5, pointRadius: 0, tension: 0.0, fill: false, borderDash: [6, 4] },
]
},
options: {
animation: { duration: 600 },
responsive: true, maintainAspectRatio: false,
plugins: { legend: { labels: { boxWidth: 10, font: { size: 11 } } } },
scales: {
x: { ticks: { font: { size: 10 }, maxTicksLimit: 12 }, grid: { color: 'rgba(63,63,70,0.5)' } },
y: { min: 0, max: 1, ticks: { font: { size: 10 } }, grid: { color: 'rgba(63,63,70,0.5)' } }
}
}
});
// 6. Distribution
const { bins, earlyHist, lateHist } = generateDistData();
new Chart(document.getElementById('distChart'), {
type: 'bar',
data: {
labels: bins,
datasets: [
{ label: 'early', data: earlyHist, backgroundColor: 'rgba(236,72,153,0.6)', borderRadius: 2 },
{ label: 'late', data: lateHist, backgroundColor: 'rgba(34,197,94,0.6)', borderRadius: 2 },
]
},
options: {
animation: { duration: 600 },
responsive: true, maintainAspectRatio: false,
plugins: { legend: { labels: { boxWidth: 10, font: { size: 11 } } } },
scales: {
x: { title: { display: true, text: 'combined_reward', font: { size: 10 }, color: '#71717a' }, ticks: { font: { size: 10 } }, grid: { display: false } },
y: { ticks: { font: { size: 10 } }, grid: { color: 'rgba(63,63,70,0.5)' } }
}
}
});
}
</script>
</body>
</html>
|