Publish the s6-micro demo
Browse files- .gitattributes +1 -0
- README.md +19 -5
- assets/index-BGhbf8wU.css +1 -0
- assets/index-DApumCj4.js +0 -0
- doom/COPYING.txt +30 -0
- doom/README.txt +4 -0
- doom/ammo.png +0 -0
- doom/ceil.png +0 -0
- doom/door.png +0 -0
- doom/exitsw0.png +0 -0
- doom/exitsw1.png +0 -0
- doom/fireball.png +0 -0
- doom/floor.png +0 -0
- doom/health.png +0 -0
- doom/imp.png +0 -0
- doom/medikit.png +0 -0
- doom/wall1.png +0 -0
- doom/wall2.png +0 -0
- doom/wall3.png +0 -0
- doom/wall4.png +0 -0
- doom/wall5.png +0 -0
- doom/weapon.png +0 -0
- doom/weapon_flash.png +0 -0
- doom/zombie.png +0 -0
- index.html +11 -17
- models/manifest.json +15 -0
- models/s6-micro.gguf +3 -0
- pkg/sky_web.js +1528 -0
- pkg/sky_web_bg.wasm +3 -0
- pkg/sky_web_relaxed_bg.wasm +3 -0
- space.json +17 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
models/s6-micro.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,10 +1,24 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
|
|
|
| 7 |
pinned: false
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: s6-micro
|
| 3 |
+
emoji: 🧩
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: static
|
| 7 |
+
app_file: index.html
|
| 8 |
pinned: false
|
| 9 |
+
license: apache-2.0
|
| 10 |
+
short_description: "2.4 MB model for four games and typed questions"
|
| 11 |
+
models:
|
| 12 |
+
- maxgfr/s6-micro
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# s6-micro
|
| 16 |
+
|
| 17 |
+
A 2.4 MB ternary decision model that plays four games at the oracle's level and answers typed questions in free text: 0.553 on the typed-decisions bench. Its second version passed the gate that the first one failed, on the same test records.
|
| 18 |
+
|
| 19 |
+
Everything runs in your browser: a Rust inference engine compiled to WebAssembly (relaxed SIMD
|
| 20 |
+
where the browser supports it, else SIMD128) reads the GGUF file shipped with this Space. Nothing
|
| 21 |
+
is sent to a server.
|
| 22 |
+
|
| 23 |
+
- Model card: [maxgfr/s6-micro](https://huggingface.co/maxgfr/s6-micro)
|
| 24 |
+
- Code: [github.com/maxgfr/skycmd](https://github.com/maxgfr/skycmd)
|
assets/index-BGhbf8wU.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: #3c3c43;--vp-c-text-2: #67676c;--vp-c-text-3: #929295}.dark{--vp-c-text-1: #dfdfd6;--vp-c-text-2: #98989f;--vp-c-text-3: #6a6a71}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media(min-width:960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:lang(es),:lang(pt){--vp-code-copy-copied-text-content: "Copiado"}:lang(fa){--vp-code-copy-copied-text-content: "کپی شد"}:lang(ko){--vp-code-copy-copied-text-content: "복사됨"}:lang(ru){--vp-code-copy-copied-text-content: "Скопировано"}:lang(zh){--vp-code-copy-copied-text-content: "已复制"}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}:root{--vp-font-family-base: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;--vp-font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace}*{box-sizing:border-box}body{margin:0;font-family:var(--vp-font-family-base);color:var(--vp-c-text-1);background:var(--vp-c-bg);line-height:1.6}.space{max-width:960px;margin:0 auto;padding:24px 16px 48px}h1{font-size:32px;margin:8px 0 4px}h2{font-size:22px;margin:36px 0 4px;padding-top:16px;border-top:1px solid var(--vp-c-divider)}a{color:var(--vp-c-brand-1)}.tagline{font-size:17px;color:var(--vp-c-text-2);margin:0 0 8px}.links{font-size:14px}.notes{font-size:14px;color:var(--vp-c-text-2);padding-left:18px}table{border-collapse:collapse}th,td{border:1px solid var(--vp-c-divider);padding:4px 8px;text-align:left}footer{margin-top:48px;font-size:13px;color:var(--vp-c-text-2)}.space-error{color:var(--vp-c-danger-1)}.space-failed{margin:8px 0 12px;padding:10px 14px;border-radius:8px;font-size:15px;background:var(--vp-c-danger-soft)}.ear[data-v-85523283]{border:1px solid var(--vp-c-divider);border-radius:8px;padding:16px;margin:16px 0}.ear-note[data-v-85523283]{margin:0}.ear-failed[data-v-85523283]{margin:0 0 12px;padding:8px 12px;border-radius:8px;background:var(--vp-c-danger-soft)}.ear-status[data-v-85523283]{margin:0 0 12px;color:var(--vp-c-text-2);font-size:.9em}.ear-controls[data-v-85523283]{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}.ear-controls button[data-v-85523283]{border:1px solid var(--vp-c-brand-1);border-radius:6px;padding:4px 12px;color:var(--vp-c-brand-1)}.ear-controls button[data-v-85523283]:disabled{opacity:.5;cursor:not-allowed}.ear-or[data-v-85523283]{color:var(--vp-c-text-2);font-size:.9em}.ear-meter[data-v-85523283]{position:relative;height:18px;background:var(--vp-c-bg-soft);border-radius:4px;margin-bottom:16px}.ear-meter-bar[data-v-85523283]{position:absolute;inset:0 auto 0 0;background:var(--vp-c-brand-soft);border-radius:4px}.ear-meter-text[data-v-85523283]{position:relative;font-size:.8em;padding-left:8px;line-height:18px;color:var(--vp-c-text-2)}.ear-q[data-v-85523283]{margin-bottom:16px}.ear-q-head[data-v-85523283]{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.ear-q-meta[data-v-85523283]{color:var(--vp-c-text-2);font-size:.85em;font-variant-numeric:tabular-nums}.ear-verdict[data-v-85523283]{margin:4px 0 8px;font-weight:600}.ear-handoff[data-v-85523283]{color:var(--vp-c-warning-1)}.ear-bar[data-v-85523283]{display:grid;grid-template-columns:7em 1fr 4.5em;gap:8px;align-items:center;font-size:.85em}.ear-bar-track[data-v-85523283]{height:8px;background:var(--vp-c-bg-soft);border-radius:4px;overflow:hidden}.ear-bar-fill[data-v-85523283]{display:block;height:100%;background:var(--vp-c-brand-1)}.ear-bar-p[data-v-85523283]{text-align:right;font-variant-numeric:tabular-nums}.ear-wait[data-v-85523283],.ear-foot[data-v-85523283]{color:var(--vp-c-text-2);font-size:.9em}.ear-error[data-v-85523283]{color:var(--vp-c-danger-1)}.forecast[data-v-1c46b8b6]{--s1: #2a78d6;--s2: #eb6834;--s3: #1baf7a;--s4: #eda100;--ink: var(--vp-c-text-1);--ink-2: var(--vp-c-text-2);--muted: #898781;--grid: #e1e0d9;--surface: var(--vp-c-bg);margin:16px 0 32px}.dark{--s1: #3987e5;--s2: #d95926;--s3: #199e70;--s4: #c98500;--grid: #2c2c2a}.toolbar[data-v-1c46b8b6],.models[data-v-1c46b8b6]{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center}.models[data-v-1c46b8b6]{margin:12px 0 4px}.field[data-v-1c46b8b6]{display:flex;align-items:center;gap:8px;font-size:14px}.field span[data-v-1c46b8b6]{color:var(--ink-2)}select[data-v-1c46b8b6],input.seed[data-v-1c46b8b6],.csv[data-v-1c46b8b6]{border:1px solid var(--vp-c-divider);border-radius:8px;padding:5px 8px;background:var(--vp-c-bg-soft);color:var(--ink);font:inherit;font-size:14px}input.seed[data-v-1c46b8b6]{width:72px}.csv[data-v-1c46b8b6]{width:100%;margin-top:10px;font-family:var(--vp-font-family-mono);font-size:13px}.seg[data-v-1c46b8b6]{display:inline-flex;border:1px solid var(--vp-c-divider);border-radius:999px;overflow:hidden}.seg button[data-v-1c46b8b6]{padding:5px 14px;font-size:14px;color:var(--ink-2)}.seg button.on[data-v-1c46b8b6]{background:var(--vp-c-brand-soft);color:var(--ink)}.model[data-v-1c46b8b6]{display:inline-flex;align-items:center;gap:7px;font-size:14px;cursor:pointer}.model.off[data-v-1c46b8b6]{opacity:.6;cursor:default}.badge[data-v-1c46b8b6]{font-size:12px;color:var(--ink-2);border:1px solid var(--vp-c-divider);border-radius:999px;padding:1px 8px}.failed-badge[data-v-1c46b8b6]{color:var(--vp-c-danger-1);border-color:var(--vp-c-danger-1)}.failed[data-v-1c46b8b6]{margin:0 0 12px;padding:8px 12px;border-radius:8px;font-size:14px;background:var(--vp-c-danger-soft)}.key[data-v-1c46b8b6]{display:inline-block;width:14px;height:3px;border-radius:2px;margin-right:6px;vertical-align:middle;background:var(--muted)}.key.s1[data-v-1c46b8b6]{background:var(--s1)}.key.s2[data-v-1c46b8b6]{background:var(--s2)}.key.s3[data-v-1c46b8b6]{background:var(--s3)}.key.s4[data-v-1c46b8b6]{background:var(--s4)}.history-key[data-v-1c46b8b6]{background:var(--ink-2)}.truth-key[data-v-1c46b8b6]{background:var(--ink)}.status[data-v-1c46b8b6],.error[data-v-1c46b8b6],.note[data-v-1c46b8b6]{font-size:14px;color:var(--ink-2)}.error[data-v-1c46b8b6]{color:var(--vp-c-danger-1)}.chart[data-v-1c46b8b6]{position:relative;margin:12px 0 0}svg[data-v-1c46b8b6]{width:100%;height:auto;display:block;touch-action:none}.grid line[data-v-1c46b8b6]{stroke:var(--grid);stroke-width:1}.grid text[data-v-1c46b8b6],.axis-note[data-v-1c46b8b6]{fill:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}.cut[data-v-1c46b8b6],.crosshair[data-v-1c46b8b6]{stroke:var(--muted);stroke-width:1}.history[data-v-1c46b8b6]{fill:none;stroke:var(--ink-2);stroke-width:1.5;stroke-linejoin:round}.truth[data-v-1c46b8b6]{fill:none;stroke:var(--ink);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}.median[data-v-1c46b8b6]{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}.median.s1[data-v-1c46b8b6]{stroke:var(--s1)}.median.s2[data-v-1c46b8b6]{stroke:var(--s2)}.median.s3[data-v-1c46b8b6]{stroke:var(--s3)}.median.s4[data-v-1c46b8b6]{stroke:var(--s4)}.band[data-v-1c46b8b6]{stroke:none;opacity:.12}.band.s1[data-v-1c46b8b6]{fill:var(--s1)}.band.s2[data-v-1c46b8b6]{fill:var(--s2)}.band.s3[data-v-1c46b8b6]{fill:var(--s3)}.band.s4[data-v-1c46b8b6]{fill:var(--s4)}.tip[data-v-1c46b8b6]{position:absolute;top:8px;transform:translate(8px);background:var(--vp-c-bg-elv);border:1px solid var(--vp-c-divider);border-radius:8px;padding:6px 10px;font-size:12px;pointer-events:none;white-space:nowrap;box-shadow:var(--vp-shadow-2)}.tip-head[data-v-1c46b8b6]{color:var(--ink-2);margin-bottom:2px}.tip-row b[data-v-1c46b8b6]{font-variant-numeric:tabular-nums}.muted[data-v-1c46b8b6]{color:var(--ink-2)}figcaption[data-v-1c46b8b6]{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:12px;color:var(--ink-2);margin-top:6px}.results[data-v-1c46b8b6]{width:100%;margin-top:16px;font-size:14px}.results .num[data-v-1c46b8b6]{text-align:right;font-variant-numeric:tabular-nums}.results tr.off td[data-v-1c46b8b6]{color:var(--ink-2)}@media(max-width:640px){.tip[data-v-1c46b8b6]{display:none}}.live[data-v-4623a9c7]{border:1px solid var(--vp-c-divider);border-radius:12px;padding:16px;margin:16px 0 24px;background:var(--vp-c-bg-soft)}.live-form[data-v-4623a9c7]{display:grid;gap:10px}.live label[data-v-4623a9c7]{display:grid;gap:4px;font-size:13px;font-weight:600;color:var(--vp-c-text-2)}.live input[type=text][data-v-4623a9c7],.live textarea[data-v-4623a9c7],.live select[data-v-4623a9c7]{font:inherit;font-weight:400;font-size:14px;color:var(--vp-c-text-1);background:var(--vp-c-bg);border:1px solid var(--vp-c-divider);border-radius:8px;padding:6px 10px;width:100%}.live textarea[data-v-4623a9c7]{font-family:var(--vp-font-family-mono);font-size:13px;resize:vertical}.live-row[data-v-4623a9c7]{display:flex;flex-wrap:wrap;gap:16px;align-items:end}.live-row select[data-v-4623a9c7]{width:auto}.live-top[data-v-4623a9c7]{margin-bottom:10px}.live-check[data-v-4623a9c7]{display:flex!important;align-items:center;gap:6px;font-weight:400!important}.live-note[data-v-4623a9c7]{font-size:13px;color:var(--vp-c-text-2);padding-bottom:6px}.live-banner[data-v-4623a9c7]{margin:0 0 10px;padding:8px 12px;border-radius:8px;font-size:14px;background:var(--vp-c-warning-soft)}.live-examples[data-v-4623a9c7]{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-bottom:12px;font-size:13px;color:var(--vp-c-text-2)}.live-examples button[data-v-4623a9c7]{font-size:12px;border:1px solid var(--vp-c-divider);border-radius:14px;padding:2px 10px;background:var(--vp-c-bg);color:var(--vp-c-text-1);cursor:pointer}.live-examples button.on[data-v-4623a9c7]{border-color:var(--vp-c-brand-1);color:var(--vp-c-brand-1)}.live-status[data-v-4623a9c7],.live-error[data-v-4623a9c7]{font-size:14px;margin:12px 0 0}.live-error[data-v-4623a9c7]{color:var(--vp-c-danger-1)}.live-out[data-v-4623a9c7]{margin-top:14px}.live-bars[data-v-4623a9c7]{list-style:none;padding:0;margin:0;display:grid;gap:6px}.live-bars li[data-v-4623a9c7]{display:grid;grid-template-columns:minmax(80px,160px) 1fr 56px;gap:10px;align-items:center;font-size:14px}.live-bars .k[data-v-4623a9c7]{font-family:var(--vp-font-family-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.live-bars .bar[data-v-4623a9c7]{height:10px;border-radius:5px;background:var(--vp-c-default-soft);overflow:hidden}.live-bars .bar span[data-v-4623a9c7]{display:block;height:100%;background:var(--vp-c-text-3);transition:width .15s ease-out}.live-bars li.best .bar span[data-v-4623a9c7]{background:var(--vp-c-brand-1)}.live-bars li.best .k[data-v-4623a9c7]{font-weight:700}.live-bars .p[data-v-4623a9c7]{text-align:right;font-variant-numeric:tabular-nums}.live-verdict[data-v-4623a9c7]{margin-bottom:10px;font-size:15px}.live-verdict span[data-v-4623a9c7]{margin-left:8px;color:var(--vp-c-text-2)}.live-verdict.bad strong[data-v-4623a9c7]{color:var(--vp-c-danger-1)}.live-verdict.unsure strong[data-v-4623a9c7]{color:var(--vp-c-warning-1)}.live-meta[data-v-4623a9c7]{margin:12px 0 0;font-size:13px;color:var(--vp-c-text-2);font-variant-numeric:tabular-nums}.live-times[data-v-4623a9c7]{margin-top:4px}.live-safe[data-v-4623a9c7]{background:var(--vp-c-tip-soft)}.live-failed[data-v-4623a9c7]{background:var(--vp-c-danger-soft)}.live-cards[data-v-4623a9c7]{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.live-card[data-v-4623a9c7]{border:1px solid var(--vp-c-divider);border-radius:10px;padding:10px 12px;background:var(--vp-c-bg)}.live-card h4[data-v-4623a9c7]{margin:0 0 6px;font-size:14px}.live-card .live-meta[data-v-4623a9c7]{margin-top:8px}.live-answer[data-v-4623a9c7]{margin:0 0 8px;font-size:14px}.live .ok[data-v-4623a9c7]{color:var(--vp-c-green-1, var(--vp-c-brand-1))}.live .miss[data-v-4623a9c7]{color:var(--vp-c-danger-1)}.proof[data-v-0aef37c7]{border:1px solid var(--vp-c-divider);border-radius:12px;padding:16px;margin:16px 0 24px;background:var(--vp-c-bg-soft)}.proof-form[data-v-0aef37c7]{display:grid;gap:10px}.proof-form .cols[data-v-0aef37c7]{display:grid;grid-template-columns:1fr 1fr;gap:10px}@media(max-width:640px){.proof-form .cols[data-v-0aef37c7]{grid-template-columns:1fr}}.proof label[data-v-0aef37c7]{display:grid;gap:4px;font-size:13px;font-weight:600;color:var(--vp-c-text-2)}.proof input[type=text][data-v-0aef37c7],.proof textarea[data-v-0aef37c7]{font:inherit;font-weight:400;font-size:14px;color:var(--vp-c-text-1);background:var(--vp-c-bg);border:1px solid var(--vp-c-divider);border-radius:8px;padding:6px 10px;width:100%}.proof textarea[data-v-0aef37c7]{font-family:var(--vp-font-family-mono);font-size:13px;resize:vertical}.proof-status[data-v-0aef37c7],.proof-error[data-v-0aef37c7]{font-size:14px;margin:12px 0 0}.proof-error[data-v-0aef37c7]{color:var(--vp-c-danger-1)}.proof-out[data-v-0aef37c7]{margin-top:12px}.proof-table[data-v-0aef37c7]{margin-top:12px;font-size:13px;font-variant-numeric:tabular-nums;display:block;overflow-x:auto}.proof-table td[data-v-0aef37c7]:first-child{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.proof-meta[data-v-0aef37c7]{margin:10px 0 0;font-size:13px;color:var(--vp-c-text-2)}.play[data-v-4bc396f2]{margin-top:12px}.tabs[data-v-4bc396f2]{display:flex;gap:6px;padding:4px;border-radius:12px;background:var(--vp-c-bg-soft);border:1px solid var(--vp-c-divider);width:fit-content;max-width:100%;overflow-x:auto}.tab[data-v-4bc396f2]{padding:7px 14px;border-radius:9px;font-weight:600;font-size:14px;color:var(--vp-c-text-2);white-space:nowrap}.tab.active[data-v-4bc396f2]{color:var(--vp-c-text-1);background:var(--vp-c-bg);box-shadow:0 1px 3px #00000026}.blurb[data-v-4bc396f2]{margin:12px 0!important;color:var(--vp-c-text-2);font-size:14px}.rules[data-v-4bc396f2]{margin:-4px 0 12px!important;color:var(--vp-c-text-3);font-size:13px;line-height:1.5}.toolbar[data-v-4bc396f2]{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;margin-bottom:12px}.seg[data-v-4bc396f2]{display:inline-flex;border:1px solid var(--vp-c-divider);border-radius:10px;overflow:hidden}.seg button[data-v-4bc396f2]{padding:6px 14px;font-weight:600;font-size:13px;color:var(--vp-c-text-2)}.seg button.on[data-v-4bc396f2]{color:#fff;background:var(--vp-c-brand-1)}.field[data-v-4bc396f2]{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--vp-c-text-2)}.field select[data-v-4bc396f2]{padding:5px 8px;border-radius:8px;border:1px solid var(--vp-c-divider);background:var(--vp-c-bg);color:var(--vp-c-text-1);font-size:13px;max-width:280px}.check[data-v-4bc396f2]{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--vp-c-text-2)}.ghost[data-v-4bc396f2]{padding:6px 12px;border-radius:8px;border:1px solid var(--vp-c-divider);font-size:13px;font-weight:600}.ghost[data-v-4bc396f2]:hover{border-color:var(--vp-c-brand-1)}.failed[data-v-4bc396f2]{margin:8px 0 0;padding:8px 12px;border-radius:8px;font-size:14px;background:var(--vp-c-danger-soft)}.status[data-v-4bc396f2],.error[data-v-4bc396f2]{margin:0 0 10px!important;font-size:13px}.error[data-v-4bc396f2]{color:var(--vp-c-danger-1)}.layout[data-v-4bc396f2]{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}@media(max-width:960px){.layout[data-v-4bc396f2]{grid-template-columns:1fr}}.stage[data-v-4bc396f2]{position:relative;width:100%;border-radius:16px;overflow:hidden;border:1px solid var(--vp-c-divider);background:var(--vp-c-bg-soft);touch-action:none;user-select:none;outline:none}.stage[data-v-4bc396f2]:focus-visible{box-shadow:0 0 0 2px var(--vp-c-brand-1)}.stage.flappy[data-v-4bc396f2]{aspect-ratio:15 / 13;width:min(100%,calc(72vh * 15 / 13))}.stage.rescue[data-v-4bc396f2]{aspect-ratio:1 / 1.06;width:min(100%,calc(78vh / 1.06))}.stage.dodge[data-v-4bc396f2]{aspect-ratio:16 / 10;width:min(100%,115.2vh)}.stage.doom[data-v-4bc396f2]{aspect-ratio:16 / 10;width:min(100%,115.2vh);background:#000}.canvas[data-v-4bc396f2]{display:block;width:100%;height:100%}.veto[data-v-4bc396f2]{position:absolute;top:14px;left:50%;transform:translate(-50%);padding:6px 16px;border-radius:10px;font-weight:800;letter-spacing:.12em;color:#fff;background:#dc2626;box-shadow:0 0 0 4px #dc26264d;animation:flash-4bc396f2 .7s ease-out forwards;pointer-events:none}@keyframes flash-4bc396f2{0%{opacity:1;transform:translate(-50%) scale(1.15)}70%{opacity:1;transform:translate(-50%) scale(1)}to{opacity:0}}@media(prefers-reduced-motion:reduce){.veto[data-v-4bc396f2]{animation:none}}.modenote[data-v-4bc396f2]{position:absolute;top:14px;right:14px;padding:5px 12px;border-radius:999px;font-size:13px;font-weight:700;color:#fff;background:var(--vp-c-brand-1);pointer-events:none}.overlay[data-v-4bc396f2]{position:absolute;inset:auto 0 18px;margin:auto;width:fit-content;padding:6px 14px;border-radius:999px;font-size:13px;font-weight:600;color:#fff;background:#0f172abf;pointer-events:none}.hud[data-v-4bc396f2]{padding:16px;border-radius:16px;border:1px solid var(--vp-c-divider);background:var(--vp-c-bg-soft);font-size:13px}.policy[data-v-4bc396f2]{display:flex;align-items:center;gap:8px;font-weight:700;font-size:14px}.dot[data-v-4bc396f2]{width:8px;height:8px;border-radius:50%;background:#f59e0b}.dot.model[data-v-4bc396f2]{background:#22c55e}.metrics[data-v-4bc396f2]{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}.mv[data-v-4bc396f2]{font-size:20px;font-weight:750;font-variant-numeric:tabular-nums;line-height:1.2}.ml[data-v-4bc396f2]{font-size:11px;color:var(--vp-c-text-3)}.engine[data-v-4bc396f2]{margin:-4px 0 10px}.depth[data-v-4bc396f2]{margin:0 0 10px;padding:8px 10px;border-radius:10px;background:var(--vp-c-bg);border:1px solid var(--vp-c-divider);font-size:12px}.drow[data-v-4bc396f2]{display:grid;grid-template-columns:96px auto 1fr;align-items:center;gap:8px;margin:2px 0}.dl[data-v-4bc396f2]{color:var(--vp-c-text-3)}.dv[data-v-4bc396f2]{color:var(--vp-c-text-2);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}.cells[data-v-4bc396f2]{display:inline-flex;gap:3px}.cell[data-v-4bc396f2]{width:10px;height:10px;border-radius:3px;background:var(--vp-c-default-soft)}.cell.on[data-v-4bc396f2]{background:var(--vp-c-brand-1)}.tag[data-v-4bc396f2]{padding:0 6px;border-radius:6px;font-weight:600;color:var(--vp-c-text-2);background:var(--vp-c-default-soft)}.tag.ok[data-v-4bc396f2]{color:#fff;background:#16a34a}.throttle[data-v-4bc396f2]{margin:0 0 10px!important;font-size:12px;color:var(--vp-c-warning-1)}.qtitle[data-v-4bc396f2]{margin:10px 0 6px;font-weight:600;color:var(--vp-c-text-2);font-size:12px}.bars[data-v-4bc396f2]{list-style:none;margin:0!important;padding:0!important}.bars li[data-v-4bc396f2]{display:grid;grid-template-columns:86px 1fr 48px;align-items:center;gap:8px;margin:0 0 5px!important}.bk[data-v-4bc396f2]{font-family:var(--vp-font-family-mono);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bt[data-v-4bc396f2]{height:10px;border-radius:5px;background:var(--vp-c-default-soft);overflow:hidden}.bf[data-v-4bc396f2]{display:block;height:100%;border-radius:5px;background:var(--vp-c-text-3);transition:width .08s linear}.chosen .bf[data-v-4bc396f2]{background:var(--vp-c-brand-1)}.chosen .bk[data-v-4bc396f2]{font-weight:700;color:var(--vp-c-brand-1)}.bp[data-v-4bc396f2]{text-align:right;font-variant-numeric:tabular-nums;font-size:12px}.exec[data-v-4bc396f2]{margin:4px 0 8px;font-size:12px;color:var(--vp-c-danger-1)}.gauge[data-v-4bc396f2]{height:12px;border-radius:6px;background:var(--vp-c-default-soft);overflow:hidden}.gf[data-v-4bc396f2]{display:block;height:100%;background:linear-gradient(90deg,#22c55e,#f59e0b 60%,#ef4444);transition:width .08s linear}.gv[data-v-4bc396f2]{margin-top:4px;font-variant-numeric:tabular-nums;font-size:12px;color:var(--vp-c-text-2)}.controls[data-v-4bc396f2]{margin-top:8px}.help[data-v-4bc396f2]{margin:0 0 8px!important;font-size:12px;color:var(--vp-c-text-3)}.buttons[data-v-4bc396f2]{display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.buttons.flappy[data-v-4bc396f2]{grid-template-columns:1fr}.buttons.rescue[data-v-4bc396f2]{grid-template-columns:repeat(3,1fr);grid-template-areas:". n ." "w hv e" ". s home"}.buttons.rescue .north[data-v-4bc396f2]{grid-area:n}.buttons.rescue .west[data-v-4bc396f2]{grid-area:w}.buttons.rescue .east[data-v-4bc396f2]{grid-area:e}.buttons.rescue .south[data-v-4bc396f2]{grid-area:s}.buttons.rescue .hover[data-v-4bc396f2]{grid-area:hv}.buttons.rescue .return_home[data-v-4bc396f2]{grid-area:home}.ctl[data-v-4bc396f2]{padding:12px 8px;border-radius:10px;font-weight:700;font-size:14px;color:var(--vp-c-text-1);background:var(--vp-c-bg);border:1px solid var(--vp-c-divider);touch-action:manipulation}.ctl[data-v-4bc396f2]:active{background:var(--vp-c-brand-soft);border-color:var(--vp-c-brand-1)}.ctl.thrust[data-v-4bc396f2]{padding:18px;font-size:16px}.ctl.abort[data-v-4bc396f2]{color:var(--vp-c-danger-1)}.buttons.doom[data-v-4bc396f2]{grid-template-columns:repeat(3,1fr)}.buttons.doom .shoot[data-v-4bc396f2]{grid-column:span 2;color:var(--vp-c-danger-1)}.foot[data-v-4bc396f2]{display:flex;justify-content:space-between;margin-top:12px;font-size:12px;color:var(--vp-c-text-3)}.state[data-v-4bc396f2]{display:block;margin-top:8px;padding:6px 8px;border-radius:6px;font-size:11px;line-height:1.5;word-break:break-word;white-space:normal}
|
assets/index-DApumCj4.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
doom/COPYING.txt
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright © 2001-2024
|
| 2 |
+
Contributors to the Freedoom project. All rights reserved.
|
| 3 |
+
|
| 4 |
+
Redistribution and use in source and binary forms, with or without
|
| 5 |
+
modification, are permitted provided that the following conditions are
|
| 6 |
+
met:
|
| 7 |
+
|
| 8 |
+
* Redistributions of source code must retain the above copyright
|
| 9 |
+
notice, this list of conditions and the following disclaimer.
|
| 10 |
+
* Redistributions in binary form must reproduce the above copyright
|
| 11 |
+
notice, this list of conditions and the following disclaimer in the
|
| 12 |
+
documentation and/or other materials provided with the distribution.
|
| 13 |
+
* Neither the name of the Freedoom project nor the names of its
|
| 14 |
+
contributors may be used to endorse or promote products derived from
|
| 15 |
+
this software without specific prior written permission.
|
| 16 |
+
|
| 17 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS
|
| 18 |
+
IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
| 19 |
+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
| 20 |
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
| 21 |
+
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
| 22 |
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
| 23 |
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
| 24 |
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
| 25 |
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
| 26 |
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| 27 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 28 |
+
|
| 29 |
+
For a list of contributors to the Freedoom project, see the file
|
| 30 |
+
CREDITS.
|
doom/README.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Graphics from Freedoom v0.13.0 (https://github.com/freedoom/freedoom, source archive of tag v0.13.0), BSD-3-Clause, see COPYING.txt.
|
| 2 |
+
Walls (composed from their patches): wall1 STARTAN3 and wall3 MARBLE1 (full 128x128), wall2 GRAY1, wall4 BRICK7, wall5 COMPTALL (columns 192-255), door SPCDOOR1, exitsw0/exitsw1 SW1STRTN/SW2STRTN; floor FLOOR4_8, ceil CEIL3_5.
|
| 3 |
+
Sprites: imp TROO A1-H1 + I0-M0, zombie POSS A1-G1 + H0-L0, fireball BAL1 A0-B0, health STIM A0, medikit MEDI A0, ammo SBOX A0, weapon SHTG A0, weapon_flash SHTF A0-B0.
|
| 4 |
+
The files were cropped, packed into sprite sheets and converted to PNG with real alpha for this site.
|
doom/ammo.png
ADDED
|
doom/ceil.png
ADDED
|
doom/door.png
ADDED
|
doom/exitsw0.png
ADDED
|
doom/exitsw1.png
ADDED
|
doom/fireball.png
ADDED
|
doom/floor.png
ADDED
|
doom/health.png
ADDED
|
doom/imp.png
ADDED
|
doom/medikit.png
ADDED
|
doom/wall1.png
ADDED
|
doom/wall2.png
ADDED
|
doom/wall3.png
ADDED
|
doom/wall4.png
ADDED
|
doom/wall5.png
ADDED
|
doom/weapon.png
ADDED
|
doom/weapon_flash.png
ADDED
|
doom/zombie.png
ADDED
|
index.html
CHANGED
|
@@ -1,19 +1,13 @@
|
|
| 1 |
<!doctype html>
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
<p>
|
| 14 |
-
Also don't forget to check the
|
| 15 |
-
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
|
| 16 |
-
</p>
|
| 17 |
-
</div>
|
| 18 |
-
</body>
|
| 19 |
</html>
|
|
|
|
| 1 |
<!doctype html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
+
<title>skycmd demo</title>
|
| 7 |
+
<script type="module" crossorigin src="./assets/index-DApumCj4.js"></script>
|
| 8 |
+
<link rel="stylesheet" crossorigin href="./assets/index-BGhbf8wU.css">
|
| 9 |
+
</head>
|
| 10 |
+
<body>
|
| 11 |
+
<div id="app"></div>
|
| 12 |
+
</body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
</html>
|
models/manifest.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"name": "s6-micro",
|
| 4 |
+
"arch": "skycmd-s2",
|
| 5 |
+
"weight_format": "ternary",
|
| 6 |
+
"task": "general",
|
| 7 |
+
"full_depth": true,
|
| 8 |
+
"gate": "passed",
|
| 9 |
+
"gate_note": "Second version: 0.553 on the typed-decisions bench (gate 0.45) and ECE 0.0588 (guard 0.08). The first version failed the ECE guard at 0.0821, and this one was designed after that reading and judged on the same test records, so its pass is a second look",
|
| 10 |
+
"gate_url": "https://github.com/maxgfr/skycmd/blob/main/BENCH.md#skycmd-s6-s6-nano-s6-micro-general-purpose-decisions-and-games-pre-registered",
|
| 11 |
+
"params": 5587201,
|
| 12 |
+
"bytes": 2420032,
|
| 13 |
+
"file": "s6-micro.gguf"
|
| 14 |
+
}
|
| 15 |
+
]
|
models/s6-micro.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* A loaded decision model (GGUF s1 or s2: f32, f16, Q8_0 or ternary; computed in f32).
|
| 3 |
+
*/
|
| 4 |
+
export class Engine {
|
| 5 |
+
static __wrap(ptr) {
|
| 6 |
+
const obj = Object.create(Engine.prototype);
|
| 7 |
+
obj.__wbg_ptr = ptr;
|
| 8 |
+
EngineFinalization.register(obj, obj.__wbg_ptr, obj);
|
| 9 |
+
return obj;
|
| 10 |
+
}
|
| 11 |
+
__destroy_into_raw() {
|
| 12 |
+
const ptr = this.__wbg_ptr;
|
| 13 |
+
this.__wbg_ptr = 0;
|
| 14 |
+
EngineFinalization.unregister(this);
|
| 15 |
+
return ptr;
|
| 16 |
+
}
|
| 17 |
+
free() {
|
| 18 |
+
const ptr = this.__destroy_into_raw();
|
| 19 |
+
wasm.__wbg_engine_free(ptr, 0);
|
| 20 |
+
}
|
| 21 |
+
/**
|
| 22 |
+
* s6-ear (SPEC-S6 §16): a decision about an audio clip, `pcm` 16 kHz mono in `[-1, 1]`
|
| 23 |
+
* (the last 10.24 s count; resample the microphone to 16 kHz first). Same arguments and
|
| 24 |
+
* JSON answer as [`Engine::decide`], with `pcm` as the state.
|
| 25 |
+
* @param {string} qtype
|
| 26 |
+
* @param {string} instructions
|
| 27 |
+
* @param {string} options_json
|
| 28 |
+
* @param {Float32Array} pcm
|
| 29 |
+
* @returns {string}
|
| 30 |
+
*/
|
| 31 |
+
decideAudio(qtype, instructions, options_json, pcm) {
|
| 32 |
+
let deferred6_0;
|
| 33 |
+
let deferred6_1;
|
| 34 |
+
try {
|
| 35 |
+
const ptr0 = passStringToWasm0(qtype, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 36 |
+
const len0 = WASM_VECTOR_LEN;
|
| 37 |
+
const ptr1 = passStringToWasm0(instructions, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 38 |
+
const len1 = WASM_VECTOR_LEN;
|
| 39 |
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 40 |
+
const len2 = WASM_VECTOR_LEN;
|
| 41 |
+
const ptr3 = passArrayF32ToWasm0(pcm, wasm.__wbindgen_malloc);
|
| 42 |
+
const len3 = WASM_VECTOR_LEN;
|
| 43 |
+
const ret = wasm.engine_decideAudio(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
| 44 |
+
var ptr5 = ret[0];
|
| 45 |
+
var len5 = ret[1];
|
| 46 |
+
if (ret[3]) {
|
| 47 |
+
ptr5 = 0; len5 = 0;
|
| 48 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 49 |
+
}
|
| 50 |
+
deferred6_0 = ptr5;
|
| 51 |
+
deferred6_1 = len5;
|
| 52 |
+
return getStringFromWasm0(ptr5, len5);
|
| 53 |
+
} finally {
|
| 54 |
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
+
/**
|
| 58 |
+
* A generic decision (the /live demos): `type` is `choice`, `score` or `noul`,
|
| 59 |
+
* `options_json` a JSON array of rendered option texts. Returns
|
| 60 |
+
* `{"probs", "exit", "n_exits", "layers_used", "static_hit", "state_hit", "micros"}` as
|
| 61 |
+
* JSON (`state_hit`: s2 and iso reused the encoding of the same state).
|
| 62 |
+
* @param {string} qtype
|
| 63 |
+
* @param {string} instructions
|
| 64 |
+
* @param {string} options_json
|
| 65 |
+
* @param {string} state
|
| 66 |
+
* @returns {string}
|
| 67 |
+
*/
|
| 68 |
+
decide(qtype, instructions, options_json, state) {
|
| 69 |
+
let deferred6_0;
|
| 70 |
+
let deferred6_1;
|
| 71 |
+
try {
|
| 72 |
+
const ptr0 = passStringToWasm0(qtype, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 73 |
+
const len0 = WASM_VECTOR_LEN;
|
| 74 |
+
const ptr1 = passStringToWasm0(instructions, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 75 |
+
const len1 = WASM_VECTOR_LEN;
|
| 76 |
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 77 |
+
const len2 = WASM_VECTOR_LEN;
|
| 78 |
+
const ptr3 = passStringToWasm0(state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 79 |
+
const len3 = WASM_VECTOR_LEN;
|
| 80 |
+
const ret = wasm.engine_decide(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
| 81 |
+
var ptr5 = ret[0];
|
| 82 |
+
var len5 = ret[1];
|
| 83 |
+
if (ret[3]) {
|
| 84 |
+
ptr5 = 0; len5 = 0;
|
| 85 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 86 |
+
}
|
| 87 |
+
deferred6_0 = ptr5;
|
| 88 |
+
deferred6_1 = len5;
|
| 89 |
+
return getStringFromWasm0(ptr5, len5);
|
| 90 |
+
} finally {
|
| 91 |
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
| 92 |
+
}
|
| 93 |
+
}
|
| 94 |
+
/**
|
| 95 |
+
* Model family: `s1` (ModernBERT + decision head), `s2` (static cache, early exits) or
|
| 96 |
+
* `iso` (s5: options isolated by construction, definitions only).
|
| 97 |
+
* @returns {string}
|
| 98 |
+
*/
|
| 99 |
+
family() {
|
| 100 |
+
let deferred1_0;
|
| 101 |
+
let deferred1_1;
|
| 102 |
+
try {
|
| 103 |
+
const ret = wasm.engine_family(this.__wbg_ptr);
|
| 104 |
+
deferred1_0 = ret[0];
|
| 105 |
+
deferred1_1 = ret[1];
|
| 106 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 107 |
+
} finally {
|
| 108 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
/**
|
| 112 |
+
* Size of the GGUF file in bytes.
|
| 113 |
+
* @returns {number}
|
| 114 |
+
*/
|
| 115 |
+
file_bytes() {
|
| 116 |
+
const ret = wasm.engine_file_bytes(this.__wbg_ptr);
|
| 117 |
+
return ret;
|
| 118 |
+
}
|
| 119 |
+
/**
|
| 120 |
+
* Model description as JSON (architecture, temperatures, `n_params`, `file_bytes`).
|
| 121 |
+
* @returns {string}
|
| 122 |
+
*/
|
| 123 |
+
info() {
|
| 124 |
+
let deferred1_0;
|
| 125 |
+
let deferred1_1;
|
| 126 |
+
try {
|
| 127 |
+
const ret = wasm.engine_info(this.__wbg_ptr);
|
| 128 |
+
deferred1_0 = ret[0];
|
| 129 |
+
deferred1_1 = ret[1];
|
| 130 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 131 |
+
} finally {
|
| 132 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 133 |
+
}
|
| 134 |
+
}
|
| 135 |
+
/**
|
| 136 |
+
* True for an s6-ear model (its decisions take audio: [`Engine::decide_audio`]).
|
| 137 |
+
* @returns {boolean}
|
| 138 |
+
*/
|
| 139 |
+
isAudio() {
|
| 140 |
+
const ret = wasm.engine_isAudio(this.__wbg_ptr);
|
| 141 |
+
return ret !== 0;
|
| 142 |
+
}
|
| 143 |
+
/**
|
| 144 |
+
* Number of parameters.
|
| 145 |
+
* @returns {number}
|
| 146 |
+
*/
|
| 147 |
+
n_params() {
|
| 148 |
+
const ret = wasm.engine_n_params(this.__wbg_ptr);
|
| 149 |
+
return ret;
|
| 150 |
+
}
|
| 151 |
+
/**
|
| 152 |
+
* @returns {string}
|
| 153 |
+
*/
|
| 154 |
+
name() {
|
| 155 |
+
let deferred1_0;
|
| 156 |
+
let deferred1_1;
|
| 157 |
+
try {
|
| 158 |
+
const ret = wasm.engine_name(this.__wbg_ptr);
|
| 159 |
+
deferred1_0 = ret[0];
|
| 160 |
+
deferred1_1 = ret[1];
|
| 161 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 162 |
+
} finally {
|
| 163 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 164 |
+
}
|
| 165 |
+
}
|
| 166 |
+
/**
|
| 167 |
+
* @param {Uint8Array} gguf_bytes
|
| 168 |
+
*/
|
| 169 |
+
constructor(gguf_bytes) {
|
| 170 |
+
const ptr0 = passArray8ToWasm0(gguf_bytes, wasm.__wbindgen_malloc);
|
| 171 |
+
const len0 = WASM_VECTOR_LEN;
|
| 172 |
+
const ret = wasm.engine_new(ptr0, len0);
|
| 173 |
+
if (ret[2]) {
|
| 174 |
+
throw takeFromExternrefTable0(ret[1]);
|
| 175 |
+
}
|
| 176 |
+
this.__wbg_ptr = ret[0];
|
| 177 |
+
EngineFinalization.register(this, this.__wbg_ptr, this);
|
| 178 |
+
return this;
|
| 179 |
+
}
|
| 180 |
+
/**
|
| 181 |
+
* s2: override the early-exit threshold τ of every question type (undefined: the
|
| 182 |
+
* calibrated values; 1.0: full depth). No effect on s1 models.
|
| 183 |
+
* @param {number | null} [tau]
|
| 184 |
+
*/
|
| 185 |
+
setExitThreshold(tau) {
|
| 186 |
+
wasm.engine_setExitThreshold(this.__wbg_ptr, isLikeNone(tau) ? Number.MAX_SAFE_INTEGER : Math.fround(tau));
|
| 187 |
+
}
|
| 188 |
+
/**
|
| 189 |
+
* iso: language of the generic `noul` definitions (`en` or `fr`). No effect on s1 / s2.
|
| 190 |
+
* @param {string} lang
|
| 191 |
+
*/
|
| 192 |
+
setLang(lang) {
|
| 193 |
+
const ptr0 = passStringToWasm0(lang, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 194 |
+
const len0 = WASM_VECTOR_LEN;
|
| 195 |
+
wasm.engine_setLang(this.__wbg_ptr, ptr0, len0);
|
| 196 |
+
}
|
| 197 |
+
/**
|
| 198 |
+
* Load with s2 engine options: `static_cache = false` encodes the question and options
|
| 199 |
+
* every decision (no LRU, for benchmarks); `ternary_packed = true` computes ternary
|
| 200 |
+
* matrices with the packed add/sub kernels instead of f32. No effect on s1 models.
|
| 201 |
+
* @param {Uint8Array} gguf_bytes
|
| 202 |
+
* @param {boolean} static_cache
|
| 203 |
+
* @param {boolean} ternary_packed
|
| 204 |
+
* @returns {Engine}
|
| 205 |
+
*/
|
| 206 |
+
static withOptions(gguf_bytes, static_cache, ternary_packed) {
|
| 207 |
+
const ptr0 = passArray8ToWasm0(gguf_bytes, wasm.__wbindgen_malloc);
|
| 208 |
+
const len0 = WASM_VECTOR_LEN;
|
| 209 |
+
const ret = wasm.engine_withOptions(ptr0, len0, static_cache, ternary_packed);
|
| 210 |
+
if (ret[2]) {
|
| 211 |
+
throw takeFromExternrefTable0(ret[1]);
|
| 212 |
+
}
|
| 213 |
+
return Engine.__wrap(ret[0]);
|
| 214 |
+
}
|
| 215 |
+
}
|
| 216 |
+
if (Symbol.dispose) Engine.prototype[Symbol.dispose] = Engine.prototype.free;
|
| 217 |
+
|
| 218 |
+
/**
|
| 219 |
+
* A loaded forecaster.
|
| 220 |
+
*/
|
| 221 |
+
export class Forecaster {
|
| 222 |
+
__destroy_into_raw() {
|
| 223 |
+
const ptr = this.__wbg_ptr;
|
| 224 |
+
this.__wbg_ptr = 0;
|
| 225 |
+
ForecasterFinalization.unregister(this);
|
| 226 |
+
return ptr;
|
| 227 |
+
}
|
| 228 |
+
free() {
|
| 229 |
+
const ptr = this.__destroy_into_raw();
|
| 230 |
+
wasm.__wbg_forecaster_free(ptr, 0);
|
| 231 |
+
}
|
| 232 |
+
/**
|
| 233 |
+
* Quantiles of `horizon` steps after `history` (NaN = missing), `[horizon × levels]`
|
| 234 |
+
* row-major, in the units of the history. `flip` averages with the sign-flipped series
|
| 235 |
+
* (two passes).
|
| 236 |
+
* @param {Float32Array} history
|
| 237 |
+
* @param {number} horizon
|
| 238 |
+
* @param {boolean} flip
|
| 239 |
+
* @returns {Float32Array}
|
| 240 |
+
*/
|
| 241 |
+
forecast(history, horizon, flip) {
|
| 242 |
+
const ptr0 = passArrayF32ToWasm0(history, wasm.__wbindgen_malloc);
|
| 243 |
+
const len0 = WASM_VECTOR_LEN;
|
| 244 |
+
const ret = wasm.forecaster_forecast(this.__wbg_ptr, ptr0, len0, horizon, flip);
|
| 245 |
+
if (ret[3]) {
|
| 246 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 247 |
+
}
|
| 248 |
+
var v2 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
| 249 |
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
| 250 |
+
return v2;
|
| 251 |
+
}
|
| 252 |
+
/**
|
| 253 |
+
* JSON: `name`, `params`, `bytes`, `levels`, `pass_horizon`, the front end of an s6-cast
|
| 254 |
+
* v2 file (`periods`: the detected periods K, 0 without; `draft`), and of the last forecast
|
| 255 |
+
* `micros`, `exits_used`, `passes`.
|
| 256 |
+
* @returns {string}
|
| 257 |
+
*/
|
| 258 |
+
info() {
|
| 259 |
+
let deferred1_0;
|
| 260 |
+
let deferred1_1;
|
| 261 |
+
try {
|
| 262 |
+
const ret = wasm.forecaster_info(this.__wbg_ptr);
|
| 263 |
+
deferred1_0 = ret[0];
|
| 264 |
+
deferred1_1 = ret[1];
|
| 265 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 266 |
+
} finally {
|
| 267 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 268 |
+
}
|
| 269 |
+
}
|
| 270 |
+
/**
|
| 271 |
+
* The quantile levels.
|
| 272 |
+
* @returns {Float32Array}
|
| 273 |
+
*/
|
| 274 |
+
levels() {
|
| 275 |
+
const ret = wasm.forecaster_levels(this.__wbg_ptr);
|
| 276 |
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
| 277 |
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
| 278 |
+
return v1;
|
| 279 |
+
}
|
| 280 |
+
/**
|
| 281 |
+
* @param {Uint8Array} gguf_bytes
|
| 282 |
+
*/
|
| 283 |
+
constructor(gguf_bytes) {
|
| 284 |
+
const ptr0 = passArray8ToWasm0(gguf_bytes, wasm.__wbindgen_malloc);
|
| 285 |
+
const len0 = WASM_VECTOR_LEN;
|
| 286 |
+
const ret = wasm.forecaster_new(ptr0, len0);
|
| 287 |
+
if (ret[2]) {
|
| 288 |
+
throw takeFromExternrefTable0(ret[1]);
|
| 289 |
+
}
|
| 290 |
+
this.__wbg_ptr = ret[0];
|
| 291 |
+
ForecasterFinalization.register(this, this.__wbg_ptr, this);
|
| 292 |
+
return this;
|
| 293 |
+
}
|
| 294 |
+
}
|
| 295 |
+
if (Symbol.dispose) Forecaster.prototype[Symbol.dispose] = Forecaster.prototype.free;
|
| 296 |
+
|
| 297 |
+
/**
|
| 298 |
+
* A game (`flappy`, `rescue`, `dodge` or `doom`) stepped by a human, the model or the oracle.
|
| 299 |
+
*/
|
| 300 |
+
export class GameSession {
|
| 301 |
+
__destroy_into_raw() {
|
| 302 |
+
const ptr = this.__wbg_ptr;
|
| 303 |
+
this.__wbg_ptr = 0;
|
| 304 |
+
GameSessionFinalization.unregister(this);
|
| 305 |
+
return ptr;
|
| 306 |
+
}
|
| 307 |
+
free() {
|
| 308 |
+
const ptr = this.__destroy_into_raw();
|
| 309 |
+
wasm.__wbg_gamesession_free(ptr, 0);
|
| 310 |
+
}
|
| 311 |
+
/**
|
| 312 |
+
* Action keys accepted by [`GameSession::step_human`], as a JSON array.
|
| 313 |
+
* @returns {string}
|
| 314 |
+
*/
|
| 315 |
+
action_keys() {
|
| 316 |
+
let deferred1_0;
|
| 317 |
+
let deferred1_1;
|
| 318 |
+
try {
|
| 319 |
+
const ret = wasm.gamesession_action_keys(this.__wbg_ptr);
|
| 320 |
+
deferred1_0 = ret[0];
|
| 321 |
+
deferred1_1 = ret[1];
|
| 322 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 323 |
+
} finally {
|
| 324 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 325 |
+
}
|
| 326 |
+
}
|
| 327 |
+
/**
|
| 328 |
+
* @returns {number}
|
| 329 |
+
*/
|
| 330 |
+
decide_every() {
|
| 331 |
+
const ret = wasm.gamesession_decide_every(this.__wbg_ptr);
|
| 332 |
+
return ret >>> 0;
|
| 333 |
+
}
|
| 334 |
+
/**
|
| 335 |
+
* @returns {boolean}
|
| 336 |
+
*/
|
| 337 |
+
done() {
|
| 338 |
+
const ret = wasm.gamesession_done(this.__wbg_ptr);
|
| 339 |
+
return ret !== 0;
|
| 340 |
+
}
|
| 341 |
+
/**
|
| 342 |
+
* @returns {string}
|
| 343 |
+
*/
|
| 344 |
+
kind() {
|
| 345 |
+
let deferred1_0;
|
| 346 |
+
let deferred1_1;
|
| 347 |
+
try {
|
| 348 |
+
const ret = wasm.gamesession_kind(this.__wbg_ptr);
|
| 349 |
+
deferred1_0 = ret[0];
|
| 350 |
+
deferred1_1 = ret[1];
|
| 351 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 352 |
+
} finally {
|
| 353 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 354 |
+
}
|
| 355 |
+
}
|
| 356 |
+
/**
|
| 357 |
+
* `seed` selects the sequence of courses (a JS number; episodes are deterministic).
|
| 358 |
+
* @param {string} kind
|
| 359 |
+
* @param {number} seed
|
| 360 |
+
*/
|
| 361 |
+
constructor(kind, seed) {
|
| 362 |
+
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 363 |
+
const len0 = WASM_VECTOR_LEN;
|
| 364 |
+
const ret = wasm.gamesession_new(ptr0, len0, seed);
|
| 365 |
+
if (ret[2]) {
|
| 366 |
+
throw takeFromExternrefTable0(ret[1]);
|
| 367 |
+
}
|
| 368 |
+
this.__wbg_ptr = ret[0];
|
| 369 |
+
GameSessionFinalization.register(this, this.__wbg_ptr, this);
|
| 370 |
+
return this;
|
| 371 |
+
}
|
| 372 |
+
/**
|
| 373 |
+
* The questions as JSON: `[{id, type, instructions, keys, options}]`.
|
| 374 |
+
* @returns {string}
|
| 375 |
+
*/
|
| 376 |
+
questions() {
|
| 377 |
+
let deferred1_0;
|
| 378 |
+
let deferred1_1;
|
| 379 |
+
try {
|
| 380 |
+
const ret = wasm.gamesession_questions(this.__wbg_ptr);
|
| 381 |
+
deferred1_0 = ret[0];
|
| 382 |
+
deferred1_1 = ret[1];
|
| 383 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 384 |
+
} finally {
|
| 385 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 386 |
+
}
|
| 387 |
+
}
|
| 388 |
+
reset() {
|
| 389 |
+
wasm.gamesession_reset(this.__wbg_ptr);
|
| 390 |
+
}
|
| 391 |
+
/**
|
| 392 |
+
* @returns {number}
|
| 393 |
+
*/
|
| 394 |
+
score() {
|
| 395 |
+
const ret = wasm.gamesession_score(this.__wbg_ptr);
|
| 396 |
+
return ret >>> 0;
|
| 397 |
+
}
|
| 398 |
+
/**
|
| 399 |
+
* Decide on every `n`-th due frame (hold the last decision in between).
|
| 400 |
+
* @param {number} n
|
| 401 |
+
*/
|
| 402 |
+
set_decide_every(n) {
|
| 403 |
+
wasm.gamesession_set_decide_every(this.__wbg_ptr, n);
|
| 404 |
+
}
|
| 405 |
+
/**
|
| 406 |
+
* Enable or disable the coded safety reflex (rescue, dodge).
|
| 407 |
+
* @param {boolean} on
|
| 408 |
+
*/
|
| 409 |
+
set_veto(on) {
|
| 410 |
+
wasm.gamesession_set_veto(this.__wbg_ptr, on);
|
| 411 |
+
}
|
| 412 |
+
/**
|
| 413 |
+
* Render data as JSON: `{kind, score, done, stats, view}` (`view` is the game snapshot).
|
| 414 |
+
* @returns {string}
|
| 415 |
+
*/
|
| 416 |
+
snapshot() {
|
| 417 |
+
let deferred1_0;
|
| 418 |
+
let deferred1_1;
|
| 419 |
+
try {
|
| 420 |
+
const ret = wasm.gamesession_snapshot(this.__wbg_ptr);
|
| 421 |
+
deferred1_0 = ret[0];
|
| 422 |
+
deferred1_1 = ret[1];
|
| 423 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 424 |
+
} finally {
|
| 425 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 426 |
+
}
|
| 427 |
+
}
|
| 428 |
+
/**
|
| 429 |
+
* @returns {string}
|
| 430 |
+
*/
|
| 431 |
+
state_text() {
|
| 432 |
+
let deferred1_0;
|
| 433 |
+
let deferred1_1;
|
| 434 |
+
try {
|
| 435 |
+
const ret = wasm.gamesession_state_text(this.__wbg_ptr);
|
| 436 |
+
deferred1_0 = ret[0];
|
| 437 |
+
deferred1_1 = ret[1];
|
| 438 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 439 |
+
} finally {
|
| 440 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 441 |
+
}
|
| 442 |
+
}
|
| 443 |
+
/**
|
| 444 |
+
* One AI frame with the model. Returns `{policy, decided, action, executed, probs:
|
| 445 |
+
* [{key, p}], secondary: {id, type, value, max, probs}, others: [same as secondary],
|
| 446 |
+
* info: {family, exit, n_exits,
|
| 447 |
+
* layers_used, mean_layers, max_layers, static_hit, state_reused}, vetoed, micros,
|
| 448 |
+
* state_text, event, reward, done, score}` as JSON.
|
| 449 |
+
* @param {Engine} engine
|
| 450 |
+
* @returns {string}
|
| 451 |
+
*/
|
| 452 |
+
step_ai(engine) {
|
| 453 |
+
let deferred2_0;
|
| 454 |
+
let deferred2_1;
|
| 455 |
+
try {
|
| 456 |
+
_assertClass(engine, Engine);
|
| 457 |
+
const ret = wasm.gamesession_step_ai(this.__wbg_ptr, engine.__wbg_ptr);
|
| 458 |
+
var ptr1 = ret[0];
|
| 459 |
+
var len1 = ret[1];
|
| 460 |
+
if (ret[3]) {
|
| 461 |
+
ptr1 = 0; len1 = 0;
|
| 462 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 463 |
+
}
|
| 464 |
+
deferred2_0 = ptr1;
|
| 465 |
+
deferred2_1 = len1;
|
| 466 |
+
return getStringFromWasm0(ptr1, len1);
|
| 467 |
+
} finally {
|
| 468 |
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
| 469 |
+
}
|
| 470 |
+
}
|
| 471 |
+
/**
|
| 472 |
+
* One frame with a human action key (see [`GameSession::action_keys`]; `""` holds).
|
| 473 |
+
* Returns `{executed, vetoed, event, reward, done, score}` as JSON.
|
| 474 |
+
* @param {string} action_key
|
| 475 |
+
* @returns {string}
|
| 476 |
+
*/
|
| 477 |
+
step_human(action_key) {
|
| 478 |
+
let deferred3_0;
|
| 479 |
+
let deferred3_1;
|
| 480 |
+
try {
|
| 481 |
+
const ptr0 = passStringToWasm0(action_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 482 |
+
const len0 = WASM_VECTOR_LEN;
|
| 483 |
+
const ret = wasm.gamesession_step_human(this.__wbg_ptr, ptr0, len0);
|
| 484 |
+
var ptr2 = ret[0];
|
| 485 |
+
var len2 = ret[1];
|
| 486 |
+
if (ret[3]) {
|
| 487 |
+
ptr2 = 0; len2 = 0;
|
| 488 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 489 |
+
}
|
| 490 |
+
deferred3_0 = ptr2;
|
| 491 |
+
deferred3_1 = len2;
|
| 492 |
+
return getStringFromWasm0(ptr2, len2);
|
| 493 |
+
} finally {
|
| 494 |
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
| 495 |
+
}
|
| 496 |
+
}
|
| 497 |
+
/**
|
| 498 |
+
* One AI frame with the game's oracle (same JSON as [`GameSession::step_ai`]).
|
| 499 |
+
* @returns {string}
|
| 500 |
+
*/
|
| 501 |
+
step_oracle() {
|
| 502 |
+
let deferred2_0;
|
| 503 |
+
let deferred2_1;
|
| 504 |
+
try {
|
| 505 |
+
const ret = wasm.gamesession_step_oracle(this.__wbg_ptr);
|
| 506 |
+
var ptr1 = ret[0];
|
| 507 |
+
var len1 = ret[1];
|
| 508 |
+
if (ret[3]) {
|
| 509 |
+
ptr1 = 0; len1 = 0;
|
| 510 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 511 |
+
}
|
| 512 |
+
deferred2_0 = ptr1;
|
| 513 |
+
deferred2_1 = len1;
|
| 514 |
+
return getStringFromWasm0(ptr1, len1);
|
| 515 |
+
} finally {
|
| 516 |
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
| 517 |
+
}
|
| 518 |
+
}
|
| 519 |
+
/**
|
| 520 |
+
* Rolling timing of the last decisions: `{n, median_us, p95_us, mean_us}`.
|
| 521 |
+
* @returns {string}
|
| 522 |
+
*/
|
| 523 |
+
timing() {
|
| 524 |
+
let deferred1_0;
|
| 525 |
+
let deferred1_1;
|
| 526 |
+
try {
|
| 527 |
+
const ret = wasm.gamesession_timing(this.__wbg_ptr);
|
| 528 |
+
deferred1_0 = ret[0];
|
| 529 |
+
deferred1_1 = ret[1];
|
| 530 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 531 |
+
} finally {
|
| 532 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 533 |
+
}
|
| 534 |
+
}
|
| 535 |
+
}
|
| 536 |
+
if (Symbol.dispose) GameSession.prototype[Symbol.dispose] = GameSession.prototype.free;
|
| 537 |
+
|
| 538 |
+
/**
|
| 539 |
+
* The secrets verifier: s6-secrets-verify-pico judging rule candidates at full depth. The
|
| 540 |
+
* candidate JSON is documented in [`verify`].
|
| 541 |
+
*/
|
| 542 |
+
export class SecretVerifier {
|
| 543 |
+
__destroy_into_raw() {
|
| 544 |
+
const ptr = this.__wbg_ptr;
|
| 545 |
+
this.__wbg_ptr = 0;
|
| 546 |
+
SecretVerifierFinalization.unregister(this);
|
| 547 |
+
return ptr;
|
| 548 |
+
}
|
| 549 |
+
free() {
|
| 550 |
+
const ptr = this.__destroy_into_raw();
|
| 551 |
+
wasm.__wbg_secretverifier_free(ptr, 0);
|
| 552 |
+
}
|
| 553 |
+
/**
|
| 554 |
+
* `{name, n_params, file_bytes, window, words}` as JSON.
|
| 555 |
+
* @returns {string}
|
| 556 |
+
*/
|
| 557 |
+
info() {
|
| 558 |
+
let deferred1_0;
|
| 559 |
+
let deferred1_1;
|
| 560 |
+
try {
|
| 561 |
+
const ret = wasm.secretverifier_info(this.__wbg_ptr);
|
| 562 |
+
deferred1_0 = ret[0];
|
| 563 |
+
deferred1_1 = ret[1];
|
| 564 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 565 |
+
} finally {
|
| 566 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 567 |
+
}
|
| 568 |
+
}
|
| 569 |
+
/**
|
| 570 |
+
* A JSON array of candidates -> a JSON array of answers, in the same order.
|
| 571 |
+
* @param {string} candidates_json
|
| 572 |
+
* @returns {string}
|
| 573 |
+
*/
|
| 574 |
+
judgeMany(candidates_json) {
|
| 575 |
+
let deferred3_0;
|
| 576 |
+
let deferred3_1;
|
| 577 |
+
try {
|
| 578 |
+
const ptr0 = passStringToWasm0(candidates_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 579 |
+
const len0 = WASM_VECTOR_LEN;
|
| 580 |
+
const ret = wasm.secretverifier_judgeMany(this.__wbg_ptr, ptr0, len0);
|
| 581 |
+
var ptr2 = ret[0];
|
| 582 |
+
var len2 = ret[1];
|
| 583 |
+
if (ret[3]) {
|
| 584 |
+
ptr2 = 0; len2 = 0;
|
| 585 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 586 |
+
}
|
| 587 |
+
deferred3_0 = ptr2;
|
| 588 |
+
deferred3_1 = len2;
|
| 589 |
+
return getStringFromWasm0(ptr2, len2);
|
| 590 |
+
} finally {
|
| 591 |
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
| 592 |
+
}
|
| 593 |
+
}
|
| 594 |
+
/**
|
| 595 |
+
* One candidate (a JSON object) -> `{p_real, state_tokens, truncated, micros}` as JSON.
|
| 596 |
+
* @param {string} candidate_json
|
| 597 |
+
* @returns {string}
|
| 598 |
+
*/
|
| 599 |
+
judge(candidate_json) {
|
| 600 |
+
let deferred3_0;
|
| 601 |
+
let deferred3_1;
|
| 602 |
+
try {
|
| 603 |
+
const ptr0 = passStringToWasm0(candidate_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 604 |
+
const len0 = WASM_VECTOR_LEN;
|
| 605 |
+
const ret = wasm.secretverifier_judge(this.__wbg_ptr, ptr0, len0);
|
| 606 |
+
var ptr2 = ret[0];
|
| 607 |
+
var len2 = ret[1];
|
| 608 |
+
if (ret[3]) {
|
| 609 |
+
ptr2 = 0; len2 = 0;
|
| 610 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 611 |
+
}
|
| 612 |
+
deferred3_0 = ptr2;
|
| 613 |
+
deferred3_1 = len2;
|
| 614 |
+
return getStringFromWasm0(ptr2, len2);
|
| 615 |
+
} finally {
|
| 616 |
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
| 617 |
+
}
|
| 618 |
+
}
|
| 619 |
+
/**
|
| 620 |
+
* From the GGUF bytes of the model and the bytes of the word list (`dictionary.txt`).
|
| 621 |
+
* @param {Uint8Array} gguf_bytes
|
| 622 |
+
* @param {Uint8Array} words_bytes
|
| 623 |
+
*/
|
| 624 |
+
constructor(gguf_bytes, words_bytes) {
|
| 625 |
+
const ptr0 = passArray8ToWasm0(gguf_bytes, wasm.__wbindgen_malloc);
|
| 626 |
+
const len0 = WASM_VECTOR_LEN;
|
| 627 |
+
const ptr1 = passArray8ToWasm0(words_bytes, wasm.__wbindgen_malloc);
|
| 628 |
+
const len1 = WASM_VECTOR_LEN;
|
| 629 |
+
const ret = wasm.secretverifier_new(ptr0, len0, ptr1, len1);
|
| 630 |
+
if (ret[2]) {
|
| 631 |
+
throw takeFromExternrefTable0(ret[1]);
|
| 632 |
+
}
|
| 633 |
+
this.__wbg_ptr = ret[0];
|
| 634 |
+
SecretVerifierFinalization.register(this, this.__wbg_ptr, this);
|
| 635 |
+
return this;
|
| 636 |
+
}
|
| 637 |
+
/**
|
| 638 |
+
* The state text the model reads for a candidate (tests, parity).
|
| 639 |
+
* @param {string} candidate_json
|
| 640 |
+
* @returns {string}
|
| 641 |
+
*/
|
| 642 |
+
state(candidate_json) {
|
| 643 |
+
let deferred3_0;
|
| 644 |
+
let deferred3_1;
|
| 645 |
+
try {
|
| 646 |
+
const ptr0 = passStringToWasm0(candidate_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 647 |
+
const len0 = WASM_VECTOR_LEN;
|
| 648 |
+
const ret = wasm.secretverifier_state(this.__wbg_ptr, ptr0, len0);
|
| 649 |
+
var ptr2 = ret[0];
|
| 650 |
+
var len2 = ret[1];
|
| 651 |
+
if (ret[3]) {
|
| 652 |
+
ptr2 = 0; len2 = 0;
|
| 653 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 654 |
+
}
|
| 655 |
+
deferred3_0 = ptr2;
|
| 656 |
+
deferred3_1 = len2;
|
| 657 |
+
return getStringFromWasm0(ptr2, len2);
|
| 658 |
+
} finally {
|
| 659 |
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
| 660 |
+
}
|
| 661 |
+
}
|
| 662 |
+
/**
|
| 663 |
+
* `{tau_f1, tau_f05, tau_f2}` as JSON: the operating thresholds stored in the file.
|
| 664 |
+
* @returns {string}
|
| 665 |
+
*/
|
| 666 |
+
thresholds() {
|
| 667 |
+
let deferred1_0;
|
| 668 |
+
let deferred1_1;
|
| 669 |
+
try {
|
| 670 |
+
const ret = wasm.secretverifier_thresholds(this.__wbg_ptr);
|
| 671 |
+
deferred1_0 = ret[0];
|
| 672 |
+
deferred1_1 = ret[1];
|
| 673 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 674 |
+
} finally {
|
| 675 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 676 |
+
}
|
| 677 |
+
}
|
| 678 |
+
}
|
| 679 |
+
if (Symbol.dispose) SecretVerifier.prototype[Symbol.dispose] = SecretVerifier.prototype.free;
|
| 680 |
+
|
| 681 |
+
/**
|
| 682 |
+
* A loaded decision model.
|
| 683 |
+
*/
|
| 684 |
+
export class SkyEngine {
|
| 685 |
+
static __wrap(ptr) {
|
| 686 |
+
const obj = Object.create(SkyEngine.prototype);
|
| 687 |
+
obj.__wbg_ptr = ptr;
|
| 688 |
+
SkyEngineFinalization.register(obj, obj.__wbg_ptr, obj);
|
| 689 |
+
return obj;
|
| 690 |
+
}
|
| 691 |
+
__destroy_into_raw() {
|
| 692 |
+
const ptr = this.__wbg_ptr;
|
| 693 |
+
this.__wbg_ptr = 0;
|
| 694 |
+
SkyEngineFinalization.unregister(this);
|
| 695 |
+
return ptr;
|
| 696 |
+
}
|
| 697 |
+
free() {
|
| 698 |
+
const ptr = this.__destroy_into_raw();
|
| 699 |
+
wasm.__wbg_skyengine_free(ptr, 0);
|
| 700 |
+
}
|
| 701 |
+
/**
|
| 702 |
+
* `general.architecture`: `modern-bert` (s1) or `skycmd-s2` (s2).
|
| 703 |
+
* @returns {string}
|
| 704 |
+
*/
|
| 705 |
+
arch() {
|
| 706 |
+
let deferred1_0;
|
| 707 |
+
let deferred1_1;
|
| 708 |
+
try {
|
| 709 |
+
const ret = wasm.skyengine_arch(this.__wbg_ptr);
|
| 710 |
+
deferred1_0 = ret[0];
|
| 711 |
+
deferred1_1 = ret[1];
|
| 712 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 713 |
+
} finally {
|
| 714 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 715 |
+
}
|
| 716 |
+
}
|
| 717 |
+
/**
|
| 718 |
+
* Same as [`SkyEngine::decide`] with the options as a JSON array of strings.
|
| 719 |
+
* @param {string} qtype_name
|
| 720 |
+
* @param {string} instructions
|
| 721 |
+
* @param {string} options_json
|
| 722 |
+
* @param {string} state
|
| 723 |
+
* @returns {Float32Array}
|
| 724 |
+
*/
|
| 725 |
+
decideOptionsJson(qtype_name, instructions, options_json, state) {
|
| 726 |
+
const ptr0 = passStringToWasm0(qtype_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 727 |
+
const len0 = WASM_VECTOR_LEN;
|
| 728 |
+
const ptr1 = passStringToWasm0(instructions, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 729 |
+
const len1 = WASM_VECTOR_LEN;
|
| 730 |
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 731 |
+
const len2 = WASM_VECTOR_LEN;
|
| 732 |
+
const ptr3 = passStringToWasm0(state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 733 |
+
const len3 = WASM_VECTOR_LEN;
|
| 734 |
+
const ret = wasm.skyengine_decideOptionsJson(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
| 735 |
+
if (ret[3]) {
|
| 736 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 737 |
+
}
|
| 738 |
+
var v5 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
| 739 |
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
| 740 |
+
return v5;
|
| 741 |
+
}
|
| 742 |
+
/**
|
| 743 |
+
* Probabilities (after the temperature) of already rendered option texts. The tokens of the
|
| 744 |
+
* question and options are cached, so calling this every frame only tokenizes the state.
|
| 745 |
+
* @param {string} qtype_name
|
| 746 |
+
* @param {string} instructions
|
| 747 |
+
* @param {string[]} options
|
| 748 |
+
* @param {string} state
|
| 749 |
+
* @returns {Float32Array}
|
| 750 |
+
*/
|
| 751 |
+
decide(qtype_name, instructions, options, state) {
|
| 752 |
+
const ptr0 = passStringToWasm0(qtype_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 753 |
+
const len0 = WASM_VECTOR_LEN;
|
| 754 |
+
const ptr1 = passStringToWasm0(instructions, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 755 |
+
const len1 = WASM_VECTOR_LEN;
|
| 756 |
+
const ptr2 = passArrayJsValueToWasm0(options, wasm.__wbindgen_malloc);
|
| 757 |
+
const len2 = WASM_VECTOR_LEN;
|
| 758 |
+
const ptr3 = passStringToWasm0(state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 759 |
+
const len3 = WASM_VECTOR_LEN;
|
| 760 |
+
const ret = wasm.skyengine_decide(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
| 761 |
+
if (ret[3]) {
|
| 762 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 763 |
+
}
|
| 764 |
+
var v5 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
| 765 |
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
| 766 |
+
return v5;
|
| 767 |
+
}
|
| 768 |
+
/**
|
| 769 |
+
* Answer a System One request (`{"state": ..., "questions": {...}}`), returns the JSON response.
|
| 770 |
+
* @param {string} req
|
| 771 |
+
* @returns {string}
|
| 772 |
+
*/
|
| 773 |
+
decide_json(req) {
|
| 774 |
+
let deferred3_0;
|
| 775 |
+
let deferred3_1;
|
| 776 |
+
try {
|
| 777 |
+
const ptr0 = passStringToWasm0(req, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 778 |
+
const len0 = WASM_VECTOR_LEN;
|
| 779 |
+
const ret = wasm.skyengine_decide_json(this.__wbg_ptr, ptr0, len0);
|
| 780 |
+
var ptr2 = ret[0];
|
| 781 |
+
var len2 = ret[1];
|
| 782 |
+
if (ret[3]) {
|
| 783 |
+
ptr2 = 0; len2 = 0;
|
| 784 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 785 |
+
}
|
| 786 |
+
deferred3_0 = ptr2;
|
| 787 |
+
deferred3_1 = len2;
|
| 788 |
+
return getStringFromWasm0(ptr2, len2);
|
| 789 |
+
} finally {
|
| 790 |
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
| 791 |
+
}
|
| 792 |
+
}
|
| 793 |
+
/**
|
| 794 |
+
* Statistics of the last question as JSON: `{exit, layers_used, n_exits, static_hit,
|
| 795 |
+
* state_hit, tokens}` (`exit` and `layers_used` are null for s1), or `null`.
|
| 796 |
+
* @returns {string}
|
| 797 |
+
*/
|
| 798 |
+
lastStats() {
|
| 799 |
+
let deferred1_0;
|
| 800 |
+
let deferred1_1;
|
| 801 |
+
try {
|
| 802 |
+
const ret = wasm.skyengine_lastStats(this.__wbg_ptr);
|
| 803 |
+
deferred1_0 = ret[0];
|
| 804 |
+
deferred1_1 = ret[1];
|
| 805 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 806 |
+
} finally {
|
| 807 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 808 |
+
}
|
| 809 |
+
}
|
| 810 |
+
/**
|
| 811 |
+
* Duration of the last decision in microseconds (feature `timing`), or undefined.
|
| 812 |
+
* @returns {number | undefined}
|
| 813 |
+
*/
|
| 814 |
+
last_micros() {
|
| 815 |
+
const ret = wasm.skyengine_last_micros(this.__wbg_ptr);
|
| 816 |
+
return ret[0] === 0 ? undefined : ret[1];
|
| 817 |
+
}
|
| 818 |
+
/**
|
| 819 |
+
* Model description as JSON.
|
| 820 |
+
* @returns {string}
|
| 821 |
+
*/
|
| 822 |
+
model_info() {
|
| 823 |
+
let deferred1_0;
|
| 824 |
+
let deferred1_1;
|
| 825 |
+
try {
|
| 826 |
+
const ret = wasm.skyengine_model_info(this.__wbg_ptr);
|
| 827 |
+
deferred1_0 = ret[0];
|
| 828 |
+
deferred1_1 = ret[1];
|
| 829 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 830 |
+
} finally {
|
| 831 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 832 |
+
}
|
| 833 |
+
}
|
| 834 |
+
/**
|
| 835 |
+
* Number of parameters.
|
| 836 |
+
* @returns {number}
|
| 837 |
+
*/
|
| 838 |
+
n_params() {
|
| 839 |
+
const ret = wasm.skyengine_n_params(this.__wbg_ptr);
|
| 840 |
+
return ret;
|
| 841 |
+
}
|
| 842 |
+
/**
|
| 843 |
+
* Load a GGUF model (s1 or s2; f32, f16, Q8_0 or ternary file) and compute in f32: with
|
| 844 |
+
* baseline SIMD128, int8 dot products are not faster than f32 in browsers, so Q8_0 files are
|
| 845 |
+
* dequantized at load (smaller download, f32 speed and accuracy).
|
| 846 |
+
* @param {Uint8Array} gguf_bytes
|
| 847 |
+
*/
|
| 848 |
+
constructor(gguf_bytes) {
|
| 849 |
+
const ptr0 = passArray8ToWasm0(gguf_bytes, wasm.__wbindgen_malloc);
|
| 850 |
+
const len0 = WASM_VECTOR_LEN;
|
| 851 |
+
const ret = wasm.skyengine_new(ptr0, len0);
|
| 852 |
+
if (ret[2]) {
|
| 853 |
+
throw takeFromExternrefTable0(ret[1]);
|
| 854 |
+
}
|
| 855 |
+
this.__wbg_ptr = ret[0];
|
| 856 |
+
SkyEngineFinalization.register(this, this.__wbg_ptr, this);
|
| 857 |
+
return this;
|
| 858 |
+
}
|
| 859 |
+
/**
|
| 860 |
+
* Raw scores (before the temperature).
|
| 861 |
+
* @param {string} qtype_name
|
| 862 |
+
* @param {string} instructions
|
| 863 |
+
* @param {string[]} options
|
| 864 |
+
* @param {string} state
|
| 865 |
+
* @returns {Float32Array}
|
| 866 |
+
*/
|
| 867 |
+
scores(qtype_name, instructions, options, state) {
|
| 868 |
+
const ptr0 = passStringToWasm0(qtype_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 869 |
+
const len0 = WASM_VECTOR_LEN;
|
| 870 |
+
const ptr1 = passStringToWasm0(instructions, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 871 |
+
const len1 = WASM_VECTOR_LEN;
|
| 872 |
+
const ptr2 = passArrayJsValueToWasm0(options, wasm.__wbindgen_malloc);
|
| 873 |
+
const len2 = WASM_VECTOR_LEN;
|
| 874 |
+
const ptr3 = passStringToWasm0(state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 875 |
+
const len3 = WASM_VECTOR_LEN;
|
| 876 |
+
const ret = wasm.skyengine_scores(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
| 877 |
+
if (ret[3]) {
|
| 878 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 879 |
+
}
|
| 880 |
+
var v5 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
| 881 |
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
| 882 |
+
return v5;
|
| 883 |
+
}
|
| 884 |
+
/**
|
| 885 |
+
* s2: override the early-exit threshold τ of every question type (undefined: the calibrated
|
| 886 |
+
* values; 1.0: full depth). No effect on s1 models.
|
| 887 |
+
* @param {number | null} [tau]
|
| 888 |
+
*/
|
| 889 |
+
setExitThreshold(tau) {
|
| 890 |
+
wasm.skyengine_setExitThreshold(this.__wbg_ptr, isLikeNone(tau) ? Number.MAX_SAFE_INTEGER : Math.fround(tau));
|
| 891 |
+
}
|
| 892 |
+
/**
|
| 893 |
+
* Token ids of the full sequence (for debugging prompts).
|
| 894 |
+
* @param {string} qtype_name
|
| 895 |
+
* @param {string} instructions
|
| 896 |
+
* @param {string[]} options
|
| 897 |
+
* @param {string} state
|
| 898 |
+
* @returns {Uint32Array}
|
| 899 |
+
*/
|
| 900 |
+
tokens(qtype_name, instructions, options, state) {
|
| 901 |
+
const ptr0 = passStringToWasm0(qtype_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 902 |
+
const len0 = WASM_VECTOR_LEN;
|
| 903 |
+
const ptr1 = passStringToWasm0(instructions, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 904 |
+
const len1 = WASM_VECTOR_LEN;
|
| 905 |
+
const ptr2 = passArrayJsValueToWasm0(options, wasm.__wbindgen_malloc);
|
| 906 |
+
const len2 = WASM_VECTOR_LEN;
|
| 907 |
+
const ptr3 = passStringToWasm0(state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 908 |
+
const len3 = WASM_VECTOR_LEN;
|
| 909 |
+
const ret = wasm.skyengine_tokens(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
| 910 |
+
if (ret[3]) {
|
| 911 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 912 |
+
}
|
| 913 |
+
var v5 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
| 914 |
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
| 915 |
+
return v5;
|
| 916 |
+
}
|
| 917 |
+
/**
|
| 918 |
+
* `q8 = false`: f32 compute (Q8_0 matrices are dequantized). `q8 = true`: Q8_0 compute
|
| 919 |
+
* (f32 / f16 matrices are quantized at load), with single-pass activation quantization when
|
| 920 |
+
* `fast` (less accurate).
|
| 921 |
+
* @param {Uint8Array} gguf_bytes
|
| 922 |
+
* @param {boolean} q8
|
| 923 |
+
* @param {boolean} fast
|
| 924 |
+
* @returns {SkyEngine}
|
| 925 |
+
*/
|
| 926 |
+
static withOptions(gguf_bytes, q8, fast) {
|
| 927 |
+
const ptr0 = passArray8ToWasm0(gguf_bytes, wasm.__wbindgen_malloc);
|
| 928 |
+
const len0 = WASM_VECTOR_LEN;
|
| 929 |
+
const ret = wasm.skyengine_withOptions(ptr0, len0, q8, fast);
|
| 930 |
+
if (ret[2]) {
|
| 931 |
+
throw takeFromExternrefTable0(ret[1]);
|
| 932 |
+
}
|
| 933 |
+
return SkyEngine.__wrap(ret[0]);
|
| 934 |
+
}
|
| 935 |
+
}
|
| 936 |
+
if (Symbol.dispose) SkyEngine.prototype[Symbol.dispose] = SkyEngine.prototype.free;
|
| 937 |
+
|
| 938 |
+
/**
|
| 939 |
+
* s6-ear v2 (docs/s6-ear2-prereg.md §4.5): an end-of-turn detector over a stream of 16 kHz
|
| 940 |
+
* samples. `push` computes each 10 ms hop once as audio arrives (the last 4 s are kept), so a
|
| 941 |
+
* decision (`probEnd`, run when the VAD reports a pause) costs the model's forward pass only.
|
| 942 |
+
*
|
| 943 |
+
* ```js
|
| 944 |
+
* const det = new TurnDetector(new Uint8Array(ggufBytes));
|
| 945 |
+
* det.push(chunk); // Float32Array, any length, 16 kHz mono in [-1, 1]
|
| 946 |
+
* const p = det.probEnd(); // calibrated probability that the turn is finished
|
| 947 |
+
* const end = p >= det.tau50(); // or det.tau85() for 85% END recall on validation
|
| 948 |
+
* const q = det.probEndPcm(clip); // one decision on a whole clip (its last 4 s), stream untouched
|
| 949 |
+
* ```
|
| 950 |
+
*/
|
| 951 |
+
export class TurnDetector {
|
| 952 |
+
__destroy_into_raw() {
|
| 953 |
+
const ptr = this.__wbg_ptr;
|
| 954 |
+
this.__wbg_ptr = 0;
|
| 955 |
+
TurnDetectorFinalization.unregister(this);
|
| 956 |
+
return ptr;
|
| 957 |
+
}
|
| 958 |
+
free() {
|
| 959 |
+
const ptr = this.__destroy_into_raw();
|
| 960 |
+
wasm.__wbg_turndetector_free(ptr, 0);
|
| 961 |
+
}
|
| 962 |
+
/**
|
| 963 |
+
* Hops kept by the stream (at most the window's 400).
|
| 964 |
+
* @returns {number}
|
| 965 |
+
*/
|
| 966 |
+
hopCount() {
|
| 967 |
+
const ret = wasm.turndetector_hopCount(this.__wbg_ptr);
|
| 968 |
+
return ret >>> 0;
|
| 969 |
+
}
|
| 970 |
+
/**
|
| 971 |
+
* `{name, params, file_bytes, window_hops, hops_per_position, temperature, tau50, tau85}`.
|
| 972 |
+
* @returns {string}
|
| 973 |
+
*/
|
| 974 |
+
info() {
|
| 975 |
+
let deferred1_0;
|
| 976 |
+
let deferred1_1;
|
| 977 |
+
try {
|
| 978 |
+
const ret = wasm.turndetector_info(this.__wbg_ptr);
|
| 979 |
+
deferred1_0 = ret[0];
|
| 980 |
+
deferred1_1 = ret[1];
|
| 981 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 982 |
+
} finally {
|
| 983 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 984 |
+
}
|
| 985 |
+
}
|
| 986 |
+
/**
|
| 987 |
+
* Load an `skycmd-turn` GGUF file (ternary matrices computed in f32 panels).
|
| 988 |
+
* @param {Uint8Array} gguf_bytes
|
| 989 |
+
*/
|
| 990 |
+
constructor(gguf_bytes) {
|
| 991 |
+
const ptr0 = passArray8ToWasm0(gguf_bytes, wasm.__wbindgen_malloc);
|
| 992 |
+
const len0 = WASM_VECTOR_LEN;
|
| 993 |
+
const ret = wasm.turndetector_new(ptr0, len0);
|
| 994 |
+
if (ret[2]) {
|
| 995 |
+
throw takeFromExternrefTable0(ret[1]);
|
| 996 |
+
}
|
| 997 |
+
this.__wbg_ptr = ret[0];
|
| 998 |
+
TurnDetectorFinalization.register(this, this.__wbg_ptr, this);
|
| 999 |
+
return this;
|
| 1000 |
+
}
|
| 1001 |
+
/**
|
| 1002 |
+
* The same decision on a whole clip (its last 4 s), without touching the stream.
|
| 1003 |
+
* @param {Float32Array} pcm
|
| 1004 |
+
* @returns {number}
|
| 1005 |
+
*/
|
| 1006 |
+
probEndPcm(pcm) {
|
| 1007 |
+
const ptr0 = passArrayF32ToWasm0(pcm, wasm.__wbindgen_malloc);
|
| 1008 |
+
const len0 = WASM_VECTOR_LEN;
|
| 1009 |
+
const ret = wasm.turndetector_probEndPcm(this.__wbg_ptr, ptr0, len0);
|
| 1010 |
+
if (ret[2]) {
|
| 1011 |
+
throw takeFromExternrefTable0(ret[1]);
|
| 1012 |
+
}
|
| 1013 |
+
return ret[0];
|
| 1014 |
+
}
|
| 1015 |
+
/**
|
| 1016 |
+
* The calibrated probability that the turn is finished, from the stream's last 4 s.
|
| 1017 |
+
* @returns {number}
|
| 1018 |
+
*/
|
| 1019 |
+
probEnd() {
|
| 1020 |
+
const ret = wasm.turndetector_probEnd(this.__wbg_ptr);
|
| 1021 |
+
if (ret[2]) {
|
| 1022 |
+
throw takeFromExternrefTable0(ret[1]);
|
| 1023 |
+
}
|
| 1024 |
+
return ret[0];
|
| 1025 |
+
}
|
| 1026 |
+
/**
|
| 1027 |
+
* Appends 16 kHz samples to the stream.
|
| 1028 |
+
* @param {Float32Array} pcm
|
| 1029 |
+
*/
|
| 1030 |
+
push(pcm) {
|
| 1031 |
+
const ptr0 = passArrayF32ToWasm0(pcm, wasm.__wbindgen_malloc);
|
| 1032 |
+
const len0 = WASM_VECTOR_LEN;
|
| 1033 |
+
wasm.turndetector_push(this.__wbg_ptr, ptr0, len0);
|
| 1034 |
+
}
|
| 1035 |
+
/**
|
| 1036 |
+
* Forgets the stream (a new turn).
|
| 1037 |
+
*/
|
| 1038 |
+
reset() {
|
| 1039 |
+
wasm.turndetector_reset(this.__wbg_ptr);
|
| 1040 |
+
}
|
| 1041 |
+
/**
|
| 1042 |
+
* τ₀.₅ (0.5 on the calibrated probability).
|
| 1043 |
+
* @returns {number}
|
| 1044 |
+
*/
|
| 1045 |
+
tau50() {
|
| 1046 |
+
const ret = wasm.turndetector_tau50(this.__wbg_ptr);
|
| 1047 |
+
return ret;
|
| 1048 |
+
}
|
| 1049 |
+
/**
|
| 1050 |
+
* τ₈₅: the highest validation threshold with an END recall of at least 0.85.
|
| 1051 |
+
* @returns {number}
|
| 1052 |
+
*/
|
| 1053 |
+
tau85() {
|
| 1054 |
+
const ret = wasm.turndetector_tau85(this.__wbg_ptr);
|
| 1055 |
+
return ret;
|
| 1056 |
+
}
|
| 1057 |
+
}
|
| 1058 |
+
if (Symbol.dispose) TurnDetector.prototype[Symbol.dispose] = TurnDetector.prototype.free;
|
| 1059 |
+
|
| 1060 |
+
/**
|
| 1061 |
+
* Times `n` AI decisions on Flappy Drone: `{name, family, params, file_bytes, n, median_us,
|
| 1062 |
+
* p95_us, mean_us, decisions_per_s, forwards_per_decision, mean_layers_used, max_layers,
|
| 1063 |
+
* static_hit_rate, state_reuse_rate, game}` as JSON.
|
| 1064 |
+
* @param {Engine} engine
|
| 1065 |
+
* @param {number} n
|
| 1066 |
+
* @returns {string}
|
| 1067 |
+
*/
|
| 1068 |
+
export function bench(engine, n) {
|
| 1069 |
+
let deferred2_0;
|
| 1070 |
+
let deferred2_1;
|
| 1071 |
+
try {
|
| 1072 |
+
_assertClass(engine, Engine);
|
| 1073 |
+
const ret = wasm.bench(engine.__wbg_ptr, n);
|
| 1074 |
+
var ptr1 = ret[0];
|
| 1075 |
+
var len1 = ret[1];
|
| 1076 |
+
if (ret[3]) {
|
| 1077 |
+
ptr1 = 0; len1 = 0;
|
| 1078 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 1079 |
+
}
|
| 1080 |
+
deferred2_0 = ptr1;
|
| 1081 |
+
deferred2_1 = len1;
|
| 1082 |
+
return getStringFromWasm0(ptr1, len1);
|
| 1083 |
+
} finally {
|
| 1084 |
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
| 1085 |
+
}
|
| 1086 |
+
}
|
| 1087 |
+
|
| 1088 |
+
/**
|
| 1089 |
+
* Like [`bench`] on any game (`flappy`, `rescue`, `dodge`, `doom`).
|
| 1090 |
+
* @param {Engine} engine
|
| 1091 |
+
* @param {string} game
|
| 1092 |
+
* @param {number} n
|
| 1093 |
+
* @returns {string}
|
| 1094 |
+
*/
|
| 1095 |
+
export function benchGame(engine, game, n) {
|
| 1096 |
+
let deferred3_0;
|
| 1097 |
+
let deferred3_1;
|
| 1098 |
+
try {
|
| 1099 |
+
_assertClass(engine, Engine);
|
| 1100 |
+
const ptr0 = passStringToWasm0(game, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 1101 |
+
const len0 = WASM_VECTOR_LEN;
|
| 1102 |
+
const ret = wasm.benchGame(engine.__wbg_ptr, ptr0, len0, n);
|
| 1103 |
+
var ptr2 = ret[0];
|
| 1104 |
+
var len2 = ret[1];
|
| 1105 |
+
if (ret[3]) {
|
| 1106 |
+
ptr2 = 0; len2 = 0;
|
| 1107 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 1108 |
+
}
|
| 1109 |
+
deferred3_0 = ptr2;
|
| 1110 |
+
deferred3_1 = len2;
|
| 1111 |
+
return getStringFromWasm0(ptr2, len2);
|
| 1112 |
+
} finally {
|
| 1113 |
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
| 1114 |
+
}
|
| 1115 |
+
}
|
| 1116 |
+
|
| 1117 |
+
/**
|
| 1118 |
+
* The dominant period of `history` in `[2, len / 2]` from its periodogram, or 0.
|
| 1119 |
+
* @param {Float32Array} history
|
| 1120 |
+
* @returns {number}
|
| 1121 |
+
*/
|
| 1122 |
+
export function dominantPeriod(history) {
|
| 1123 |
+
const ptr0 = passArrayF32ToWasm0(history, wasm.__wbindgen_malloc);
|
| 1124 |
+
const len0 = WASM_VECTOR_LEN;
|
| 1125 |
+
const ret = wasm.dominantPeriod(ptr0, len0);
|
| 1126 |
+
return ret >>> 0;
|
| 1127 |
+
}
|
| 1128 |
+
|
| 1129 |
+
/**
|
| 1130 |
+
* MASE of `point` against `target`, scaled by the history's in-sample seasonal-naive error
|
| 1131 |
+
* (NaN when undefined).
|
| 1132 |
+
* @param {Float32Array} history
|
| 1133 |
+
* @param {number} season
|
| 1134 |
+
* @param {Float32Array} target
|
| 1135 |
+
* @param {Float32Array} point
|
| 1136 |
+
* @returns {number}
|
| 1137 |
+
*/
|
| 1138 |
+
export function mase(history, season, target, point) {
|
| 1139 |
+
const ptr0 = passArrayF32ToWasm0(history, wasm.__wbindgen_malloc);
|
| 1140 |
+
const len0 = WASM_VECTOR_LEN;
|
| 1141 |
+
const ptr1 = passArrayF32ToWasm0(target, wasm.__wbindgen_malloc);
|
| 1142 |
+
const len1 = WASM_VECTOR_LEN;
|
| 1143 |
+
const ptr2 = passArrayF32ToWasm0(point, wasm.__wbindgen_malloc);
|
| 1144 |
+
const len2 = WASM_VECTOR_LEN;
|
| 1145 |
+
const ret = wasm.mase(ptr0, len0, season, ptr1, len1, ptr2, len2);
|
| 1146 |
+
return ret;
|
| 1147 |
+
}
|
| 1148 |
+
|
| 1149 |
+
/**
|
| 1150 |
+
* Seasonal-naive forecast: the last season repeated (`season` 1: the last value).
|
| 1151 |
+
* @param {Float32Array} history
|
| 1152 |
+
* @param {number} season
|
| 1153 |
+
* @param {number} horizon
|
| 1154 |
+
* @returns {Float32Array}
|
| 1155 |
+
*/
|
| 1156 |
+
export function seasonalNaive(history, season, horizon) {
|
| 1157 |
+
const ptr0 = passArrayF32ToWasm0(history, wasm.__wbindgen_malloc);
|
| 1158 |
+
const len0 = WASM_VECTOR_LEN;
|
| 1159 |
+
const ret = wasm.seasonalNaive(ptr0, len0, season, horizon);
|
| 1160 |
+
var v2 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
| 1161 |
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
| 1162 |
+
return v2;
|
| 1163 |
+
}
|
| 1164 |
+
|
| 1165 |
+
/**
|
| 1166 |
+
* A synthetic series of s6-cast's pretraining: `gp`, `pulse`, `tsi` or `sarima`.
|
| 1167 |
+
* @param {string} kind
|
| 1168 |
+
* @param {bigint} seed
|
| 1169 |
+
* @param {number} len
|
| 1170 |
+
* @returns {Float32Array}
|
| 1171 |
+
*/
|
| 1172 |
+
export function synthSeries(kind, seed, len) {
|
| 1173 |
+
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 1174 |
+
const len0 = WASM_VECTOR_LEN;
|
| 1175 |
+
const ret = wasm.synthSeries(ptr0, len0, seed, len);
|
| 1176 |
+
if (ret[3]) {
|
| 1177 |
+
throw takeFromExternrefTable0(ret[2]);
|
| 1178 |
+
}
|
| 1179 |
+
var v2 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
| 1180 |
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
| 1181 |
+
return v2;
|
| 1182 |
+
}
|
| 1183 |
+
|
| 1184 |
+
/**
|
| 1185 |
+
* The deterministic speech-like signal of `sky_infer::audio::synth_speech` (the input of
|
| 1186 |
+
* `sky-turn --bench` and of `crates/sky-web/bench/turn-bench.mjs`).
|
| 1187 |
+
* @param {number} secs
|
| 1188 |
+
* @param {bigint} seed
|
| 1189 |
+
* @param {number} amp
|
| 1190 |
+
* @returns {Float32Array}
|
| 1191 |
+
*/
|
| 1192 |
+
export function turnSynthSpeech(secs, seed, amp) {
|
| 1193 |
+
const ret = wasm.turnSynthSpeech(secs, seed, amp);
|
| 1194 |
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
| 1195 |
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
| 1196 |
+
return v1;
|
| 1197 |
+
}
|
| 1198 |
+
|
| 1199 |
+
/**
|
| 1200 |
+
* Crate version.
|
| 1201 |
+
* @returns {string}
|
| 1202 |
+
*/
|
| 1203 |
+
export function version() {
|
| 1204 |
+
let deferred1_0;
|
| 1205 |
+
let deferred1_1;
|
| 1206 |
+
try {
|
| 1207 |
+
const ret = wasm.version();
|
| 1208 |
+
deferred1_0 = ret[0];
|
| 1209 |
+
deferred1_1 = ret[1];
|
| 1210 |
+
return getStringFromWasm0(ret[0], ret[1]);
|
| 1211 |
+
} finally {
|
| 1212 |
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
| 1213 |
+
}
|
| 1214 |
+
}
|
| 1215 |
+
function __wbg_get_imports() {
|
| 1216 |
+
const import0 = {
|
| 1217 |
+
__proto__: null,
|
| 1218 |
+
__wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
|
| 1219 |
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
| 1220 |
+
return ret;
|
| 1221 |
+
},
|
| 1222 |
+
__wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
|
| 1223 |
+
const obj = arg1;
|
| 1224 |
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
| 1225 |
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
| 1226 |
+
var len1 = WASM_VECTOR_LEN;
|
| 1227 |
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
| 1228 |
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
| 1229 |
+
},
|
| 1230 |
+
__wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
|
| 1231 |
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
| 1232 |
+
},
|
| 1233 |
+
__wbg_now_c445cae75f697d51: function() {
|
| 1234 |
+
const ret = performance.now();
|
| 1235 |
+
return ret;
|
| 1236 |
+
},
|
| 1237 |
+
__wbindgen_init_externref_table: function() {
|
| 1238 |
+
const table = wasm.__wbindgen_externrefs;
|
| 1239 |
+
const offset = table.grow(4);
|
| 1240 |
+
table.set(0, undefined);
|
| 1241 |
+
table.set(offset + 0, undefined);
|
| 1242 |
+
table.set(offset + 1, null);
|
| 1243 |
+
table.set(offset + 2, true);
|
| 1244 |
+
table.set(offset + 3, false);
|
| 1245 |
+
},
|
| 1246 |
+
};
|
| 1247 |
+
return {
|
| 1248 |
+
__proto__: null,
|
| 1249 |
+
"./sky_web_bg.js": import0,
|
| 1250 |
+
};
|
| 1251 |
+
}
|
| 1252 |
+
|
| 1253 |
+
const EngineFinalization = (typeof FinalizationRegistry === 'undefined')
|
| 1254 |
+
? { register: () => {}, unregister: () => {} }
|
| 1255 |
+
: new FinalizationRegistry(ptr => wasm.__wbg_engine_free(ptr, 1));
|
| 1256 |
+
const ForecasterFinalization = (typeof FinalizationRegistry === 'undefined')
|
| 1257 |
+
? { register: () => {}, unregister: () => {} }
|
| 1258 |
+
: new FinalizationRegistry(ptr => wasm.__wbg_forecaster_free(ptr, 1));
|
| 1259 |
+
const GameSessionFinalization = (typeof FinalizationRegistry === 'undefined')
|
| 1260 |
+
? { register: () => {}, unregister: () => {} }
|
| 1261 |
+
: new FinalizationRegistry(ptr => wasm.__wbg_gamesession_free(ptr, 1));
|
| 1262 |
+
const SecretVerifierFinalization = (typeof FinalizationRegistry === 'undefined')
|
| 1263 |
+
? { register: () => {}, unregister: () => {} }
|
| 1264 |
+
: new FinalizationRegistry(ptr => wasm.__wbg_secretverifier_free(ptr, 1));
|
| 1265 |
+
const SkyEngineFinalization = (typeof FinalizationRegistry === 'undefined')
|
| 1266 |
+
? { register: () => {}, unregister: () => {} }
|
| 1267 |
+
: new FinalizationRegistry(ptr => wasm.__wbg_skyengine_free(ptr, 1));
|
| 1268 |
+
const TurnDetectorFinalization = (typeof FinalizationRegistry === 'undefined')
|
| 1269 |
+
? { register: () => {}, unregister: () => {} }
|
| 1270 |
+
: new FinalizationRegistry(ptr => wasm.__wbg_turndetector_free(ptr, 1));
|
| 1271 |
+
|
| 1272 |
+
function addToExternrefTable0(obj) {
|
| 1273 |
+
const idx = wasm.__externref_table_alloc();
|
| 1274 |
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
| 1275 |
+
return idx;
|
| 1276 |
+
}
|
| 1277 |
+
|
| 1278 |
+
function _assertClass(instance, klass) {
|
| 1279 |
+
if (!(instance instanceof klass)) {
|
| 1280 |
+
throw new Error(`expected instance of ${klass.name}`);
|
| 1281 |
+
}
|
| 1282 |
+
}
|
| 1283 |
+
|
| 1284 |
+
function getArrayF32FromWasm0(ptr, len) {
|
| 1285 |
+
ptr = ptr >>> 0;
|
| 1286 |
+
return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
| 1287 |
+
}
|
| 1288 |
+
|
| 1289 |
+
function getArrayU32FromWasm0(ptr, len) {
|
| 1290 |
+
ptr = ptr >>> 0;
|
| 1291 |
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
| 1292 |
+
}
|
| 1293 |
+
|
| 1294 |
+
let cachedDataViewMemory0 = null;
|
| 1295 |
+
function getDataViewMemory0() {
|
| 1296 |
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
| 1297 |
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
| 1298 |
+
}
|
| 1299 |
+
return cachedDataViewMemory0;
|
| 1300 |
+
}
|
| 1301 |
+
|
| 1302 |
+
let cachedFloat32ArrayMemory0 = null;
|
| 1303 |
+
function getFloat32ArrayMemory0() {
|
| 1304 |
+
if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
|
| 1305 |
+
cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
|
| 1306 |
+
}
|
| 1307 |
+
return cachedFloat32ArrayMemory0;
|
| 1308 |
+
}
|
| 1309 |
+
|
| 1310 |
+
function getStringFromWasm0(ptr, len) {
|
| 1311 |
+
return decodeText(ptr >>> 0, len);
|
| 1312 |
+
}
|
| 1313 |
+
|
| 1314 |
+
let cachedUint32ArrayMemory0 = null;
|
| 1315 |
+
function getUint32ArrayMemory0() {
|
| 1316 |
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
| 1317 |
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
| 1318 |
+
}
|
| 1319 |
+
return cachedUint32ArrayMemory0;
|
| 1320 |
+
}
|
| 1321 |
+
|
| 1322 |
+
let cachedUint8ArrayMemory0 = null;
|
| 1323 |
+
function getUint8ArrayMemory0() {
|
| 1324 |
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
| 1325 |
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
| 1326 |
+
}
|
| 1327 |
+
return cachedUint8ArrayMemory0;
|
| 1328 |
+
}
|
| 1329 |
+
|
| 1330 |
+
function isLikeNone(x) {
|
| 1331 |
+
return x === undefined || x === null;
|
| 1332 |
+
}
|
| 1333 |
+
|
| 1334 |
+
function passArray8ToWasm0(arg, malloc) {
|
| 1335 |
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
| 1336 |
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
| 1337 |
+
WASM_VECTOR_LEN = arg.length;
|
| 1338 |
+
return ptr;
|
| 1339 |
+
}
|
| 1340 |
+
|
| 1341 |
+
function passArrayF32ToWasm0(arg, malloc) {
|
| 1342 |
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
| 1343 |
+
getFloat32ArrayMemory0().set(arg, ptr / 4);
|
| 1344 |
+
WASM_VECTOR_LEN = arg.length;
|
| 1345 |
+
return ptr;
|
| 1346 |
+
}
|
| 1347 |
+
|
| 1348 |
+
function passArrayJsValueToWasm0(array, malloc) {
|
| 1349 |
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
| 1350 |
+
for (let i = 0; i < array.length; i++) {
|
| 1351 |
+
const add = addToExternrefTable0(array[i]);
|
| 1352 |
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
| 1353 |
+
}
|
| 1354 |
+
WASM_VECTOR_LEN = array.length;
|
| 1355 |
+
return ptr;
|
| 1356 |
+
}
|
| 1357 |
+
|
| 1358 |
+
function passStringToWasm0(arg, malloc, realloc) {
|
| 1359 |
+
if (realloc === undefined) {
|
| 1360 |
+
const buf = cachedTextEncoder.encode(arg);
|
| 1361 |
+
const ptr = malloc(buf.length, 1) >>> 0;
|
| 1362 |
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
| 1363 |
+
WASM_VECTOR_LEN = buf.length;
|
| 1364 |
+
return ptr;
|
| 1365 |
+
}
|
| 1366 |
+
|
| 1367 |
+
let len = arg.length;
|
| 1368 |
+
let ptr = malloc(len, 1) >>> 0;
|
| 1369 |
+
|
| 1370 |
+
const mem = getUint8ArrayMemory0();
|
| 1371 |
+
|
| 1372 |
+
let offset = 0;
|
| 1373 |
+
|
| 1374 |
+
for (; offset < len; offset++) {
|
| 1375 |
+
const code = arg.charCodeAt(offset);
|
| 1376 |
+
if (code > 0x7F) break;
|
| 1377 |
+
mem[ptr + offset] = code;
|
| 1378 |
+
}
|
| 1379 |
+
if (offset !== len) {
|
| 1380 |
+
if (offset !== 0) {
|
| 1381 |
+
arg = arg.slice(offset);
|
| 1382 |
+
}
|
| 1383 |
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
| 1384 |
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
| 1385 |
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
| 1386 |
+
|
| 1387 |
+
offset += ret.written;
|
| 1388 |
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
| 1389 |
+
}
|
| 1390 |
+
|
| 1391 |
+
WASM_VECTOR_LEN = offset;
|
| 1392 |
+
return ptr;
|
| 1393 |
+
}
|
| 1394 |
+
|
| 1395 |
+
function takeFromExternrefTable0(idx) {
|
| 1396 |
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
| 1397 |
+
wasm.__externref_table_dealloc(idx);
|
| 1398 |
+
return value;
|
| 1399 |
+
}
|
| 1400 |
+
|
| 1401 |
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
| 1402 |
+
cachedTextDecoder.decode();
|
| 1403 |
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
| 1404 |
+
let numBytesDecoded = 0;
|
| 1405 |
+
function decodeText(ptr, len) {
|
| 1406 |
+
numBytesDecoded += len;
|
| 1407 |
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
| 1408 |
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
| 1409 |
+
cachedTextDecoder.decode();
|
| 1410 |
+
numBytesDecoded = len;
|
| 1411 |
+
}
|
| 1412 |
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
| 1413 |
+
}
|
| 1414 |
+
|
| 1415 |
+
const cachedTextEncoder = new TextEncoder();
|
| 1416 |
+
|
| 1417 |
+
if (!('encodeInto' in cachedTextEncoder)) {
|
| 1418 |
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
| 1419 |
+
const buf = cachedTextEncoder.encode(arg);
|
| 1420 |
+
view.set(buf);
|
| 1421 |
+
return {
|
| 1422 |
+
read: arg.length,
|
| 1423 |
+
written: buf.length
|
| 1424 |
+
};
|
| 1425 |
+
};
|
| 1426 |
+
}
|
| 1427 |
+
|
| 1428 |
+
let WASM_VECTOR_LEN = 0;
|
| 1429 |
+
|
| 1430 |
+
let wasmModule, wasmInstance, wasm;
|
| 1431 |
+
function __wbg_finalize_init(instance, module) {
|
| 1432 |
+
wasmInstance = instance;
|
| 1433 |
+
wasm = instance.exports;
|
| 1434 |
+
wasmModule = module;
|
| 1435 |
+
cachedDataViewMemory0 = null;
|
| 1436 |
+
cachedFloat32ArrayMemory0 = null;
|
| 1437 |
+
cachedUint32ArrayMemory0 = null;
|
| 1438 |
+
cachedUint8ArrayMemory0 = null;
|
| 1439 |
+
wasm.__wbindgen_start();
|
| 1440 |
+
return wasm;
|
| 1441 |
+
}
|
| 1442 |
+
|
| 1443 |
+
async function __wbg_load(module, imports) {
|
| 1444 |
+
if (typeof Response === 'function' && module instanceof Response) {
|
| 1445 |
+
if (!module.ok) {
|
| 1446 |
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
| 1447 |
+
}
|
| 1448 |
+
|
| 1449 |
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
| 1450 |
+
try {
|
| 1451 |
+
return await WebAssembly.instantiateStreaming(module, imports);
|
| 1452 |
+
} catch (e) {
|
| 1453 |
+
const validResponse = expectedResponseType(module.type);
|
| 1454 |
+
|
| 1455 |
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
| 1456 |
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
| 1457 |
+
|
| 1458 |
+
} else { throw e; }
|
| 1459 |
+
}
|
| 1460 |
+
}
|
| 1461 |
+
|
| 1462 |
+
const bytes = await module.arrayBuffer();
|
| 1463 |
+
return await WebAssembly.instantiate(bytes, imports);
|
| 1464 |
+
} else {
|
| 1465 |
+
const instance = await WebAssembly.instantiate(module, imports);
|
| 1466 |
+
|
| 1467 |
+
if (instance instanceof WebAssembly.Instance) {
|
| 1468 |
+
return { instance, module };
|
| 1469 |
+
} else {
|
| 1470 |
+
return instance;
|
| 1471 |
+
}
|
| 1472 |
+
}
|
| 1473 |
+
|
| 1474 |
+
function expectedResponseType(type) {
|
| 1475 |
+
switch (type) {
|
| 1476 |
+
case 'basic': case 'cors': case 'default': return true;
|
| 1477 |
+
}
|
| 1478 |
+
return false;
|
| 1479 |
+
}
|
| 1480 |
+
}
|
| 1481 |
+
|
| 1482 |
+
function initSync(module) {
|
| 1483 |
+
if (wasm !== undefined) return wasm;
|
| 1484 |
+
|
| 1485 |
+
|
| 1486 |
+
if (module !== undefined) {
|
| 1487 |
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
| 1488 |
+
({module} = module)
|
| 1489 |
+
} else {
|
| 1490 |
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
| 1491 |
+
}
|
| 1492 |
+
}
|
| 1493 |
+
|
| 1494 |
+
const imports = __wbg_get_imports();
|
| 1495 |
+
if (!(module instanceof WebAssembly.Module)) {
|
| 1496 |
+
module = new WebAssembly.Module(module);
|
| 1497 |
+
}
|
| 1498 |
+
const instance = new WebAssembly.Instance(module, imports);
|
| 1499 |
+
return __wbg_finalize_init(instance, module);
|
| 1500 |
+
}
|
| 1501 |
+
|
| 1502 |
+
async function __wbg_init(module_or_path) {
|
| 1503 |
+
if (wasm !== undefined) return wasm;
|
| 1504 |
+
|
| 1505 |
+
|
| 1506 |
+
if (module_or_path !== undefined) {
|
| 1507 |
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
| 1508 |
+
({module_or_path} = module_or_path)
|
| 1509 |
+
} else {
|
| 1510 |
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
| 1511 |
+
}
|
| 1512 |
+
}
|
| 1513 |
+
|
| 1514 |
+
if (module_or_path === undefined) {
|
| 1515 |
+
module_or_path = new URL('sky_web_bg.wasm', import.meta.url);
|
| 1516 |
+
}
|
| 1517 |
+
const imports = __wbg_get_imports();
|
| 1518 |
+
|
| 1519 |
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
| 1520 |
+
module_or_path = fetch(module_or_path);
|
| 1521 |
+
}
|
| 1522 |
+
|
| 1523 |
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
| 1524 |
+
|
| 1525 |
+
return __wbg_finalize_init(instance, module);
|
| 1526 |
+
}
|
| 1527 |
+
|
| 1528 |
+
export { initSync, __wbg_init as default };
|
pkg/sky_web_bg.wasm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e261db3409d05556a07b4bbced65cd50846484616732d8a9bb63815ebd90c99
|
| 3 |
+
size 1261839
|
pkg/sky_web_relaxed_bg.wasm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:44bd66eea0b326c44f84aa485d067d76932b7898e7621507d32ecaeb8911576a
|
| 3 |
+
size 1266147
|
space.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "s6-micro",
|
| 3 |
+
"title": "s6-micro",
|
| 4 |
+
"tagline": "A 2.4 MB ternary decision model that plays four games at the oracle's level and answers typed questions in free text: 0.553 on the typed-decisions bench. Its second version passed the gate that the first one failed, on the same test records.",
|
| 5 |
+
"kind": "game",
|
| 6 |
+
"proofs": false,
|
| 7 |
+
"model_repo": "https://huggingface.co/maxgfr/s6-micro",
|
| 8 |
+
"notes": [
|
| 9 |
+
"A second look: the first version (s6-micro-v1) failed the ECE guard at 0.0821 against 0.08. This version was designed after that reading (twice the decision-training minutes) and judged on the same test records: 0.553 on the bench (gate 0.45), ECE 0.0588, every game at s3-pico's score (docs/s6-gen-prereg.md, amendment 17).",
|
| 10 |
+
"Published at full depth: its conformal early-exit thresholds were rejected by the pre-registered arena check (one extra Dodge veto).",
|
| 11 |
+
"Expect mistakes on questions in free text: 0.401 on When2Call, where it rarely chooses to call a tool, and 0.092 on NOTAM subjects. On 11 of the 20 bench tasks it gives one answer to at least 95% of the items."
|
| 12 |
+
],
|
| 13 |
+
"game": null,
|
| 14 |
+
"gate": "passed",
|
| 15 |
+
"gate_note": "Second version: 0.553 on the typed-decisions bench (gate 0.45) and ECE 0.0588 (guard 0.08). The first version failed the ECE guard at 0.0821, and this one was designed after that reading and judged on the same test records, so its pass is a second look",
|
| 16 |
+
"gate_url": "https://github.com/maxgfr/skycmd/blob/main/BENCH.md#skycmd-s6-s6-nano-s6-micro-general-purpose-decisions-and-games-pre-registered"
|
| 17 |
+
}
|