private void dfsLastFast(final int depth, final int prevRobo, final int prevDirBit0, final int[] oldState) throws InterruptedException {
        if (Thread.interrupted()) { throw new InterruptedException(); }
        final int[] obstacles = this.obstacles[depth];
        final int oldRoboPos = oldState[this.goalRobot];
        for (final int pos : oldState) { obstacles[pos] |= OBSTACLE_ROBOT; }  //set robot positions
        int dir = 0;
        final int obstacleInit = obstacles[oldRoboPos];
        //move goal robot only
        for (final int dirIncr : this.directionIncrement) {
            if ((prevRobo != this.goalRobot) || (prevDirBit0 != (dir & 1))) {
                int newRoboPos = oldRoboPos;
                int obstacle = obstacleInit;
                final int wallMask = (1 << dir);
                while (0 == (obstacle & wallMask)) {        //move the robot until it reaches a wall or another robot.
                    newRoboPos += dirIncr;                  //NOTE: we rely on the fact that all boards are surrounded
                    obstacle = obstacles[newRoboPos];       //by outer walls. without the outer walls we would need
                    if (0 != (obstacle & OBSTACLE_ROBOT)) { //some additional boundary checking here.
                        newRoboPos -= dirIncr;
                        break;
                    }
                }
                //the robot has arrived at the goal
                if (this.goalPosition == newRoboPos) {
                    System.arraycopy(oldState, 0, this.states[depth], 0, oldState.length);
                    this.states[depth][this.goalRobot] = newRoboPos;
                    this.buildSolution(depth);
                }
            }
            ++dir;
        }
        for (final int pos : oldState) { obstacles[pos] ^= OBSTACLE_ROBOT; }  //unset robot positions
    }