Learning by Abstraction: The Neural State Machine