Abstract This paper presents an implemented approach to part-mating of three-dimensional non-cylindrical parts with a 6 DOF manipulator, considering uncertainties in modeling, sensing and control. The core of the proposed solution is a reinforcement learning algorithm for selecting the actions that achieve the goal in the minimum number of steps. Position and force sensor values are encoded in the state of the system by means of a neural network. Experimental results are presented for the insertion of different parts – circular, quadrangular and triangular prisms – in three dimensions. The system exhibits good generalization.