struct

Moses::Candidate

Inherits Struct < Value < Object

Program candidate representation Now uses structured Program representation while maintaining compatibility

Constructors

new(program : String, generation : Int32 = 0, evaluations : Int32 = 0)
Source
new(parsed_program : Program, generation : Int32 = 0, evaluations : Int32 = 0)
Source

Instance methods

complexity

Get program complexity

Source
evaluations
Source
evaluations=(evaluations : Int32)
Source
execute(inputs : Array(Float64), problem_type : ProblemType) : Float64 | Bool

Execute the program with given inputs

Source
generation
Source
generation=(generation : Int32)
Source
get_program

Get structured program representation

Source
parsed_program
Source
parsed_program=(parsed_program : Program | Nil)
Source
program
Source
program=(program : String)
Source
score
Source
score=(score : CompositeScore | Nil)
Source
scored?
Source
to_s(io)
Source