Skip to content

为什么depth起始深度为4? #5

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

Open
GYSml opened this issue Oct 26, 2018 · 1 comment
Open

为什么depth起始深度为4? #5

GYSml opened this issue Oct 26, 2018 · 1 comment

Comments

@GYSml
Copy link

GYSml commented Oct 26, 2018

理论只需要遍历每个空点的上下左右四种情况就可以了,这样的dept不需要设置了

@xwjdsh
Copy link
Owner

xwjdsh commented Oct 26, 2018

dept 指的是从当前局面往后考虑多少步,玩家的一步指决定往哪个方向移动,电脑的一步指在剩下的某个空格里放入一个 2 或者 4。程序会推演玩家和电脑的所有可能的操作,算出 dept 步后可能的局面,然后根据未来局面的好坏来决定当前应该往哪个方向移动。
dept 每增加 1 步会造成计算量的飙升,初始化为 4 是我在本地测试时,觉得此时计算速度很快,而且一开始空格多,不容易死,到后面根据分数的增加增加 dept,就是牺牲反应速度来使计算相对更加准确。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants