A computer-implemented method for comparing wells, the method comprising: obtaining first well information, the first well information defining subsurface configuration of a first well, the first well information including a first set of values that define the subsurface configuration of the first well at a first set of positions within the first well; obtaining second well information, the second well information defining subsurface configuration of a second well, the second well information including a second set of values that define the subsurface configuration of the second well at a second set of positions within the second well, wherein at least one of the first well and the second well is a natural well, and the corresponding well information of the natural well includes one or more well logs of said natural well; obtaining first well marker information, the first well marker information defining a first set of marker positions within the first well; obtaining second well marker information, the second well marker information defining a second set of marker positions within the second well; generating a dissimilarity matrix for the first well and the second well, a dimension of the dissimilarity matrix defined by a first number of positions within the first set of positions and a second number of positions within the second set of positions, wherein element values of the dissimilarity matrix are determined based on comparison of the subsurface configuration of the first well at corresponding positions within the first well and the subsurface configuration of the second well at corresponding positions within second first well; generating a gated dissimilarity matrix from the dissimilarity matrix to control how correlation between different wells are determined, the gated dissimilarity matrix determined based on the first set of marker positions within the first well and the second set of marker positions within the second well, wherein the element values of the dissimilarity matrix corresponding to the first set of marker positions and not corresponding to the second set of marker positions within the second well are changed relative to other element values in the gated dissimilarity matrix; and determining correlation between one or more marker positions within the first well and one or more marker positions within the second well based on the gated dissimilarity matrix, wherein determining the correlation between a given marker position within the first well and a given marker position within the second well includes identifying connection between corresponding segments of the first well and the second well. obtaining first well information, the first well information defining subsurface configuration of a first well, the first well information including a first set of values that define the subsurface configuration of the first well at a first set of positions within the first well; obtaining second well information, the second well information defining subsurface configuration of a second well, the second well information including a second set of values that define the subsurface configuration of the second well at a second set of positions within the second well, wherein at least one of the first well and the second well is a natural well, and the corresponding well information of the natural well includes one or more well logs of said natural well; obtaining first well marker information, the first well marker information defining a first set of marker positions within the first well; obtaining second well marker information, the second well marker information defining a second set of marker positions within the second well; generating a dissimilarity matrix for the first well and the second well, a dimension of the dissimilarity matrix defined by a first number of positions within the first set of positions and a second number of positions within the second set of positions, wherein element values of the dissimilarity matrix are determined based on comparison of the subsurface configuration of the first well at corresponding positions within the first well and the subsurface configuration of the second well at corresponding positions within second first well; generating a gated dissimilarity matrix from the dissimilarity matrix to control how correlation between different wells are determined, the gated dissimilarity matrix determined based on the first set of marker positions within the first well and the second set of marker positions within the second well, wherein the element values of the dissimilarity matrix corresponding to the first set of marker positions and not corresponding to the second set of marker positions within the second well are changed relative to other element values in the gated dissimilarity matrix; and determining correlation between one or more marker positions within the first well and one or more marker positions within the second well based on the gated dissimilarity matrix, wherein determining the correlation between a given marker position within the first well and a given marker position within the second well includes identifying connection between corresponding segments of the first well and the second well.