def run_iteration
      param_key = @current_params.to_s
      result = nil
      # lookup the result if possible
      if @scores.key? param_key
        result = @scores[param_key]
      else
        # create temp dir
        curdir = Dir.pwd
        Dir.chdir(self.create_tempdir) unless Settings.instance.no_tempdirs
        # run the target
        raw_output = @target.run @current_params.merge(@options)
        # evaluate with objectives
        result = @objective.run_for_output(raw_output, @threads, nil)
        @iteration_count += 1
        self.print_progress(@iteration_count, @current_params, result, @best)
        @scores[@current_params.to_s] = result
        self.cleanup
        Dir.chdir(curdir) unless Settings.instance.no_tempdirs
      end
      # get next steps from optimiser
      @current_params = @algorithm.run_one_iteration(@current_params, result)
    end
def run_iteration
      param_key = @current_params.to_s
      result = nil
      # lookup the result if possible
      if @scores.key? param_key
        result = @scores[param_key]
      else
        # create temp dir
        curdir = Dir.pwd
        Dir.chdir(self.create_tempdir) unless Settings.instance.no_tempdirs
        # run the target
        raw_output = @target.run @current_params.merge(@options)
        # evaluate with objectives
        result = @objective.run_for_output(raw_output, @threads, nil)
        @iteration_count += 1
        self.print_progress(@iteration_count, @current_params, result, @best)
        @scores[@current_params.to_s] = result
        self.cleanup
        Dir.chdir(curdir) unless Settings.instance.no_tempdirs
      end
      # get next steps from optimiser
      @current_params = @algorithm.run_one_iteration(@current_params, result)
    end
Runs a single iteration of the optimisation,
 encompassing the program, objective(s) and optimiser.
 Returns the output of the optimiser.