powered by
hillclimbing(f, x, h = 1, m = 1000)
f
x
bisection
goldsect
gradient
newton
sa
secant
f <- function(x) { (x[1]^2 + x[2] - 11)^2 + (x[1] + x[2]^2 - 7)^2 } hillclimbing(f, c(0,0)) hillclimbing(f, c(-1,-1)) hillclimbing(f, c(10,10))
Run the code above in your browser using DataLab