Comments (6)
@zhangshun97 目前可行的方法应该是通过权重来做,给靠近边角的棋增加一个较低的权重,比如 0.8
。这样电脑就会倾向于往中间走。
如果有神经网络的话应该能完美解决这个问题,这其实是电脑大局观
的一部分,传统的搜索算法本来对局势的判断就不理想。
from gobang.
@lihongxun945 谢谢!请问这个所谓的权重,是直接乘在该点的score上嘛?因为你的整个体系都是基于score的嘛,当初也有想过加权重之类的,但是就怕掌握不好度,会出现比如为了往中间走而走出一些不好的棋?不过又感觉这样的其实可以通过一定的搜索深度来避免……嗯……感觉python的瓶颈还是搜索的不够深orz,我实现的版本也只能做到在10秒内启发式搜索最多给10个点的情况下执黑搜6层,执白搜5层,VCF和VCT是15层(不过感觉算杀这块速度还行),不知道作者你在JS上的效率大概是如何的!
from gobang.
@zhangshun97
第一个问题,我觉得可以有两种实现:直接在分数上乘,或者增加一个额外的权重字段。
第二个问题,我用JS可以搜索8~10层,不过偶尔会超过10秒。这是在我用了一些优化技巧后的结果,你可以看看我新写的教程的性能优化一章有介绍:性能优化
from gobang.
#10 666,厉害厉害
from gobang.
边角 确实棋力下降的很厉害,传统算法还是不太理解外势和空间的概念。。。
from gobang.
我正在向10秒以内而努力,我目前的程序9层平均就是30秒,正在拼命的想办法压缩时间
from gobang.
Related Issues (20)
- 轻松就赢了 萌新模式 (4 ~ 6) 关闭单步延伸 HOT 5
- 能增加平手检测吗
- 大 bug 棋子重叠
- 两个 Bug HOT 1
- 别思考了...
- npm test 出错 HOT 1
- 认输后重新开局出错 HOT 1
- 算法看起来很拉跨
- python 版本 + 代码分析
- 求教,如何运行起来? HOT 1
- 求助
- 项目是使用vscode软件编写的嘛
- 计算深度有达到8-10步这么深吗?
- 盘面未清洗
- 和棋思考
- 胜负结算的小bug HOT 3
- 请问难度级别支持1-3吗?
- 现在五子棋AI,受alpah go影响,采用了MCST,也采用了神经网络,请问采用神经网络与否 导致 棋力差别有多少?
- 平局卡死了:)
- 安装问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gobang.