pub fn make_tasks<R: Rng>(
    rng: &mut R,
    count: u32
) -> Vec<impl Task<[bool], Representation = Language, Expression = Expression>>
Expand description

Randomly sample a number of circuits into Tasks.

For a circuit, the number of inputs is sampled from 1 to 6 with weights 1, 2, 3, 4, 4, and 4 respectively. The number of gates is sampled from 1 to 3 with weights 1, 2, and 2 respectively. The gates themselves are sampled from NOT, AND, OR, and MUX2 with weights 1, 2, 2, and 4, respectively. All circuits are connected: every input is used and every gate’s output is either wired to another gate or to the circuits final output.

The task observations are outputs of the truth table in sequence, for example

   --- INPUTS ---      OUTPUTS
false, false, false => false
false, false, true  => false
false, true,  false => false
false, true,  true  => false
true,  false, false => false
true,  false, true  => false
true,  true,  false => false
true,  true,  true  => true