The promising potential of distributed and interconnected lightweight devices that can jointly generate superior information-collecting and problem-solving abilities has long fostered various significant and ubiquitous techniques, from wireless sensor networks (WSNs) to Internet of Things (IoT). Although related applications have been widely used in different domains in attempting to collect and harness the ever-growing information flows, one major issue that impedes the further advancement of WSNs or IoT-based applications is the restricted battery power. Previous research mainly focuses on investigating novel protocols to save energy by reducing data traffic with the aid of optimal or heuristic algorithms. However, data packet behaviours and significant parameters involved are mostly preconfigured in a supervised-learning fashion rather than using an unsupervised learning paradigm and therefore may not adapt to uncertain or fast-changing environments. Hence, this paper concentrates on optimising the behaviours of data packets and significant parameters in a widely tested routing protocol, namely, Cognitive Packet Network (CPN), with the aid of several bio-inspired algorithms to increase the efficiency of energy usage and information acquisition. Two novel packet behaviours are introduced, and an on-line parameter calibration scheme is proposed to realise packet time-to-live (TTL) adjustment and rate adaptation. The simulation results show that the introduction of the bioinspired algorithms can improve the efficiency of information sharing and reduce the energy consumption.