Module trane::graph

source ·
Expand description

Defines the dependency graph of units of knowledge, their dependency relationships, and basic read and write operations.

The dependency graph is perhaps the most important part of the design of Trane so its nature and purpose should be well documented. At its core, the goal of Trane is to guide students through the graph of units of knowledge composed of exercises, by having each successive unit teach a skill that can be acquired once the source unit is sufficiently mastered. This process of repetition of mastered exercises and introduction of new ones should lead to the complete mastery of complex meta-skills such as jazz improvisation, chess, piano, etc. that are in fact the mastered integration of many smaller and interlinked skills.

This graph is implemented by simulating a directed acyclic graph (DAG) of units and dependency/dependents relationships among them. A unit can be of three types:

  1. An exercise, which represents a single task testing a skill which the student is required to assess when practiced.
  2. A lesson, which represents a collection of exercises which test the same skill and can be practiced in any order.
  3. A course, a collection of lessons which are related. It mostly exists to help organize the material in larger entities which share some context.

The relationships between the units can be of two types:

  1. A course or lesson A is a dependency of course or lesson B if A needs to be sufficiently mastered before B can be practiced.
  2. The reverse relationship. Thus, we say that B is a dependent of A.

The graph also provides a number of operations to manipulate the graph, which are only used when reading the Trane library (see course_library), and another few to derive information from the graph (“which are the lessons in a course?” for example). The graph is not in any way responsible on how the exercises are scheduled (see scheduler) nor it stores any information about a student’s practice (see practice_stats) or preferences (see blacklist, filter_manager and review_list).

Traits

Stores the units and their dependency relationships (for lessons and courses only). It provides basic functions to update the graph and retrieve information about it for use during scheduling and student’s requests.