Documentation
¶
Overview ¶
Package learnermodel is NovaTrail's learner model: it estimates how well a learner has mastered each skill of a module from the evidence of finished attempts, and computes each skill's state.
It is a library with no input or output of its own. The api service hands it the evidence and the module's skill graph, keeps the evidence log and the state the library computes from it, and passes the time in as a number; the engine reads that state to pick what comes next. The library picks no lesson or task, gives no verdict, calls no AI model and reads no module package or database.
The state is a fold of the evidence log, so appending a record gives, bit for bit, the state recomputed from the whole log, on any build of one version of this module, WebAssembly included. The code imports nothing but Go's standard library, and only the packages its rules allow.
What the library computes and why is in this repository's docs/architecture.md and docs/decisions.md.
Index ¶
- Constants
- Variables
- func Append(s State, e Evidence, g Graphs) (State, Evidence, error)
- func EncodeEvidence(e Evidence) ([]byte, error)
- func EncodeState(s State) ([]byte, error)
- type AnchorReadout
- type AnchorReason
- type AnchorStatus
- type Assessability
- type Band
- type BandRef
- type CheckKind
- type Evidence
- type FoundTrap
- type GoalItem
- type GoalItemSince
- type Grade
- type Graph
- type Graphs
- type ItemAnswer
- type ItemProbability
- type ModuleGraph
- type ModuleReadout
- type ModuleState
- type Outcome
- type OutcomeKind
- type Provenance
- type Readout
- type RetiredSkill
- type ReviewDate
- type Skill
- type SkillReadout
- type SkillState
- type Slot
- type State
- type Task
- type TaskItem
- type TaskReadout
- type TeacherReadout
- type TrapCount
- type TrialAnswer
- type UnverdictedReason
- type Verdict
Constants ¶
const EvidenceKind = 4
EvidenceKind is the kind of evidence this version writes. It reads every kind up to it, and a later one too, skipping what it does not know. Kind 2 adds LeadingQuestionOnRequest, which kind 1 does not record, kind 3 LevelSetByAdult, which kinds 1 and 2 do not, and kind 4 the goal set, HasGoalSet and GoalItems, which only a goal set writes. A goal set is the one record an earlier version refuses rather than reads: it names no task, and a version before kind 4 requires one.
const NoBound int64 = math.MaxInt64
NoBound is the moment of ReplayBefore and GoalBefore that takes every record of the log, whatever its time.
const StateKind = 2
StateKind is the kind of state this version writes. It reads every kind up to it. Kind 2 adds a module's FailuresInARow and TrialEndedByAdult, the state of the guard and of the adult's correction, which kind 1 does not record.
Variables ¶
var ( // ErrInvalid is an input that breaks a rule the library relies on: a duplicate ID, a place // outside the bands, a skill the graph does not know. ErrInvalid = errors.New("learnermodel: invalid input") // ErrCorrupt is bytes that are no encoding of evidence or a state. ErrCorrupt = errors.New("learnermodel: corrupt bytes") // ErrNotFinite is a NaN or an infinity, which the encoding refuses both ways. ErrNotFinite = errors.New("learnermodel: a number that is not finite") )
The kinds of error the library returns, as values and never by panicking. errors.Is tells them apart; the message says where.
Functions ¶
func Append ¶
Append appends a piece of evidence to a state — the cache api keeps — against the graphs of the current versions of the modules, and gives the new state and the evidence with the start band the step took: the module's, when it has a state, and the evidence's own otherwise. api writes both in one transaction. The zero State is the empty one; the state Append gives is of StateKind and shares no memory with s, while the evidence it gives shares e's lists.
The step reads only the graph of the evidence's module, and gives the evidence of a skill that graph retired to each skill that replaced it, in full. A module whose entry says it has no current version moves nothing: its evidence waits in the log. Evidence with no answer moves nothing either, and gives a module no state; nor does evidence whose key or skill tags came from AI, or whose provenance is not given or one this version does not know. A goal set, which GoalSet gives, is no evidence of a skill or a level: Append gives the state as it was, of StateKind, and the evidence as it is, and reads no graph for it.
It refuses, with ErrInvalid:
- a state of a kind outside 1 to StateKind, unless it is the zero State, one not in its canonical order, one with a skill of a stability below τ₀, and one EncodeState would refuse;
- evidence of a kind below 1, evidence EncodeEvidence would refuse but for a later kind — a goal set GoalSet would not give among it —, and evidence but a goal set whose task ID names no module, whose task is not of a difficulty from 1 to 5, or whose task band or start band is at a place below 1;
- a choice without its number of options or with fewer than two, an item with reasons of submissions that was never submitted, and an item with an answer, in evidence that weighs, and no slot;
- a module with no entry in g, and a graph whose module is not its entry's, whose lists — its skills, the bands each is taught at, its retired skills and the replacements of each — are not in the order NewGraph gives, or with a retired skill that is still a skill or a replacement that is not one.
func EncodeEvidence ¶
EncodeEvidence gives the bytes of e. It refuses, with ErrInvalid: a kind outside 1 to EvidenceKind; a string that is no UTF-8; a duplicate place, skill or trap; items of the task and answers whose places do not match one for one; a value set without its flag of presence — a rung without HasRung, say; a leading question on request in evidence of kind 1, and a correction in kinds 1 and 2, and a goal set in kinds 1 to 3, which do not record them; a correction with skills, items, traps or the other facts of an attempt, or whose task is not that of LevelCorrection; and a goal set other than GoalSet gives — with a fact of an attempt, goal items without HasGoalSet, or items GoalSet refuses.
func EncodeState ¶
EncodeState gives the bytes of s. It refuses, with ErrNotFinite, a NaN or an infinity, and, with ErrInvalid, a kind outside 1 to StateKind, a string that is no UTF-8, a duplicate module, skill or trap, a mastery band without Mastered, a count of the guard below 0, and, in a state of kind 1, which does not record them, a count of the guard or a trial series ended by an adult.
Types ¶
type AnchorReadout ¶
type AnchorReadout struct {
Anchor string
Status AnchorStatus
Reason AnchorReason
Teachers []TeacherReadout // ordered by skill ID byte by byte
}
AnchorReadout is the status of an anchor skill, with its reason and the skills that teach it.
type AnchorReason ¶
type AnchorReason int32
AnchorReason is why an anchor skill has its status: for AnchorHasNot, not mastered or no evidence; for AnchorUnknown, no one teaches it or only skills that may not be mastered do — without a verdict, or with no band they are taught at, as in a module with no tasks —, which AnchorReasonNoVerdictTeacher names.
const ( AnchorReasonNone AnchorReason = iota AnchorReasonNotMastered AnchorReasonNoEvidence AnchorReasonNoTeacher AnchorReasonNoVerdictTeacher )
type AnchorStatus ¶
type AnchorStatus int32
AnchorStatus is whether a learner has an anchor skill.
const ( AnchorUnspecified AnchorStatus = iota AnchorHas AnchorHasNot AnchorUnknown )
type Assessability ¶
type Assessability int32
Assessability is how the platform can know a learner's command of a skill. Only a skill with AssessabilityVerdict has a state.
const ( AssessabilityUnspecified Assessability = iota AssessabilityVerdict AssessabilityRubric AssessabilityNone )
type Band ¶
type Band struct {
Place int32
ID string
Grades []int32 // the grades the band names, ascending; empty in a module without grades
}
Band is a band of a module's difficulty scale, in the order of the manifest's `bands`.
type BandRef ¶
BandRef names a band of a module's difficulty scale by its place in the `bands` of the module version, from 1, and by its ID in the manifest. The model reads the place; the ID is kept.
func BandByGrade ¶
BandByGrade gives the start band of a module for a learner's grade, from the bands of the version the attempt ran on, in their order: the band whose grades name the grade; for a grade no band names, the band nearest by the distance to its nearest grade, and the lower of two as near; without a grade, or in a module without grades, the first band. api puts it in the evidence it builds, and Append keeps it only for a module with no state yet.
It refuses, with ErrInvalid, no bands, bands out of their places 1, 2, … and a band ID twice, as NewGraph does.
type CheckKind ¶
type CheckKind int32
CheckKind is how the answer in a slot is checked: the kinds that give a verdict. A value this version does not know is kept as its number, and its item reads as one with no answer.
type Evidence ¶
type Evidence struct {
Kind int32
Task Task
StartBand BandRef
Outcome Outcome
// PracticeTime is the time of the attempt's last action, in whole seconds of Unix time, UTC; of a
// correction or a goal set, when the adult made it.
PracticeTime int64
TechniqueOnStep bool
TechniqueOnRequest bool
// LeadingQuestionOnRequest is whether a hint the learner asked for gave the task's leading
// question, which a hint gives only before the first wrong answer. Kind 1 does not record it, and
// it is false there.
LeadingQuestionOnRequest bool
ExplainAgainCount int32
SolutionSeenBefore bool
HasSolutionSeenFact bool // false for a template, whose instances differ
// Items holds what happened to each item; the slots and the item's own skills are in Task.
Items []ItemAnswer
Traps []FoundTrap // ordered by ID byte by byte
// LevelSetByAdult tells that the evidence is no attempt but an adult's correction of the
// module's level, as LevelCorrection gives it. Kinds 1 and 2 do not record it, and it is
// false there.
LevelSetByAdult bool
// HasGoalSet tells that the evidence is no attempt but a goal for the tutor set, as GoalSet
// gives it, and GoalItems are its items in order, none when the goal was removed. Kinds 1 to 3
// do not record it.
HasGoalSet bool
GoalItems []GoalItem
}
Evidence is the evidence of one finished attempt: its observations, not the model's conclusions, so that a later version recomputes the state from it. Two records of the log are no attempt but take its form: an adult's correction of a module's level, LevelCorrection, and a goal for the tutor set, GoalSet.
func DecodeEvidence ¶
DecodeEvidence reads evidence from b, of any kind from 1: a later kind too.
func GoalSet ¶ added in v0.1.23
GoalSet gives the evidence of a goal for the tutor set: its items in order, the first the most important, none when the goal is removed, at a time in whole seconds of Unix time, UTC. It names no task, no module and no band, and holds nothing of an attempt: the model does not read it, and Append and Recompute take it and move nothing, with no graph; what the goal was at a moment is read from these records of the log. EncodeEvidence and Append refuse, and DecodeEvidence reads as corrupt, more than three items, an item twice, an item that is neither an area nor a skill or is both, and a skill that is no full skill ID, `<publisher>/<module>/skill/<ID>`: whether an area is on the format's list, and a skill in a graph, api checks. A version before kind 4 refuses the record — DecodeEvidence with ErrCorrupt, for it lacks a task, and Append with ErrInvalid, for its task names no module —, so that it never reads it as an attempt.
func LevelCorrection ¶ added in v0.1.13
LevelCorrection gives the evidence of an adult's correction of the level of a module, by its full ID: the band the adult set, by its place and ID in the module's current version, at a time in whole seconds of Unix time, UTC, with the start band api gives any evidence of the module, by BandByGrade. Append sets the module's level in that band in one step, or keeps it when it stands there already, ends the trial series and starts the guard's count anew, so that a repeat changes nothing; a band above the version's highest is the highest. Its task is no task: its ID is `<module>/level/<band ID>`, its band the band set and its difficulty 3, the band's middle, where the level goes, and the adult its provenance; it has no skills and no items, so that a version before kind 3, which does not know LevelSetByAdult, reads it as evidence with no answer, which moves nothing.
type FoundTrap ¶
type FoundTrap struct {
ID string
Skills []string // its skills in the trap catalog of the attempt's version, by full ID
ItemPlaces []int32 // where it was found, ascending
}
FoundTrap is a trap the program found in the attempt by a wrong value.
type GoalItem ¶ added in v0.1.23
GoalItem is an item of the goal for the tutor: an area, by its code in the module format's closed list, or a skill, by its full ID. Exactly one of the two is set.
type GoalItemSince ¶ added in v0.1.23
GoalItemSince is an item of the goal for the tutor and since when it has stood in the goal without a break: SetAt is the time of the goal set that put it there, in whole seconds of Unix time, UTC.
func GoalBefore ¶ added in v0.1.23
func GoalBefore(log []Evidence, moment int64) []GoalItemSince
GoalBefore reads the goal for the tutor in force at a moment from the evidence log: the items of the last goal set of log, in the order of the log, whose time is before the moment, in whole seconds of Unix time, UTC, or of the last one with NoBound; each item with the time of the goal set from which it has stood in the goal without a break, so that a goal set that only reorders the items keeps their times, and an item removed and set again has the time it was set again. With no goal set before the moment, or the last one empty — the goal removed —, there is no goal and it gives none. It reads only the goal sets of the log, as ReplayBefore takes the records, and leaves out a goal set Append refuses; it reads no graph, and an item stays as it was set, its skill retired or its module gone too. It writes nothing anywhere.
type Grade ¶
Grade is a learner's school grade, or no grade: Known is false for a learner without one, and Value is then 0. "No grade" is a case of its own, not grade 0.
type Graph ¶
type Graph struct {
Module string
Bands []Band // by place, from 1
Skills []Skill // ordered by ID byte by byte
Retired []RetiredSkill // ordered by ID byte by byte
}
Graph is the graph of one version of a module, as the model and the engine read it.
func NewGraph ¶
func NewGraph(module string, bands []Band, skills []Skill, retired []RetiredSkill, tasks []Task) (Graph, error)
NewGraph builds the graph of a module version from its bands, its skills, its retired skills and the descriptions of its tasks, so that api and sim build one graph of one module alike. It derives each skill's BandsTaught — the BandsTaught given is ignored — and orders every list canonically. It copies what it is given: the graph shares nothing with its input.
A skill is taught at the band of a task where it is a primary skill of an item: of the item's own skills, or of the task's for an item without its own, or for a task without items.
It refuses, with ErrInvalid: bands out of their places 1, 2, …; a duplicate band, skill or retired ID, and an ID or grade twice in one list; a retired ID that is a skill; a replacement or a primary skill of a task or an item the module does not have; a task band outside the bands or whose ID is not the ID of the band at its place; and a difficulty outside 1 to 5.
type Graphs ¶
type Graphs map[string]ModuleGraph
Graphs gives each module the graph of its current version, by the module's full ID. The model looks modules up in it and never ranges over it, so its order cannot matter.
type ItemAnswer ¶
type ItemAnswer struct {
Place int32
Submitted bool
// Unverdicted is why each submission before the first verdict gave none, in their order.
Unverdicted []UnverdictedReason
// FirstVerdict is the item's first verdict, when HasFirstVerdict, and WrongBeforeFirst the
// number of wrong answers in the attempt before the submission that gave it.
FirstVerdict Verdict
HasFirstVerdict bool
WrongBeforeFirst int32
// FinalVerdict is the item's verdict at the end, when HasFinalVerdict.
FinalVerdict Verdict
HasFinalVerdict bool
// WrongBeforeFirstCorrect is the number of wrong answers in the attempt before the item's
// first correct verdict, when HasFirstCorrect.
WrongBeforeFirstCorrect int32
HasFirstCorrect bool
}
ItemAnswer is what happened to one item in the attempt, by its place.
type ItemProbability ¶
ItemProbability is the probability of a right answer to an item of a candidate task at t₀: Probability, when HasVerdict; an item without a verdict has none.
type ModuleGraph ¶
ModuleGraph is the entry of a module in Graphs: the graph of its current version, or no current version, when Current is false and Graph is empty.
type ModuleReadout ¶
type ModuleReadout struct {
Module string
// HasEvidence is false for a module of the engine with no evidence yet, whose StartBand is
// then the band of the learner's grade, BandByGrade, the starting point a band below it, or the
// zero BandRef when the module's current version has no bands.
HasEvidence bool
StartBand BandRef
// LevelBand is the band the module's level stands in, by the bands of its current version — of
// the starting point for a module with no evidence —: the band whose middle task is nearest the
// level, the highest band when the level is above it. HasLevelBand is false, and LevelBand
// the zero BandRef, when the level is more than half a band below the lowest band, as it starts
// for a learner of that band's grades, and when the module has no current version or one with no
// bands. An adult's correction sets the level in the band it names, where the next evidence
// moves it on; that the band is next to this one is for api to check.
LevelBand BandRef
HasLevelBand bool
// TrialOver tells whether the module's trial series is over, and LastInTrial whether the last
// evidence that moved the module was still in it, the evidence that ended it too.
// Both are false before the module's first evidence.
TrialOver bool
LastInTrial bool
// Traps are the traps the program found that have no skill with a state, counted
// at the module.
Traps []TrapCount
Skills []SkillReadout // ordered by skill ID byte by byte
}
ModuleReadout is what reading gives of a module.
type ModuleState ¶
type ModuleState struct {
Module string
Level float64 // θ
AnswerWeight float64 // n
StartBand BandRef
Trial []TrialAnswer // in the order of the log, while the trial series lasts
Traps []TrapCount // the traps with no skill that has a state
Skills []SkillState // ordered by skill ID byte by byte
// LastInTrial tells whether the last piece of evidence that moved the module was still in the
// trial series, the one that ended it too: that one clears the series' answers, and the engine
// still needs to know. Evidence that moves nothing leaves it as it is.
LastInTrial bool
// FailuresInARow is the count of the guard: the pieces of evidence in a row, past the
// trial series, on which the model expected the learner to know at least half of the answers,
// above the guessing floor, and fewer than half of the items with an answer were solved at the
// end of the attempt. The third lowers the level by a band; the count goes on until a piece of
// evidence that is no such failure.
FailuresInARow int32
// TrialEndedByAdult tells whether an adult's correction of the level ended the trial series
// before its five answers: the series is then over whatever the weight of answers.
TrialEndedByAdult bool
}
ModuleState is the state of a learner in one module.
type Outcome ¶
type Outcome struct {
Kind OutcomeKind
Rung int32
HasRung bool
}
Outcome is the outcome of an attempt, with the rung of the hint after which it ended, when HasRung: from 1, for OutcomeAfterHint.
type OutcomeKind ¶
type OutcomeKind int32
OutcomeKind is how an attempt ended. A value this version does not know is kept as its number and weighs nothing.
const ( OutcomeUnspecified OutcomeKind = iota OutcomeFirstSubmission OutcomeAfterHint OutcomeWithSketch OutcomeSolutionShown OutcomeLeftUnfinished OutcomeUnchecked )
type Provenance ¶
type Provenance int32
Provenance is where a key or the skill tags of a task came from.
const ( ProvenanceUnspecified Provenance = iota ProvenanceAuthor ProvenanceSolver ProvenanceAdult ProvenanceAI )
type Readout ¶
type Readout struct {
Modules []ModuleReadout // ordered by module ID byte by byte
Anchors []AnchorReadout // ordered by anchor ID byte by byte
// contains filtered or unexported fields
}
Readout is what reading the state at t₀ gives. It keeps what Task needs: a copy of the state, the graphs, t₀ and the grade.
func Read ¶
Read reads a state — the cache api keeps — at the time at, in whole seconds of Unix time, UTC, for a learner of a grade, against the graphs of the current versions of the modules and the modules of the engine: those connected and fit for the learner, whose graphs the engine gets. g gives an entry to every module of the state and of the engine; the Readout keeps g for Task, and the caller changes neither while it reads.
Modules are the modules of the state and of the engine. A module with a state gives its start band, the two flags of the trial series and its skills; a module of the engine with no state and a current version gives the starting point by the grade, BandByGrade, or none when that version has no bands, as a module with no tasks may have none; one with neither is left out. Anchors are the anchor skills a graph of a module of the engine names as a prerequisite or a skill it teaches, each with its status: held, when a skill that teaches it is mastered in any of the modules with a current version; otherwise not held, when a skill of the engine's modules that may be mastered teaches it — a skill with a verdict and a band it is taught at —, not mastered when one of them has answers, no evidence otherwise; and unknown otherwise: no one teaches it, or only skills that may not be mastered do. A module with no current version gives no graph, so its mastery is not seen.
It refuses, with ErrInvalid, a state Append would refuse, a module of the engine twice or not named by the full ID of a module, a module with no entry in g, a graph Append would refuse, and bands, other than none, that BandByGrade would refuse.
func (Readout) Task ¶
func (r Readout) Task(t Task) (TaskReadout, error)
Task gives the probability of a right answer to each item of a candidate task at the time of reading, by place: the P the step would take of evidence at that time, by the same function — with the retention of the item's skills at t₀, and without it, R̄ = 1, while the module's trial series lasts. A module with no state starts at the starting point by the grade. An item with no slot, or with one of a kind of check this version does not know, has no verdict and so no P. The provenance of the task's key and skill tags does not change P: evidence that weighs nothing by it moves nothing, but the chance of a right answer is the same.
It refuses, with ErrInvalid, a task the codec would refuse, one whose ID names no module, one not of a difficulty from 1 to 5 or at a band place below 1, a choice without its number of options or with fewer than two, a module with no entry in the graphs or with no current version, a graph Append would refuse, bands BandByGrade would, and a module with no state whose current version has no bands: a task of it would have none to be in.
It copies nothing it need not: tags and items already in their order are read as they are, and R at t₀ and the start of a module Read has read come from Read.
type RetiredSkill ¶
RetiredSkill is an entry of `retired_skills`: a skill of an earlier version of the module and the skills of this one that replaced it. An empty ReplacedBy is `[]`: no skill took over.
type ReviewDate ¶
ReviewDate is when a mastered skill is due for review: At, in whole seconds of Unix time, UTC, or Already, when it is due whatever the time.
type Skill ¶
type Skill struct {
ID string
Assessability Assessability
Teaches []string // the anchor skills it teaches, `core.<name>`, ordered byte by byte
// BandsTaught is the places of the bands where the skill is taught: the bands of the tasks
// where it is a primary skill of the task or of an item, ascending. NewGraph derives it.
BandsTaught []int32
Prerequisites []string // skills of the module by full ID and anchor skills; the engine reads them
Tier int32 // the skill's tier, `skill_tiers` of the server part; the engine reads it
}
Skill is a skill of a module's graph, by its full ID.
type SkillReadout ¶
type SkillReadout struct {
Skill string
EvidenceCount int64
LastPractice int64
Estimate float64 // θ + δ
Uncertainty float64 // v
Retention float64 // R at t₀
Traps []TrapCount
// For a mastered skill: its mastery band — the ID from the graph of the module's current
// version, empty without one —, the cautious probability with retention at t₀, R · q, and
// the review date. Zero while the skill is not mastered.
Mastered bool
MasteryBand BandRef
CautiousProbability float64
Review ReviewDate
}
SkillReadout is what reading gives of a skill with practice.
type SkillState ¶
type SkillState struct {
Skill string
Correction float64 // δ
AnswerWeight float64 // m
EvidenceCount int64
LastPractice int64 // whole seconds of Unix time, UTC
Stability float64 // τ, in days
Traps []TrapCount
// MasteryBand is the place of the mastery band, when Mastered.
MasteryBand int32
Mastered bool
FailuresInARow int32
}
SkillState is the state of one skill of the module whose assessability is verdict.
type Slot ¶
type Slot struct {
Check CheckKind
// Options is the number of options of a choice, and is meaningful only when HasOptions.
Options int32
HasOptions bool
}
Slot is an answer slot of an item, as the model needs it for the guessing of the item.
type State ¶
type State struct {
Kind int32
Modules []ModuleState // ordered by module ID byte by byte
}
State is the state of one learner: the fold of the evidence log.
func Recompute ¶
Recompute folds the evidence log, in the order of its numbers, from the empty state, against the graphs of the current versions of the modules: Append of each piece of evidence in turn. Its errors are Append's, with the index of the evidence in log, from 0. It checks the graph of each module once.
func ReplayBefore ¶ added in v0.1.23
ReplayBefore replays the evidence log up to a moment, for the history of the cognitive map: the fold, from the empty state, of the records of log whose time — PracticeTime, of an attempt its last action, of a correction or a goal set when the adult made it — is before the moment, in whole seconds of Unix time, UTC, or of every record with NoBound. It takes them in the order of the log, not of their times, which can go backward, against the graphs of the current versions of the modules, so that the evidence of a skill a graph retired goes to the skills that replaced it, as Recompute gives it. The log is the one api folds: the records it decodes, without the evidence of a package withdrawn for a wrong key.
Where Recompute fails on a record Append refuses, ReplayBefore leaves it out and goes on, as api leaves it out when it folds the log into its cache by Append: a graph Append refuses leaves out every record of its module. It refuses nothing and tells nothing of what it left out. So with NoBound, or a moment after every record, it gives the state api's cache holds, and Read of it at the moment gives the state of the skills then — the retention and the review dates among them. It writes nothing anywhere: the state is computed anew from the log at each call.
type Task ¶
type Task struct {
ID string // the full ID of the task; of a template, of the template
Template bool
Band BandRef
Difficulty int32 // from 1 to 5
Primary []string
Supporting []string // full IDs or anchor skills, `core.<name>`
// KeyProvenance and SkillTagsProvenance are where the key and the skill tags came from.
KeyProvenance Provenance
SkillTagsProvenance Provenance
Items []TaskItem // by place
}
Task describes a task, the same for evidence and for a candidate task of the engine.
type TaskItem ¶
type TaskItem struct {
Place int32
// OwnSkills tells whether the item names skills of its own, Primary and Supporting, which take
// the place of the task's for it.
OwnSkills bool
Primary []string
Supporting []string
Slots []Slot // in their order
}
TaskItem is an item of a task, by its place, from 1.
type TaskReadout ¶
type TaskReadout struct {
Items []ItemProbability
}
TaskReadout is what Readout.Task gives of a candidate task: the P of each item, by place.
type TeacherReadout ¶
type TeacherReadout struct {
Skill string
HighestBand BandRef
Practised bool
Estimate float64
Mastered bool
MasteryBand BandRef
Retention float64
Review ReviewDate
}
TeacherReadout is a skill that teaches an anchor skill, as reading gives it with the anchor: the highest band it is taught at — Place 0 when there is none —, and, when Practised, its estimate, mastery, retention at t₀ and review date, as its SkillReadout has them.
type TrapCount ¶
TrapCount is a trap the program found, with the number of pieces of evidence it was found in and the practice time of the latest.
type TrialAnswer ¶
type TrialAnswer struct {
BandPlace int32
Difficulty int32
Slots []Slot
Verdict Verdict
Weight float64 // u, the answer's weight in its series
}
TrialAnswer is one answer of the trial series, as its likelihood needs it.
type UnverdictedReason ¶
type UnverdictedReason int32
UnverdictedReason is why a submission gave no verdict.
const ( UnverdictedUnspecified UnverdictedReason = iota UnverdictedUnreadableBlank UnverdictedUnreadableOther UnverdictedUnchecked )
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package detmath is the arithmetic of the learner model that package math would give differently on different builds: exp, log, the logistic function σ, a power and the retention of a skill.
|
Package detmath is the arithmetic of the learner model that package math would give differently on different builds: exp, log, the logistic function σ, a power and the retention of a skill. |
|
internal
|
|
|
wire
Package wire writes and reads the binary form of protobuf, the part of it the schema of learner-model uses, on Go's standard library alone: varints, 64-bit fixed numbers in little-endian, and length-delimited strings, messages and packed lists.
|
Package wire writes and reads the binary form of protobuf, the part of it the schema of learner-model uses, on Go's standard library alone: varints, 64-bit fixed numbers in little-endian, and length-delimited strings, messages and packed lists. |