Wen Sun

Results 31 comments of Wen Sun

`systemd` could do this.

`go get github.com/benmanns/goworker@master`

谢谢指出,确实是有问题。不过原因和 Move 函数的返回没有关系,这里上下文中的 score 指的是对游戏局面的评分,并非游戏中的得分。在这种情况下,Search 函数中会先移动一步,然后 expectSearch 函数中会先模拟电脑在空位中补上一个点,此时所有点都已经占满了,任何一个方向都没办法移动,所以 expectSearch 函数返回的 newScore 为 0,和初始的 bestScore 相等,所以也就不会把可行的方向赋值给 bestDire,我的改法是把 bestScore 初始为 -1,这样也就可以得到一个可行的方向。

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

I have the same problem and I don't use SSL. Finally, I found out that the auto-sync of etcd caused it and if I commented the line `AutoSyncInterval: time.Minute,`, then...

@dearchap Thank you for your review, I updated and rebased main branch.

@meatballhat I'll fix it later, that's OK.

Sorry for being late, I updated. Update `gopkg.in/yaml.v2` to `gopkg.in/yaml.v3` cause v2 seems have an issue that commas cannot be unmarshal correctly, I switched to v3 and the issue resolved.

@meatballhat I'm a little bit confused about the CI error, my local environment is normal...

good idea.