Interactions between individuals and the structure of their environment play a crucial role in shaping self-organized collective behaviors. Recent studies have shown that ants crossing asymmetrical bifurcations in a network of galleries tend to follow the branch that deviates the least from their incoming direction. At the collective level, the combination of this tendency and the pheromone-based recruitment results in a greater likelihood of selecting the shortest path between the colony's nest and a food source in a network containing asymmetrical bifurcations. It was not clear however what the origin of this behavioral bias is. Here we propose that it results from a simple interaction between the behavior of the ants and the geometry of the network, and that it does not require the ability to measure the angle of the bifurcation. We tested this hypothesis using groups of ant-like robots whose perceptual and cognitive abilities can be fully specified. We programmed them only to lay down and follow light trails, avoid obstacles and move according to a correlated random walk, but not to use more sophisticated orientation methods. We recorded the behavior of the robots in networks of galleries presenting either only symmetrical bifurcations or a combination of symmetrical and asymmetrical bifurcations. Individual robots displayed the same pattern of branch choice as individual ants when crossing a bifurcation, suggesting that ants do not actually measure the geometry of the bifurcations when travelling along a pheromone trail. Finally at the collective level, the group of robots was more likely to select one of the possible shorter paths between two designated areas when moving in an asymmetrical network, as observed in ants. This study reveals the importance of the shape of trail networks for foraging in ants and emphasizes the underestimated role of the geometrical properties of transportation networks in general.