Rapid Open-World Adaptation by Adaptation Principles Learning