You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Algorithm will not inspect nodes that are worse than already inspected nodes".
You probably meant that algorithm will not inspect nodes which won't be seen in optimal game. Because you don't know if the node is worse than already inspected before you inspect them.
You duplicate functionality in _get_engine_move and _alpha_beta_puring. When you invoke _get_engine_move with 0 legal moves then you have the same end conditions as in _aplha_beta_puring. Another example:
"Algorithm will not inspect nodes that are worse than already inspected nodes".
You probably meant that algorithm will not inspect nodes which won't be seen in optimal game. Because you don't know if the node is worse than already inspected before you inspect them.
https://github.com/michalskibinski109/py-draughts/blob/bc030b1a312cc44ee39ec9e7f70b8f23d9255cdb/draughts/engine.py#L60
What tuple? Tuple of ints? tuple of floats? Add this to typing info.
https://github.com/michalskibinski109/py-draughts/blob/bc030b1a312cc44ee39ec9e7f70b8f23d9255cdb/draughts/engine.py#L94-L100
This should be probably separate function. Whole evaluation and scoring part should be separate from the alpha-betha.
https://github.com/michalskibinski109/py-draughts/blob/bc030b1a312cc44ee39ec9e7f70b8f23d9255cdb/draughts/engine.py#L96
Magic numbers. Make them a const's with meaningful names.
https://github.com/michalskibinski109/py-draughts/blob/bc030b1a312cc44ee39ec9e7f70b8f23d9255cdb/draughts/engine.py#L104
Why not simply
board.legal_moves
?You duplicate functionality in
_get_engine_move
and_alpha_beta_puring
. When you invoke_get_engine_move
with 0 legal moves then you have the same end conditions as in_aplha_beta_puring
. Another example:https://github.com/michalskibinski109/py-draughts/blob/bc030b1a312cc44ee39ec9e7f70b8f23d9255cdb/draughts/engine.py#L107
King in the checkers?
https://github.com/michalskibinski109/py-draughts/blob/bc030b1a312cc44ee39ec9e7f70b8f23d9255cdb/draughts/engine.py#L10
An alternative is to use
Protocol
fromtyping
.Some other ideas for future:
The text was updated successfully, but these errors were encountered: