title: Implement random search algorithm in java
body: <p>I'm tryin to implement a simple "random search algorithm" in Java</p>
  
  <p>here's a piece of the code:</p>
  
  <p>//execute the algorithm</p>
  
  <pre><code>    double bestSolution; //INITIAL SOLUTION!
      Vector bestVector=null;
  
      for (int iter=0; iter&lt;maxIterations; iter++) {
          //generate random vector-solution
          Vector v = Vector.generateRandomVector(problemSize, minOfSearchSpace, maxOfSearchSpace);
          double currentObjValue = objectiveFunctionValue(v);
          // if a better solution is found
          if (currentObjValue &lt; bestSolution); { 
              bestVector = v;
              bestSolution = currentObjValue;
          }
          System.out.println("Iteration: "+(iter+1)+" Best solution: "+bestSolution);
      } // end for
  
      System.out.println("\n\nBest solution: "+bestVector.toString()+" Objective Value: "+bestSolution);
  </code></pre>
  
  <p>my problem is: somehow i have to initialize the initial solution "double bestSolution".
  what initial value should i give? note that for certain objective function, values such as "0" while make the convergence harder.</p>