implementation of algorithm

Changing set-fitness to be a function from R^n -> R^1. I also changed the initial problem to be in R^1 rather than R^3 but the algorithm should work for arbitrary dimensions.