Skip to content

反馈一些疑问 #13

@mycve

Description

@mycve

1.当前循环局面检测,我觉得应该是不变走法,那么强制变招是不是好一些?谁先造成重复的,那么从可移动走法移除该走法。
2.
2346行附近ai给的优化写法:
def popcount(x: BitBoard) -> int:
"""
计算 BitBoard 中 1 的个数
Python 3.10+ 原生 bit_count() 比 bin().count('1') 快 10+ 倍
"""
return x.bit_count()

当前我觉得可以提高代码运行速度,低版本python官方已经不再收支持,且高版本速度更快。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions