Combination of AI and contact position control system for complete contact avoidance