protected Operation [] getOptimalOperations(BayesNet bayesNet, Instances instances, int nrOfLookAheadSteps, int nrOfGoodOperations) throws Exception {
       if (nrOfLookAheadSteps == 1) { // Abbruch der Rekursion
          Operation [] bestOperation = new Operation [1];
          bestOperation [0] = getOptimalOperation(bayesNet, instances);
          return(bestOperation);  // Abbruch der Rekursion
       } else {
          double bestDeltaScore = 0;
          double currentDeltaScore = 0;
          Operation [] bestOperation = new Operation [nrOfLookAheadSteps];
          Operation [] goodOperations = new Operation [nrOfGoodOperations];
          Operation [] tempOperation = new Operation [nrOfLookAheadSteps-1];
          goodOperations = getGoodOperations(bayesNet, instances, nrOfGoodOperations);
          for (int i = 0; i < nrOfGoodOperations; i++) {
           if (goodOperations[i] != null) {
             performOperation(bayesNet, instances, goodOperations [i]);
             tempOperation = getOptimalOperations(bayesNet, instances, nrOfLookAheadSteps-1, nrOfGoodOperations); // rekursiver Abstieg
             currentDeltaScore = goodOperations [i].m_fDeltaScore;
             for (int j = 0; j < nrOfLookAheadSteps-1; j++) {
                if (tempOperation [j] != null) {
                   currentDeltaScore += tempOperation [j].m_fDeltaScore;
                }
             }
             performOperation(bayesNet, instances, getAntiOperation(goodOperations [i]));
                      if (currentDeltaScore > bestDeltaScore) {
                        bestDeltaScore = currentDeltaScore;
                        bestOperation [0] = goodOperations [i];
                        for (int j = 1; j < nrOfLookAheadSteps; j++) {
                          bestOperation [j] = tempOperation [j-1];
                        }
                    }
            } else i=nrOfGoodOperations;
           }
           return(bestOperation);
       }
    } // getOptimalOperations