@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/impl/couch/index.js
CHANGED
|
@@ -1710,13 +1710,14 @@ var elo_exports = {};
|
|
|
1710
1710
|
__export(elo_exports, {
|
|
1711
1711
|
default: () => ELONavigator
|
|
1712
1712
|
});
|
|
1713
|
-
var import_common5, ELONavigator;
|
|
1713
|
+
var import_common5, ELO_RELEVANCE_SIGMA, ELONavigator;
|
|
1714
1714
|
var init_elo = __esm({
|
|
1715
1715
|
"src/core/navigators/generators/elo.ts"() {
|
|
1716
1716
|
"use strict";
|
|
1717
1717
|
init_navigators();
|
|
1718
1718
|
import_common5 = require("@vue-skuilder/common");
|
|
1719
1719
|
init_logger();
|
|
1720
|
+
ELO_RELEVANCE_SIGMA = 300;
|
|
1720
1721
|
ELONavigator = class extends ContentNavigator {
|
|
1721
1722
|
/** Human-readable name for CardGenerator interface */
|
|
1722
1723
|
name;
|
|
@@ -1756,8 +1757,8 @@ var init_elo = __esm({
|
|
|
1756
1757
|
const scored = newCards.map((c) => {
|
|
1757
1758
|
const cardElo = c.elo ?? 1e3;
|
|
1758
1759
|
const distance = Math.abs(cardElo - userGlobalElo);
|
|
1759
|
-
const
|
|
1760
|
-
const samplingKey =
|
|
1760
|
+
const relevance = Math.exp(-((distance / ELO_RELEVANCE_SIGMA) ** 2));
|
|
1761
|
+
const samplingKey = relevance * (0.5 + 0.5 * Math.random());
|
|
1761
1762
|
return {
|
|
1762
1763
|
cardId: c.cardID,
|
|
1763
1764
|
courseId: c.courseID,
|
|
@@ -1769,7 +1770,7 @@ var init_elo = __esm({
|
|
|
1769
1770
|
strategyId: this.strategyId || "NAVIGATION_STRATEGY-ELO-default",
|
|
1770
1771
|
action: "generated",
|
|
1771
1772
|
score: samplingKey,
|
|
1772
|
-
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}),
|
|
1773
|
+
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}), relevance ${relevance.toFixed(3)}, key ${samplingKey.toFixed(3)}`
|
|
1773
1774
|
}
|
|
1774
1775
|
]
|
|
1775
1776
|
};
|