Algorithms For Intelligent Robotic Surgical Systems