Skip to content

Nealder-Mead fails for Goldman-Price #8

Description

@tornord

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions