class

Moses::Candidate

Inherits Reference < Object

Program candidate representation Now uses structured Program representation while maintaining compatibility

Constructors

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

Instance methods

complexity

Get program complexity

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

Execute the program with given inputs

generation
generation=(generation : Int32)
get_program

Get structured program representation

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