Direct competitions involve competitors that mutually contend for the same resource or objective. A controlled, well-documented, and data-rich field involving direct competition is represented by sports. Usually the winner of sports competitions is believed to be the one with the greatest talent, however, there are other factors that contribute to the outcome of a competition, there are in fact random, unpredictable events that can change the outcome of a competition. For this reason, if one wants to understand the properties of a competition is necessary to have a method to evaluate the importance of the talent or aptitude of a competitor, as opposed to the importance of chance, in determining the outcome of the competition itself. In this work we study the sport of tennis using the data obtained from the Association of Tennis Professionals (ATP) tournaments. We construct an agent-based model that is able to produce data analogous to the real one; this model depends on three parameters, the talent, the action of chance, and the weight of talent. In particular, we don't fix the values of these parameters and we fit the model results using a genetic algorithm, in this way, we study all the possible combinations of parameters, in the parameter space, that are able to reproduce the real systems data. We show that the model fits well the real data only for limited regions of the parameter space. On these limited regions of the parameter space are possible further optimization of the model results, limiting the values of parameters. In this way, our agent-based model, by means of this genetic algorithm calibration, is able to provide us with useful information without any a priori constraints.