@vue-skuilder/db 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.js +5 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +5 -4
- package/dist/core/index.mjs.map +1 -1
- package/dist/impl/couch/index.js +5 -4
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +5 -4
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.js +5 -4
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +5 -4
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +103 -0
- package/dist/index.d.ts +103 -0
- package/dist/index.js +413 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +413 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/navigators/generators/elo.ts +32 -11
- package/src/study/SessionController.ts +187 -10
- package/src/study/SessionDebugger.ts +10 -0
- package/src/study/SessionOverlay.ts +500 -0
package/dist/core/index.mjs
CHANGED
|
@@ -1764,12 +1764,13 @@ __export(elo_exports, {
|
|
|
1764
1764
|
default: () => ELONavigator
|
|
1765
1765
|
});
|
|
1766
1766
|
import { toCourseElo as toCourseElo2 } from "@vue-skuilder/common";
|
|
1767
|
-
var ELONavigator;
|
|
1767
|
+
var ELO_RELEVANCE_SIGMA, ELONavigator;
|
|
1768
1768
|
var init_elo = __esm({
|
|
1769
1769
|
"src/core/navigators/generators/elo.ts"() {
|
|
1770
1770
|
"use strict";
|
|
1771
1771
|
init_navigators();
|
|
1772
1772
|
init_logger();
|
|
1773
|
+
ELO_RELEVANCE_SIGMA = 300;
|
|
1773
1774
|
ELONavigator = class extends ContentNavigator {
|
|
1774
1775
|
/** Human-readable name for CardGenerator interface */
|
|
1775
1776
|
name;
|
|
@@ -1809,8 +1810,8 @@ var init_elo = __esm({
|
|
|
1809
1810
|
const scored = newCards.map((c) => {
|
|
1810
1811
|
const cardElo = c.elo ?? 1e3;
|
|
1811
1812
|
const distance = Math.abs(cardElo - userGlobalElo);
|
|
1812
|
-
const
|
|
1813
|
-
const samplingKey =
|
|
1813
|
+
const relevance = Math.exp(-((distance / ELO_RELEVANCE_SIGMA) ** 2));
|
|
1814
|
+
const samplingKey = relevance * (0.5 + 0.5 * Math.random());
|
|
1814
1815
|
return {
|
|
1815
1816
|
cardId: c.cardID,
|
|
1816
1817
|
courseId: c.courseID,
|
|
@@ -1822,7 +1823,7 @@ var init_elo = __esm({
|
|
|
1822
1823
|
strategyId: this.strategyId || "NAVIGATION_STRATEGY-ELO-default",
|
|
1823
1824
|
action: "generated",
|
|
1824
1825
|
score: samplingKey,
|
|
1825
|
-
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}),
|
|
1826
|
+
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}), relevance ${relevance.toFixed(3)}, key ${samplingKey.toFixed(3)}`
|
|
1826
1827
|
}
|
|
1827
1828
|
]
|
|
1828
1829
|
};
|