public static void trainUncachedNeuralNetworks(int cycles, int numTraining) {
    { double mse = 0.0;
      int numEx = Logic.$TRAINING_EXAMPLES$.length();
      OutputStream lookPtr = null;
      Vector examples = Vector.newVector(numTraining);

      if (numTraining > numEx) {
        Stella.STANDARD_ERROR.nativeStream.print("Error: There are only " + numEx + " training examples");
        return;
      }
      Logic.shuffleList(Logic.$TRAINING_EXAMPLES$);
      { int i = Stella.NULL_INTEGER;
        int iter000 = 0;
        int upperBound000 = numTraining - 1;

        for (;iter000 <= upperBound000; iter000 = iter000 + 1) {
          i = iter000;
          (examples.theArray)[i] = (((TrainingExample)(Logic.$TRAINING_EXAMPLES$.nth(i))));
        }
      }
      { int cycle = Stella.NULL_INTEGER;
        int iter001 = 0;
        int upperBound001 = cycles - 1;

        for (;iter001 <= upperBound001; iter001 = iter001 + 1) {
          cycle = iter001;
          mse = 0.0;
          if ((Logic.$NEURAL_NETWORK_TRAINING_METHOD$ == Logic.KWD_BACKPROP) ||
              (Logic.$NEURAL_NETWORK_TRAINING_METHOD$ == Logic.KWD_BACKPROPAGATION)) {
            Logic.shuffleVector(examples);
          }
          else if (Logic.$NEURAL_NETWORK_TRAINING_METHOD$ == Logic.KWD_QUICKPROP) {
            Logic.clearAllSlopes();
          }
          else {
            { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

              stream000.nativeStream.print("`" + Logic.$NEURAL_NETWORK_TRAINING_METHOD$ + "' is not a valid case option");
              throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
            }
          }
          { TrainingExample example = null;
            Vector vector000 = examples;
            int index000 = 0;
            int length000 = vector000.length();
            int k = Stella.NULL_INTEGER;
            int iter002 = 0;

            for (;index000 < length000; index000 = index000 + 1, iter002 = iter002 + 1) {
              example = ((TrainingExample)((vector000.theArray)[index000]));
              k = iter002;
              if (Logic.$TRACE_NEURAL_NETWORK_TRAINING$) {
                System.out.println("Example " + k + ": " + example.query + "  " + example.score);
              }
              if (!(example.module == null)) {
                example.module.changeModule();
              }
              { Cons form = ((Cons)(Stella_Object.copyConsTree(example.query)));
                double target = example.score;
                QueryIterator query = Logic.makeQuery(Stella.NIL, Logic.coerceToTree(form), Stella.NIL, Stella.NIL);
                Proposition prop = query.baseControlFrame.proposition;
                double output = QueryIterator.returnPartialTruth(query, true);
                double error = Logic.computeError(target, output);

                if (Logic.$TRACE_NEURAL_NETWORK_TRAINING$) {
                  System.out.println("   Output: " + output);
                }
                mse = mse + (error * error);
                Logic.$PARTIAL_SUPPORT_CACHE$ = List.newList();
                if ((Logic.$NEURAL_NETWORK_TRAINING_METHOD$ == Logic.KWD_BACKPROPAGATION) ||
                    (Logic.$NEURAL_NETWORK_TRAINING_METHOD$ == Logic.KWD_BACKPROP)) {
                  Proposition.backpropagateError(prop, error);
                }
                else if (Logic.$NEURAL_NETWORK_TRAINING_METHOD$ == Logic.KWD_QUICKPROP) {
                  Proposition.quickpropagateError(prop, error);
                }
                else {
                  { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

                    stream001.nativeStream.print("`" + Logic.$NEURAL_NETWORK_TRAINING_METHOD$ + "' is not a valid case option");
                    throw ((StellaException)(StellaException.newStellaException(stream001.theStringReader()).fillInStackTrace()));
                  }
                }
              }
            }
          }
          if (Logic.$NEURAL_NETWORK_TRAINING_METHOD$ == Logic.KWD_QUICKPROP) {
            Logic.modifyWeights();
          }
          if ((Logic.$SAVE_NETWORK_CYCLE$ > 0) &&
              ((cycle % Logic.$SAVE_NETWORK_CYCLE$) == 0)) {
            Logic.saveAllNeuralNetworks(Logic.$SAVE_NETWORK_FILE$);
          }
          if ((Logic.$ERROR_PRINT_CYCLE$ > 0) &&
              ((cycle % Logic.$ERROR_PRINT_CYCLE$) == 0)) {
            if (Logic.$SAVE_NETWORK_FILE$ != null) {
              if (lookPtr == null) {
                lookPtr = OutputFileStream.newOutputFileStream(Logic.$SAVE_NETWORK_FILE$ + ".err");
              }
              lookPtr.nativeStream.println("Cycle " + cycle + " Error: " + (mse / numTraining));
            }
            System.out.println("Cycle " + cycle + " Error: " + (mse / numTraining));
          }
        }
      }
      if (lookPtr != null) {
        lookPtr.free();
      }
    }
  }