The topological optimization problema is stated as follows: to find the best shape of a mechanical structure subject to certain service conditions. Usually, the topological optimization problem is tackled by starting from an initial structure which is modified by adding parts, generating gaps, modifying dimensions or the shape contour. This work presents a novel proposal on topological optimization which uses an Estimation of Distribution Algorithm (EDA) based on a Bayesian network. The EDA works as follows: propose a set of candidate solutions (population),the candidate solutions are generated according to a probability distribution, the population is evaluated on the objective function and contraints, and finally, the best structures are selected and used to recomputed the search distribution, and so on. The objective function is the structure weight, and the constraints are maximum Von Mises Stress,the node displacement and practical conditions such as connectivity of all the parts of the structure. The results show that the proposal is capable of designing low weight structures which fulfill the service conditions.