Distributed algorithms for interacting autonomous agents door