@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
|
@@ -1566,12 +1566,13 @@ __export(elo_exports, {
|
|
|
1566
1566
|
default: () => ELONavigator
|
|
1567
1567
|
});
|
|
1568
1568
|
import { toCourseElo as toCourseElo2 } from "@vue-skuilder/common";
|
|
1569
|
-
var ELONavigator;
|
|
1569
|
+
var ELO_RELEVANCE_SIGMA, ELONavigator;
|
|
1570
1570
|
var init_elo = __esm({
|
|
1571
1571
|
"src/core/navigators/generators/elo.ts"() {
|
|
1572
1572
|
"use strict";
|
|
1573
1573
|
init_navigators();
|
|
1574
1574
|
init_logger();
|
|
1575
|
+
ELO_RELEVANCE_SIGMA = 300;
|
|
1575
1576
|
ELONavigator = class extends ContentNavigator {
|
|
1576
1577
|
/** Human-readable name for CardGenerator interface */
|
|
1577
1578
|
name;
|
|
@@ -1611,8 +1612,8 @@ var init_elo = __esm({
|
|
|
1611
1612
|
const scored = newCards.map((c) => {
|
|
1612
1613
|
const cardElo = c.elo ?? 1e3;
|
|
1613
1614
|
const distance = Math.abs(cardElo - userGlobalElo);
|
|
1614
|
-
const
|
|
1615
|
-
const samplingKey =
|
|
1615
|
+
const relevance = Math.exp(-((distance / ELO_RELEVANCE_SIGMA) ** 2));
|
|
1616
|
+
const samplingKey = relevance * (0.5 + 0.5 * Math.random());
|
|
1616
1617
|
return {
|
|
1617
1618
|
cardId: c.cardID,
|
|
1618
1619
|
courseId: c.courseID,
|
|
@@ -1624,7 +1625,7 @@ var init_elo = __esm({
|
|
|
1624
1625
|
strategyId: this.strategyId || "NAVIGATION_STRATEGY-ELO-default",
|
|
1625
1626
|
action: "generated",
|
|
1626
1627
|
score: samplingKey,
|
|
1627
|
-
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}),
|
|
1628
|
+
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}), relevance ${relevance.toFixed(3)}, key ${samplingKey.toFixed(3)}`
|
|
1628
1629
|
}
|
|
1629
1630
|
]
|
|
1630
1631
|
};
|