Nowadays Network-on-Chips is used instead of System-on-Chips for better performance. This paper presents a new algorithm to find a shorter path, and shows that genetic algorithm is a potential technique for solving routing problem for mesh topology in on-chip-network.