As a result of design, manufacturing and assembly processes or a wear effect, clearances are inevitable at the joints of mechanisms. In this study, dynamic response of mechanism having revolute joints with clearance is investigated. A four-bar mechanism having two joints with clearance is considered as a model mechanism. A neural network was used to model several characteristics of joint clearance. Kinematic and dynamic analyses were achieved using continuous contact mode between journal and bearing. A genetic algorithm was also used to determine the appropriate values of design variables for reducing the additional vibration effect due primarily to the joint clearance. The results show that the optimal adjusting of suitable design variables gives a certain decrease in shaking forces and their moments on the mechanism frame.