Artificial Intelligence Techniques For High-Precision Invasive And Non-Invasive Neural Stimulation