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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Quantum Chinese Chess] Add SplitJump and MergeJump #166
[Quantum Chinese Chess] Add SplitJump and MergeJump #166
Changes from all commits
ffaa6a7
16059e8
3fd0e68
026d1df
8ef9e59
b5a5a3d
548583a
dec934e
15c7cf1
5797139
bf43fef
366edee
5883cac
7f7af9f
b8140d5
8731145
9c92e1d
9aee85b
b64945e
9b9d8fb
4088219
505a288
f8842be
6ee0c94
fdee585
82b249e
a4ed194
6e30000
94f9d2d
98300c5
e83ac2f
78e4898
939ecc2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This semantic is kind of confusing. I am not totally sure if this is correct. Remind me what reset is supposed to do again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It copies the "type", "color" and "is_entangled" properties from source_0 to target_0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. And we are assuming that type, color are the same for source_0 and source_1.
Couldn't is_entangled be different for source_0 and source_1 though?
Also, do we ever fix the type/color for the source squares? Like, they may be empty now, right?
I don't think this logic is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Doug, yes, earlier in chess.py we've checked to make sure source_0 and source_1 have the same type, color, and is_entangled = true (maybe later we could support classical to merge with entangled piece).
The type/color/is_entangled for source squares are fixed through the method "update_board_by_sampling()" in chess.py, which will be called after each move. There are cases that they won't be reset to empty (see test cases for those scenarios).
The source piece for SplitJump will also be fixed through update_board_by_sampling().