Documentation
¶
Overview ¶
Package template fills the templates of tasks: it counts the instances of a template, builds each one with its numbers and the results of its solver, and picks the instance of an attempt from the attempt's seed (format/README.md, sections 22–24; R60 spec, R61 spec). api calls it for the instance of an attempt, and the check of a module for every instance.
AttemptInstance picks the instance of an attempt by its number, from the place of randomness of the attempt's seed that the format gives a template, through internal/random (R10). The instances themselves and the results of a solver come with the tasks of templates and of solvers (R16).
Index ¶
Constants ¶
const MaxInstances = 10000
MaxInstances is the most instances a template has: the sizes of its domains multiply to at most 10 000 (format/README.md, section 23).
Variables ¶
var ErrDomain = random.ErrDomain
ErrDomain is what AttemptInstance gives on an argument outside its domain: a count outside 1 to MaxInstances, or an ID that is no name of a place of randomness. It is the generator's own, so that errors.Is finds it whichever of the two gives it.
Functions ¶
func AttemptInstance ¶
AttemptInstance gives the number of the instance that an attempt on a template gets, from 0: below(count) of the place of randomness of the attempt's seed whose names are template, the ID of the task and instance, where count is how many instances the template has, from 1 to MaxInstances (format/README.md, sections 22 and 23; R60 spec). Nothing else draws from that place, so the same package and the same seed give the same instance (R03 spec). The instances are numbered in the order of the odometer, as the package carries their numbers.
api draws the seed from a cryptographic source when the attempt begins and passes it here as a number; neither the seed nor the words of the place reach the learner's device, since the words show the seed (format/README.md, section 22). A count outside its domain gives ErrDomain, and so does an ID that is no name of a place: empty, or holding | or what is not UTF-8. The ID of a valid task is neither (common.schema.json).
Types ¶
This section is empty.