An ad-hoc network is a collection of mobile nodes, which communicate over radio. These networks have an important advantage; they do not require any existing infrastructure or central administration. Therefore, mobile ad-hoc networks are suitable for temporary communication links. This flexibility, however, comes at a price: communication is difficult to organize due to frequent topology changes. Routing in such networks can be viewed as a distributed optimization problem. A new class of algorithms, inspired by swarm intelligence, is currently being developed that can potentially solve numerous problems of modern communications networks. These algorithms rely on the interaction of a multitude of simultaneously interacting agents. A survey of few such algorithms for ad hoc networks is presented here.