diff --git a/gp.jl b/gp.jl index 3fa00ff..c5764f6 100644 --- a/gp.jl +++ b/gp.jl @@ -18,3 +18,40 @@ Selection: Tournament =# +function math_expr(op, op1, op2) + expr = Expr(:call, op, , op1, op2) + return expr +end + +function GT(a,b) + if a > b + return 1 + else + return -1 + end +end + +function DIV(a,b) + if abs(b) < 10.0^-10 + return 1 + else + return a/b + end +end + +function create_single_full_tree(depth, function_set, terminal_set) + # If we are not at the bottom + if depth > 2: + fn = function_set[1] + trm1 = create_single +end + + +function main() + + function_set = [:+, :-, :DIV, :GT] + terminal_Set = ["x", "v", -1] + + +end +main()