Algorithms For Cooperative And Competitive Autonomous Systems