Repository navigation
Use min-conflicts and tabu search (bb4-optimization) in Red puzzle and Tantrix; benchmark rows - #68
Merged
Merged
Conversation
Red reports its loose pieces as conflicted positions and understands single swaps, so min-conflicts and tabu search work on it. A Tantrix path cannot be changed by a swap, so only tabu search (through random neighbors) is offered there. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175jMLxrP7wZ3vfj6UfeDZx
… board Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175jMLxrP7wZ3vfj6UfeDZx
Run on this machine (2 CPUs, Linux) with a 15 s limit and 3 repetitions, Tantrix sizes 3 to 12, so it is a separate column from the 2.0.0 and 2.1-SNAPSHOT runs made on a Mac. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175jMLxrP7wZ3vfj6UfeDZx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Red puzzle: pieces report which of them have a loose edge (conflictedPositions) and understand a single swap, so MIN_CONFLICTS and TABU_SEARCH work. Both solved 12/12 runs in a 15 s limit (median 20 ms and 60 ms on this machine); genetic search solved 9/12, iterated local search 4/12, annealing 2/12.
Tantrix: a path cannot be changed by one swap, so only TABU_SEARCH is added (random neighbors, restarting every 50 stagnant steps so the walk does not drift off the board; without that it crashed on 12 tiles). It is slow there (solves 12 tiles, about 9 s).
Needed because bb4-optimization now has these strategies: the existing check that every applicable strategy is an algorithm requires the entries.
Benchmarks: docs/benchmarks.* has a new column 2.1-SNAPSHOT+strategies, made on a 2-CPU Linux machine with a 15 s limit and 3 repetitions (Tantrix 3 to 12 tiles), so it is not comparable with the Mac columns; re-run ./gradlew benchmark on the Mac to replace it. Existing tests pass apart from two Tantrix permuter suites (PathPivotPermuterSuite, SubPathMutatorBase) that I did not touch.
Generated by Claude Code