Reinforcement learning for trench excavation