protected StateDist expandChildren(SearchState oldState, int oldDist) {
    int[] pieceIndices = oldState.numDroppedPieces >= forcedPieces.length ? ALL_PIECES : new int[]{forcedPieces[oldState.numDroppedPieces]};
    StateDist bestStateDist = null;
    for (int pieceIndex : pieceIndices) {
      LockPiece<Integer> lockPiece = new LockPiece<>(oldState.board.board, pieceIndex, logStrategy, initialDropDelay);
      HashMap<Board, Integer> locks = lockPiece.lockPiece();
      for (Entry<Board, Integer> e : locks.entrySet()) {
        Board board = e.getKey();
        int clearedLines = board.clearLines();
        int newRowsToGo = oldState.rowsToGo - clearedLines;
        if (newRowsToGo != oldState.rowsToGo && (newRowsToGo+3) / 4 == (oldState.rowsToGo+3) / 4)
          continue;
        int newDist = appendDist(oldDist, e.getValue(), clearedLines > 0);
        StateDist sd = exploreChild(new SearchState(board, oldState.numDroppedPieces + 1, newRowsToGo, oldState, pieceIndex), newDist, newDist - oldDist);
        if (sd != null) {
          if (sd.state != null)
            return sd;
          if (bestStateDist == null || bestStateDist.dist > sd.dist)
            bestStateDist = sd;
        }
      }
    }
    return bestStateDist;
  }