An architecture for task execution in adverse environments