Nice idea and nicely executed. I just found it hard to understand the puzzle. I guess I would first need to understand the pathfinding, maybe then I would get much more into optimising :)