Markovian agent modeling swarm intelligence algorithms in wireless sensor networks