Changed ping mechanism to be based on agent state
Reduce number of pings to 2 per unreachable period
Auto-assign task target when producing task