In the field of robotics, forward kinematics is an activity that allows finding a mathematical model for the resulting position in the final effector based on the robot joints position, a popular alternative for determining this model is defined by the Denavit Hartenberg convention, nevertheless, this method requires knowledge about linear algebra and three-dimensional spatial kinematics. Machine learning uses specific computational methodologies to solving similar problems in several areas, so it could be a viable answer for automatic determining of forwarding kinematics. In this work we propose the use of genetic programming as a machine learning algorithm for finding the forward kinematics of a 2 degrees of freedom robot, getting a satisfactory outcome obtaining a satisfactory result with blocks that describe the expected solution, validating the capacity of the genetic programming in order to validate this algorithm for later work with more complex robots.