Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
| This game is created for the master thesis by Luuk van den Nouweland, university of Leiden. | ||
| Supervisor: Evert van Nieuwenburg | ||
|
|
||
| # Rules |
There was a problem hiding this comment.
This should probably be a sub-heading "## Rules". Same for below. "# Rules" would be for the title.
| # Rules | ||
| In this game, multiple rules are implemented. | ||
| 1. Classical: Normal checkers | ||
| 2. Superpositions: Checkers where pieces can exist in superposition |
There was a problem hiding this comment.
I think it would be good to explain the rules a bit more. I don't understand what rules 3 and 4 mean in the context of checkers. Does rule 2 mean that you can move to two possible squares?
| @@ -0,0 +1,311 @@ | |||
| from enums import CheckersResult, CheckersRules, Colors | |||
There was a problem hiding this comment.
Please add copyright notice to the top of the file. See any other file in the repository for an example.
| from copy import deepcopy | ||
|
|
||
| # GLOBAL GAME SETTINGS | ||
| forced_take = True |
There was a problem hiding this comment.
Global constants should be all caps `FORCED_TAKE'. Also, I would explain what this option does.
Consider also putting this as part of the Checkers class.
| BOTH_WIN = 4 | ||
| """ | ||
| if ( | ||
| len(self.board.calculate_all_possible_moves(Colors.WHITE)) == 0 |
There was a problem hiding this comment.
Consider setting these as variables so that you don't recalculate all the moves twice:
i.e.
num_white_moves = len(self.board.calculate_all_possible_moves(Colors.WHITE))
| if len(possible_moves) - 1 == 0: | ||
| return possible_moves[0] | ||
| return possible_moves[randint(0, len(possible_moves) - 1)] | ||
| except Exception as error: |
There was a problem hiding this comment.
Why are we swallowing all exceptions here?
| print(possible_moves) | ||
|
|
||
|
|
||
| class exp_min_max(bot): |
There was a problem hiding this comment.
Remove until implemented.
| with either X or O. | ||
|
|
||
| Args: | ||
| square: use TicTacQuare.X to do a sqrtSWAP(01) and |
There was a problem hiding this comment.
This refers to TicTacToe.
| import numpy as np | ||
|
|
||
|
|
||
| class QuditSplitGate(cirq.Gate): |
There was a problem hiding this comment.
Is this a Split or a Swap?
| return cirq.CircuitDiagramInfo(wire_symbols=(wire_code, wire_code)) | ||
|
|
||
|
|
||
| class CheckersSplit(QuantumEffect): |
There was a problem hiding this comment.
Why can't we use unitary.alpha.Split()?
|
@LuukvandenNouweland Thank you for this pull request from last year. This has not had any activity for some time. Could you let us know if you are interested and able to address the review comments above? |
Also added fix in the sparse vector simulator