fix: deduplicate distractors, replace tautological test, add distractor failure test
This commit is contained in:
parent
3d16ab0fff
commit
a02f3b139d
3 changed files with 81 additions and 14 deletions
|
|
@ -39,10 +39,13 @@ export const createGameSession = async (
|
|||
request.target_language,
|
||||
request.pos,
|
||||
request.difficulty,
|
||||
3,
|
||||
6,
|
||||
);
|
||||
|
||||
const optionTexts = [term.targetText, ...distractorTexts];
|
||||
const uniqueDistractors = distractorTexts.filter(
|
||||
(t) => t !== term.targetText,
|
||||
);
|
||||
const optionTexts = [term.targetText, ...uniqueDistractors.slice(0, 3)];
|
||||
const shuffledTexts = shuffleArray(optionTexts);
|
||||
const correctOptionId = shuffledTexts.indexOf(term.targetText);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue