Text this: Deep Reinforcement Learning-Based Motion Control Optimization for Defect Detection System