A feedforward neural network using back-propagation algorithm for optimization (implementation in Ruby)