Hello Martin, i designed a humanoid robot using GA during my PhD.
First of all, you need to know that GA are search algorithms designed to solve optimization problems. Before you get into the details of the GA itself you may want to define the optimization problem. An optimization problem has the next elements: cost function(s), decision variables, restriction function(s), search space.
A basic optimization problem in mechanical engineering could be:
Minimize the weight of a a cylindrical pressure vessel with respect to the thickness, the inner radius, and the length. The restriction functions can be defined based on the design specification such as deformation or strain criterion. The search space is the set of all admisible solutions and is usually defined by upper and lower limits for each decision variable.
Usually an optimization problem is defined in mathematical terms but in the case of GA (and many other heuristics) it is only necessary to have access to numeric values of the cost and restriction functions.
In my case i programmed the genetic algorithm in Matlab and got the mechanical parameters of the robot by connecting the GA to the mechanical model in SolidWorks, then i used this information to run numeric simulations of the robot inside Matlab.
In my application i used a GA to maximize energy efficiency with respect to some mechanical parameters, walking trajectories and controller gains.
If you are interested in the details of my project you can read a paper i wrote:
https://www.sciencedirect.com/science/article/pii/S0925231216313959
I can also share the paper in PDF format, via email, if anyone is interested.
Finally you may want to share some details about your particular application to give you some specific advice.
Rafael