Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nealder-Mead fails for Goldman-Price #8

Open
tornord opened this issue Oct 23, 2019 · 0 comments
Open

Nealder-Mead fails for Goldman-Price #8

tornord opened this issue Oct 23, 2019 · 0 comments

Comments

@tornord
Copy link

tornord commented Oct 23, 2019

Any idea why nealder-mead fails for the Goldman-Price function?

Goldman-Price is well behavied and it's usually used as test function.
https://en.wikipedia.org/wiki/Test_functions_for_optimization

var fmin = require("fmin");

// https://en.wikipedia.org/wiki/File:Goldstein_Price_function.pdf
function goldsteinPrice(x, y) {
    return (
        (1 + Math.pow(x + y + 1, 2) * (19 - 14 * x + 3 * x * x - 14 * y + 6 * x * x + 3 * y * y)) * (30 + Math.pow(2 * x - 3 * y, 2) * (18 - 32 * x + 12 * x * x + 48 * y - 36 * x * y + 27 * y * y))
    );
}

// var res = fmin.nelderMead((x) => goldsteinPrice(x[0], x[1]), [0.2, -0.18]); // Works
var res = fmin.nelderMead((x) => goldsteinPrice(x[0], x[1]), [0.2, -0.17]); // Fails
console.log(JSON.stringify(res)); // Should be x=0, y=-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant