Distributed algorithms for interacting autonomous agents by