@vue-skuilder/db 0.2.4 → 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 +58 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.js +207 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +207 -19
- 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 +104 -3
- package/src/study/SessionOverlay.ts +245 -21
package/dist/core/index.js
CHANGED
|
@@ -1786,13 +1786,14 @@ var elo_exports = {};
|
|
|
1786
1786
|
__export(elo_exports, {
|
|
1787
1787
|
default: () => ELONavigator
|
|
1788
1788
|
});
|
|
1789
|
-
var import_common5, ELONavigator;
|
|
1789
|
+
var import_common5, ELO_RELEVANCE_SIGMA, ELONavigator;
|
|
1790
1790
|
var init_elo = __esm({
|
|
1791
1791
|
"src/core/navigators/generators/elo.ts"() {
|
|
1792
1792
|
"use strict";
|
|
1793
1793
|
init_navigators();
|
|
1794
1794
|
import_common5 = require("@vue-skuilder/common");
|
|
1795
1795
|
init_logger();
|
|
1796
|
+
ELO_RELEVANCE_SIGMA = 300;
|
|
1796
1797
|
ELONavigator = class extends ContentNavigator {
|
|
1797
1798
|
/** Human-readable name for CardGenerator interface */
|
|
1798
1799
|
name;
|
|
@@ -1832,8 +1833,8 @@ var init_elo = __esm({
|
|
|
1832
1833
|
const scored = newCards.map((c) => {
|
|
1833
1834
|
const cardElo = c.elo ?? 1e3;
|
|
1834
1835
|
const distance = Math.abs(cardElo - userGlobalElo);
|
|
1835
|
-
const
|
|
1836
|
-
const samplingKey =
|
|
1836
|
+
const relevance = Math.exp(-((distance / ELO_RELEVANCE_SIGMA) ** 2));
|
|
1837
|
+
const samplingKey = relevance * (0.5 + 0.5 * Math.random());
|
|
1837
1838
|
return {
|
|
1838
1839
|
cardId: c.cardID,
|
|
1839
1840
|
courseId: c.courseID,
|
|
@@ -1845,7 +1846,7 @@ var init_elo = __esm({
|
|
|
1845
1846
|
strategyId: this.strategyId || "NAVIGATION_STRATEGY-ELO-default",
|
|
1846
1847
|
action: "generated",
|
|
1847
1848
|
score: samplingKey,
|
|
1848
|
-
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}),
|
|
1849
|
+
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}), relevance ${relevance.toFixed(3)}, key ${samplingKey.toFixed(3)}`
|
|
1849
1850
|
}
|
|
1850
1851
|
]
|
|
1851
1852
|
};
|