Struct programinduction::Task [−][src]
pub struct Task<'a, R: Send + Sync + Sized, X: Clone + Send + Sync, O: Sync> { pub oracle: Box<Fn(&R, &X) -> f64 + Send + Sync + 'a>, pub tp: TypeSchema, pub observation: O, }
A task which is solved by an expression under some representation.
A task can be made from an evaluator and examples with lambda::task_by_evaluation
or
pcfg::task_by_evaluation
.
Fields
oracle: Box<Fn(&R, &X) -> f64 + Send + Sync + 'a>
Assess an expression. For EC
this should return a log-likelihood. For GP
this
should return the fitness, where smaller values correspond to better expressions.
tp: TypeSchema
An expression that is considered valid for the oracle
is one of this type.
observation: O
Some program induction methods can take advantage of observations. This may often
practically be the unit
type ()
.