-
Notifications
You must be signed in to change notification settings - Fork 0
Training Mode
In the file src/components/TrainingModeSelection.tsx, three training mode choices are predefined:
-
Quick Training Mode (QTM): The user just inputs the solution of the algorithm. It should be kept in mind for this that multiple algorithms calculate the same thing (for example minimum spanning trees for kruskal/prim). Feedback should not take up a separate page but rather be given through the
FeedbackAlertcomponent or simple checkmarks/x's. Currently implemented for: Dijkstra, Kruskal/Prim. -
Step-By-Step Mode (STM): This mode should strongly depend on the algorithm/the specific Pseudocode taught in the lecture and go through the whole algorithm.
Some things to consider for this mode:
- Use Training Stages to display a progress bar.
- Use the
TrainingEvaluationcomponent to give Feedback. - If the user gives a wrong answer, they should be notified, but then the mode should proceed (without waiting for the correct answer). Currently implemented for: Dijkstra, Kruskal, Prim.
- Random Mode (RM): The idea is to have something similar to STM but only for a few consecutive steps randomly chosen. Alternatively one could imagine randomly posing questions about the algorithm "Duolingo-Style", for example: Which of these three edges would be chosen in the next iteration. Currently implemented for: Dijkstra.
These modes (specifically the first two) should always be implemented. (RM is maybe not reasonable for algorithms as simple as Kruskal).
The routing setup is similar to the ones for AlgorithmPage and GraphPage: The file src/routes/PracticeRouter.tsx contains the component PracticeRouter, which returns the PracticePages of an algorithm.
The available modes for an algorithm should be specified in src/utils/available-algorithms.ts.
These modes are used by src/routes/PracticePages.tsx to display the TrainingModeSelection and handle routing to the available modes.
Additionally, it uses a component called Training that defines the layout of the page (analogous to src/components/Algorithm.tsx) and displays the visualiser.
In the file src/utils/available_algorithms.tsx, it is specified for each algorithm whether it has a training mode and which PracticePages file belongs to it.