Pulse Shape Simulation and Discrimination using Machine-Learning Techniques