Documentation
¶
Overview ¶
Package run runs a virtual learner through learner-model and engine, as the platform runs a learner through them: at each time its calendar gives, the bench builds the engine's input as api would — the model's reading, the pool and the lessons the learner's age category suits, the runs of lessons, the attempts closed by "Done", the last closed attempt and the summary of what was handed out —, takes the engine's choice, has the learner answer by its truth, and gives the model the evidence. Within a lesson whose skills all have a verdict it calls the engine at the end of each task link, as api will, and plays its answer: further through the lesson, or a task of consolidation. It records each step, for the invariants and the measures.
Index ¶
Constants ¶
const ( CorridorLow = 0.70 CorridorHigh = 0.85 )
The corridor of success E1 reads P* in, and the pause before a task with a seen solution.
Variables ¶
var ErrRun = errors.New("run: the run cannot go on")
ErrRun is a run that cannot go on: an input the engine or the model refuses, or a choice the bench cannot follow.
var Essays = Limit{Days: 60, Rubrics: true}
Essays is the run of a learner of essays: until the tasks with a rubric it is suited run out, within a bound of days.
var Forgetting = Limit{Days: 180}
Forgetting is the run of the populations of forgetting, by days of the calendar alone.
var Maths = Limit{Answers: 200, Days: 365}
Maths is the run of a learner in mathematics: as many answers of items with a verdict as a run of standalone, within a year of the calendar, so that a rule that gives nothing for good still ends.
Functions ¶
Types ¶
type Call ¶ added in v0.1.15
Call is a call of the engine within a lesson: the input it got and its answer.
type ItemObs ¶
type ItemObs struct {
PTrue float64 // P* of the first answer
// PGiven is P* of the item when it was given, as the truth stood then, without what only the
// attempt holds — the technique, the shock, the error and the repeat (E1).
PGiven float64
PModel float64 // P of the model at the attempt, with retention
// PFresh is P of the model by the same estimate with R̄ = 1, c + (P − c)/R̄, by its own formula
// c + (1 − c) · R̄ · σ, R̄ the mean R of the item's recorded skills with a verdict in the order of
// their IDs, 1 for a skill with no practice and in the trial series (chanceOf in step.go of
// learner-model), for M10.
PFresh float64
Pause int64 // seconds since the last practice of the item's primary skills, -1 for none
Help bool // the answer had help: the technique on request, or a task whose solution was seen
Many bool // the attempt has more than one item: a page
}
ItemObs is one item of an attempt.
type Limit ¶
Limit is when a learner's run ends: after Answers first answers of items with a verdict, when Answers is above 0; after Days days of the calendar; and, when Rubrics, once every task with a rubric the learner's age category suits is done.
type Obs ¶
type Obs struct {
At int64 // when the attempt was given
Repeat bool // the task, not a template, had its solution seen before: a repeat (M8)
Answers int // the learner's first answers of items with a verdict before the attempt
Band int32 // the place of the band of the attempt's task (M11)
Items []ItemObs // beside the attempt's items
Before []SkillObs
After []SkillObs
// Level and TrueLevel are θ of the model and θ* of the truth of the attempt's module after it.
Level, TrueLevel float64
}
Obs is what the measures read of one attempt with a verdict: the model and the truth of its items at the attempt, and of the skills of its module before and after it.
type Pool ¶
type Pool struct {
// Ceiling is the largest share of items with a verdict whose P* is in the corridor, of one task
// of the pool the rule could give: no rule that gives whole tasks gets above it.
Ceiling float64
// Given tells that the pool has a task the rule could give.
Given bool
// Reachable are the skills within reach by the truth, by full ID: skills with a verdict whose
// prerequisites the truth holds, with a task of the pool the rule could give on them.
Reachable []string
// contains filtered or unexported fields
}
Pool is what the truth says of the pool at a choice, before the engine chooses: what any rule could have given, so that the measures of the engine read the choice against it.
type Reach ¶ added in v0.1.44
Reach is an item of the goal for the tutor a run watches: the item; the skills by full ID whose mastery reaches it, as they stood when the goal was set — a skill item's skill, or the skills that replaced a retired one; an area item's skills the preview of the goal named, the five the tutor is shown —; and the first answers of items with a verdict by the end of the attempt after which the model held every one of them mastered at once, -1 while it has not.
type Record ¶
type Record struct {
Unit string
Learner *learner.Learner
Steps []Step
State learnermodel.State // the model's state at the end
Answers int // first answers of items with a verdict
Days int // the day of the calendar of the last choice, from 1
// Guard counts the pieces of evidence after which the count of the guard of their module,
// FailuresInARow of the model's state, stood at guardFailures, having stood one below it: where
// learner-model lowers the level by a band.
Guard int
// Corrected is the first answers before the adult corrected the module level, 0 when no adult
// did (C-).
Corrected int
// Goal are the items of the goal for the tutor the run watches, in their order (Aim).
Goal []Reach
}
Record is a learner's run.
type Rule ¶
type Rule int
Rule is the rule that chooses in a run: the engine, or the ceiling of the engine.
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
Run is a learner's run in progress: the model's state and what api keeps of the learner.
func New ¶
New starts the run of a learner in the given modules, the same the learner was drawn in. Every limit has its days, so that every run ends.
func (*Run) Aim ¶ added in v0.1.44
Aim has the run set the goal for the tutor before the learner's first choice, at its time, as an adult sets it — every input from then on gives the engine sets —, and record the reach of each item of watches from then: the items it sets, or, on the same learners with no goal, the items whose time to the goal is read against them. A new run sets no goal and watches nothing.
func (*Run) All ¶
All runs the learner to the end of its limit and gives the record; on an error, the record up to the step that failed.
func (*Run) Record ¶
Record gives the record so far: the steps taken and the model's state after them.
type SkillObs ¶
type SkillObs struct {
Skill string
Evidence int64
Estimate float64 // θ + δ of the model
Truth float64 // θ* + δ*
Mastered bool // the model's mastery
Band int32 // the model's mastery band, or the first band the skill is taught on
TrulyMastered bool // the truth has mastered it on Band
Retention float64 // R* of the truth
PRef float64 // P of the model on the reference task of Band, with retention
PTrueRef float64 // P* of the truth on it, with R*
Last int64 // the model's last practice of it
}
SkillObs is one skill with a verdict of the attempt's module.
type Step ¶
type Step struct {
Input engine.Input // the input as the engine got it; the choice is the same on it again
Choice engine.Choice
Attempts []learner.Attempt // the attempts the choice gave: one for a task, a lesson's tasks
// Evidence is the evidence the model got of each attempt, as Append gave it back; nil for an
// attempt of a task with a rubric, which gives none.
Evidence []*learnermodel.Evidence
// Instances is the number of the instance of each attempt's template, chosen by the attempt's
// seed as the platform chooses it; -1 for a task that is no template.
Instances []int
// Results are the results of each attempt on its primary skills, as the engine reads them in the
// last closed attempt (Last.Results).
Results [][]engine.SkillResult
// Obs is what the measures read of each attempt with a verdict: the model and the truth before
// and after it; nil for an attempt of a task with a rubric.
Obs []*Obs
Pass *learner.Pass // the pass of a lesson, on the step that ends it, with all its attempts
// Pool is what the truth says of the pool at the choice, before the engine chose; nil on a step
// Resumed.
Pool *Pool
// Further are the calls of the engine at the end of the step's task links answered with the
// lesson of the same run: further through the lesson, no new choice.
Further []Call
// Correction is the adult's correction of the module level right after one of the step's
// attempts, as Append gave it back; nil on every other step (C-).
Correction *learnermodel.Evidence
// Resumed tells that the step is a lesson going on after a task of consolidation: its choice is
// the engine's answer after the consolidation, the lesson of the same run, and no new choice.
Resumed bool
}
Step is one choice of the run and what came of it. Evidence, Instances and Results stand beside Attempts, one for each. A lesson with a task of consolidation is several steps, in the order of time: the lesson up to the consolidation, the consolidation — a choice of a task —, and the lesson after it, Resumed.