The complete code for the demo program is too long to present in this article, so I focus on the back-propagation algorithm. The complete source code accompanies this article as a download.