Skip to content

Commit

Permalink
Allow successor lookahead although for the time being it is not yet o…
Browse files Browse the repository at this point in the history
…ptimal
  • Loading branch information
jedlimlx committed May 14, 2024
1 parent 40efc2d commit 1c97b38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commonMain/kotlin/search/cfind/CFind.kt
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class CFind(
// }

val successorLookahead = this.lookaheadDepth.map {
false && it > 0 && (successorLookaheadDepth == it + 1 || tempIndices[0][1].last() == 0)
it > 0 && (successorLookaheadDepth == it + 1 || tempIndices[0][1].last() == 0)
}

val lookaheadIndices = if (this.lookaheadDepth.max() == 0) listOf() else tempIndices.subList(
Expand Down
4 changes: 2 additions & 2 deletions src/jvmMain/kotlin/Main.jvm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ actual fun main() {
// B2-ei3cjkr4cektyz5-cnr6-ik78/S01e2-ae3cnqry4cqrtwyz5-ain6ekn7e
// HROT("R2,C2,S6-11,B4,9-11,NW0020003330230320333000200")
val search = CFind(
HROT("R3,C2,S2,B3,N+"), 2, 1, 10, ShipSymmetry.ODD,
verbosity = 1, searchStrategy = SearchStrategy.PRIORITY_QUEUE, //lookaheadDepth = 2,
HROT("R3,C2,S2,B3,N+"), 4, 3, 8, ShipSymmetry.ODD,
verbosity = 1, searchStrategy = SearchStrategy.PRIORITY_QUEUE, lookaheadDepth = 0,
direction = Coordinate(1, 1), numThreads = 8
)
search.search()
Expand Down

0 comments on commit 1c97b38

Please sign in to comment.