public static void main(String[] args)
{
MLDataSet trainingSet = new BasicMLDataSet(XOR_INPUT, XOR_IDEAL);
BasicNetwork network = EncogUtility.simpleFeedForward(2, 4, 0, 1, false);
ResilientPropagation train = new ResilientPropagation(network, trainingSet);
train.addStrategy(new RequiredImprovementStrategy(5));
System.out.println("Perform initial train.");
EncogUtility.trainToError(train,0.01);
TrainingContinuation cont = train.pause();
System.out.println(Arrays.toString((double[])cont.getContents().get(ResilientPropagation.LAST_GRADIENTS)));