Draft
Add Balance Loop solver support (balance) across puzzle core and backend#230
balance) across puzzle core and backend#230Conversation
Agent-Logs-Url: https://github.com/semiexp/cspuz_core/sessions/1a7fab93-87a1-44e8-a3b8-75048886db75 Co-authored-by: semiexp <7336994+semiexp@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
semiexp
April 23, 2026 12:44
View session
Owner
このあたり、len_left と left_len を別途持つ必要はありません。has_left == false のとき、left_len は自動的に 0 になるからです。right, down, up についても同様です |
Agent-Logs-Url: https://github.com/semiexp/cspuz_core/sessions/acef6d84-52ca-4cb5-80f0-16e1855e2c13 Co-authored-by: semiexp <7336994+semiexp@users.noreply.github.com>
Contributor
Author
|
...
|
Owner
|
@copilot 6 個の条件分岐書くくらいなら前みたいにループに戻してください |
Agent-Logs-Url: https://github.com/semiexp/cspuz_core/sessions/dd5c739c-3199-4498-a648-799c6db7f2dc Co-authored-by: semiexp <7336994+semiexp@users.noreply.github.com>
Contributor
Author
ループ形式に戻しました。 |
Contributor
|
I'm unsure how copilot assisted PR works, but the example puzzle used for testing only has one kind of clue. It might be best to switch to another? |
ReverM
reviewed
Apr 28, 2026
|
|
||
| type Problem = Vec<Vec<Option<(i32, bool)>>>; | ||
|
|
||
| fn clue_combinator() -> impl Combinator<(i32, bool)> { |
Contributor
There was a problem hiding this comment.
Huh, this is in common with light and shadow, interesting
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.
Balance Loop was not implemented, so the system could not parse or solve
balancepuzzle URLs. This change adds full solver support for Balance Loop rules (single loop through all circles, clue = sum of two straight-arm lengths, white = equal arms, black = unequal arms).Puzzle engine: new
balance_loopmodulecspuz_rs_puzzles/src/puzzles/balance_loop.rs.solve_balance_loop(clues)overBoolGridEdgeswith:balance.Puzzle registry wiring
cspuz_rs_puzzles/src/puzzles/mod.rs.Backend integration
cspuz_solver_backend/src/puzzle/balance_loop.rs.solve(url)adapter:balanceURL,balancealias, “Balance Loop” label).Example of the new puzzle-side API surface: