Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Idk wtf I am doing
  • Loading branch information
Stephen committed Mar 8, 2018
1 parent 5776aed commit eb73253
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions gp.jl
Expand Up @@ -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()

0 comments on commit eb73253

Please sign in to comment.