原创 丈夫贵兼济,岂独善一身:我为什么要开源KataGo?

2020-10-18 网络
浏览
[科技新闻]原创 丈夫贵兼济,岂独善一身:我为什么要开源KataGo?

原标题:丈夫贵兼济,岂独善一身:我为什么要开源KataGo?

9月尾,2020天下人工智能围棋大赛在福州完毕了初赛阶段的比拼,来自中国的15支人工智能围棋团队和来自韩国、日本、比利时、美国的5支人工智能围棋团队出战本届竞赛。七轮积分编排赛事后,前八名升级将于11月尾举行的淘汰赛。

使人不测的是,气力壮大的KataGo因为胜势超时、自降算力和用未经测试的搜刮算法输掉了3盘竞赛,终究名列第9无缘本赛,而大批“二次开发”的KataGo后继者却纷纭升级8强。

赛后弈客联络到了KataGo的作者David Wu(毕业于哈佛大学,如今供职于Jane Street,是一位处置人工智能研讨的研讨员),与之举行了一番深切的访谈,以下是采访实录:

1. What’s your level of Go? What’s your story with the game of Go?

2a. Why did you choose to develop Go AI in the first place (or why you are interested in developing Go AI)?

1. 您的围棋水平如何?您与围棋有如何的渊源?

2a. 您当初为什么会挑选开发围棋AI(也许说为什么对开发围棋AI产生了兴致)?

I am officially around AGA 3d amateur, but am very rusty and out of practice as I have focused the last few years on AI development and many other things rather than playing games myself. I learned about Go more 15 years ago and have been interested in computer game-playing AI ever since that time. Writing fun algorithms and AI programs for games has always been a thing I enjoy and am good at. I was around at the time of a lot of the early exciting developments when Monte-Carlo Tree Search (MCTS) was discovered in 2006 and 2007 and finally Go programs jumped from beginner level to amateur dan level, and have followed a lot of the published papers and research ever since then. However, I only actually started coding a bot of my own very recently in 2017 and 2018. In fact, around 2017 essentially the first time I ever trained a neural net and learned how deep learning worked.

我大概是AGA(美国围棋协会)业余3段的水平,但因为过去几年我一向专注在AI开发和其他许多事变上,就没怎么下棋,所以棋艺陌生了不少。打仗围棋有15年了,而且从那时起,我就对人工智能AI棋战很感兴致。编写风趣的算法、运作相干AI程序,一向是我所喜好和善于的事变。我见证了2006年和2007年蒙特卡洛树搜刮(MCTS)引入围棋,那是初期异常使人振奋的一大进步,接着围棋AI从初学者水平升至业余段位,后续又有了一系列相干的论文宣布和试验研讨。不过直到17年我才入手下手演习神经网络并相识深度进修的事情道理,17到18年之间才入手下手动手编写自身的棋战程序。

2b. Why is this AI named Katago?

2b. 为什么将这款AI命名为KataGo?

https://en.wikipedia.org/wiki/Kata

As I understand things, 'kata' is a word originally from Japanese that has now become simply also a normal word in English within the context of martial arts. It refers to the sequence of patterns and movements and forms that one practices in martial arts training. It seemed like a fun name for a self-play engine - one that improves by practicing by itself to gradually train its own pattern and movement and form on the Go board.

据我所知,“kata”一词出自日语,如今也成为了一个技击里的英文经常应用辞汇。技击演习中它指的是一串行动,也许说招法。关于自棋战程序来讲,这认为上是个风趣的名字——经由历程摆布互搏自我演习,逐步精进棋盘上的招式。

3. Many appreciations to KataGo's great contribution to the richness and ease of use of AI. KataGo has given Go fans an unparalleled gift. The question I want to ask is, in the process of developing KataGo, have you also made progress in your understanding of AI, and to what extent?

异常感谢KataGo对AI功用雄厚性和易用性做出的巨大孝敬。KataGo给了棋迷们一个无与伦比的礼品。我想问的问题是,研发KataGo的历程,是不是您也在对AI的明白上获得了进步,这类进步是何种水平的?

Sure. As I said, the first time I ever got any experience with deep learning was in 2017, and the research project that eventually became KataGo my attempt to learn the field. Whenever I try to learn a new major subject area in Computer Science, I always try to do so by launching a personal project to build something in that area - and sometimes it becomes something useful to release for others. I love writing tools and algorithms that do useful and interesting things.

固然。我前面讲过,步入这个范畴,我最入手下手获得深度进修履历是在2017年,厥后进阶为KataGo这一研讨项目。每当我尝试研讨盘算机科学一个新的重要学科范畴时,我总会经由历程启动别的的个人项目来协助构建我在该范畴中的学问系统,有时会收成不测之喜。我兴趣编写东西及算法,去做有效又风趣的事变。

4. Before the birth of KataGo, Go AI has completely changed people's perception of Go, and has profoundly affected all aspects. So did you create KataGo more out of the application of artificial intelligence or for the hope to further change the Go ecology?

在KataGo降生前,围棋人工智能已完整转变了人们对围棋AI的认知,也已深入的影响了围棋的各个方面。那末你创出KataGo更多的是出于关于人工智能的应用实践照样关于希望进一步转变围棋生态?

Both! I initially developed KataGo because in the years immediately after AlphaZero, the ability to develop self-play-based AI in full-scale large board games was almost entirely out of reach of anyone except for large companies and organizations or mass-online distributed projects. AlphaZero and some replications like ELF OpenGo both used thousands of GPUs or TPUs, which is completely impossible for many individuals or smaller research groups to match.

二者都有!我最初开发KataGo的原因是,在AlphaZero以后的几年,除了大型公司和构造或大范围项目外,大棋盘上开发基于自棋战AI对任何个人来讲都险些是难以企及的。 AlphaZero以及像ELF OpenGo之类的复制品都装备数千个GPU或TPU,这关于许多个人或范围较小的研讨团队而言是完整达不到的。

Once I understood the algorithms, I saw that there were many clear paths to improving the self-play algorithms to make them vastly stronger and more efficient. As a result of many such improvements, KataGo reached the top levels using only a small fraction of compute resources. With KataGo's code, with even just a single 2080 Ti if you are able to devote a few months, you should be able to train a Go bot starting from nothing to reach strong human professional levels or maybe even beyond. That means that the level that "AlphaGo Lee" reached - can now be matched by anyone who merely happens to own a high-end gaming rig and is willing to devote the time. With the right methods, smaller research teams and individual developers can achieve results that previously were only possible with large data centers and millions of dollars, making research much more possible and practical.

明白算法后,我发明有许多清晰清晰明了的要领可以革新自棋战,从而使之变得越发壮大和高效,因而KataGo仅应用一小部分盘算资本就到达了顶尖水平。KataGo的内置代码能使一个只需一块2080 Ti显卡的人,只消费短短数月时候便可从无到有地将一个围棋AI演习到达人类顶尖职业水平以至更高。也就是说,“AlphaGo Lee”到达的高度——如今可以由情愿投入时候的任何人在自身的高端游戏本上完成。只须要领准确,小型研讨团队和个别开发人员都可以完成之前只需大型数据中心和数百万美圆投入才大概获得的效果,研讨也由此变得越发可行和实用了。

157 个演习日进步飞速的KataGo

This is why KataGo is open source as well. It is about more than just Go. I have also received personal word from developers working on other board games besides Go that some of the techniques in KataGo helped in these other games as well. If you only try to develop even stronger Go programs but you never publish anything or explain your methods, then maybe you will improve slightly the level of Go AI, but you won't help other smaller researchers or developers who want to build their own AIs for Go or other games, or to experiment with AI research in broader areas.

这就是为什么KataGo同时也是开源的。不光围棋,我还从其他棋盘游戏的开发人员那边得知,KataGo中的某些手艺应用于其他棋类项目也很给力。假如您只是尝试演习出更壮大的围棋程序,但不肯分享任何内容或要领,那末也许只会轻微拔高围棋AI的峰顶,却没法助力其他在围棋或游戏项目上想要构建自身AI的少数研讨人员或开发人员,也许协助在更普遍的范畴展开AI研讨。

Anyways, after the above goal was achieved, it seemed fun to continue developing KataGo. I also enjoy building tools that other people can use, so KataGo was my attempt to give to the Go community an engine with features that nobody else seemed yet able to produce. Support for a wide variety of rulesets including Japanese rules, reducing slack endgame play when winning to produce better analysis, better handicap game play, support for multiple board sizes without changing the neural net. All of these features were missing in almost all of the top bots post-AlphaZero, and I thought I knew ways to support them, so I did.

,科技日报,

不管如何,在完成上述目标以后,继承开发KataGo依然风趣。我乐于去开发一般群众都能用上的东西,KataGo就是我关于围棋界的孝敬,这好像还没有其他人做到。包含支撑日本划定规矩在内的多种棋战划定规矩,推断清晰后削减胜定结局时不必要的行棋,让子棋中更好的表现,支撑多种棋盘规格且无需做出婚配变动……一切这些功用在AlphaZero以后的险些一切顶级AI中都没能席卷,而我晓得如何革新,我也做到了。

自棋战情势推断

5. KataGo has amazing strength, helping people improve the level of competitive Go, and also has very free parameter settings. Many people use it to realize the fun of Go. For example, Yike uses the features of KataGo to create AI game that is popular among users. Among them, various chessboards and different gameplay make players hooked. I wonder if Dr. Wu have any try? Also do you think that this has presented all the characteristics of KataGo?

KataGo具有惊人的气力,协助人们进步竞技围棋的水平,也具有异常自在的参数设定,不少人用它去完成围棋的趣味性。比方弈客就应用KataGo的特征创建了广受用户喜好的ai闯关游戏。个中种种棋盘,差别弄法,都让玩家大叫过瘾。不晓得您是不是相识?别的您认为人人是不是已发挥了KataGo的一切特征了呢?

Thanks. No, I haven't explored all the different things people are doing with KataGo. I know there are many more than I can follow myself, and indeed I hope it stays that way, as people continue to find it exciting and fun. And if any developers have ideas for any new features that I could implement , I'd love to hear it. More than once now, I've added features and subcommands into KataGo that were needed by other developers on different servers or sites to do interesting and new things that weren't possible before, and I'm happy to add more when I have the time.

感谢。我还没关注人人经由历程KataGo研发的一切差别事变。我晓得有许多,可来不及跟踪,但我异常希望人人可以延续挖掘它的魅力。另有,我将很愿意听到假如有任何开发人员对任何有望完成的新功用有主意。如今我已不止一次地在KataGo中添加了其他服务器或站点上的其他开发人员所须要的功用和子敕令,实行完成了之前没法预感的风趣的新行动,所以将来我希望能越发雄厚完美它。

【编者按:中国围棋人工智能的研发显现井喷,如星阵在“结局不让步”,“让子棋”,“小棋盘”,“恣意贴目”,“数量划定规矩”等方向上做了大批研讨和试验,并领先举行了多场表演赛:2018年让先41局、9路挑战赛、17路天弈挑战赛。而弈客的弈小天则另辟蹊径,在模仿低水平,自定义棋风等教培应用相干范畴发力。来自天下各地的AI专家们的勤奋,不断地推动围棋人工智能的高水平的同时,划定规矩相干,“拟人相干”的应用型效果会获得更大的打破】

6. What are KataGo's future plans? Should we continue to dig deep into Go or explore other fields such as medicine, finance or meteorology? In addition, Go is almost the first to be changed by AI. What kind of mentality should the people of Go and even the whole mankind face the AI era?

KataGo以后设计是什么?是继承深耕围棋照样去探究医学、金融或气候等其他范畴?别的,围棋险些是最早遭到AI变天的,围棋人乃至于全人类应以什么样的心态来面临AI时期?

In the next month or two, there is a chance that KataGo can also begin distributed training, similar to Leela Zero. Thanks to KataGo's efficiency improvements, large-scale distributed training with hundreds of GPUs and contributors has not been necessary so far to reach a high level, but it would be fascinating to push it further and see how far it can reach if it does receive those resources. Once distributed training is released, I hope there will be some people who will join me in seeing how high a level KataGo can reach with more training.

接下去一两个月,跟Leela Zero一样,KataGo也可以入手下手分布式演习了。不过得益于KataGo进步了效力,不须要数百个GPU和孝敬者举行大范围演习就可以到达很高的水平,但假如具有了那些资本再看其进一步能有多大逾越,那也是值得期待的。分布式演习开启的话,我希望能有更多人到场我,配合见证KataGo能继承攀升至如何的水平。

As for other fields - yes there are many other valuable areas of research. I know there are many researchers out there trying to improve the quality of science and technology in these areas. Maybe at some point I would get involved in some of those areas too at some point in a new project, I don't know yet. But at least in the field of reinforcement learning and deep-learning-augmented search I hope that some of the approaches and ideas used in KataGo will continue to be useful.

至于其他范畴,固然另有许多其他有价值的研讨方向。我晓得有许多研讨人员试图完成相干范畴的科技打破。大概在某个节点上,我也无意中置身于某项新科研,但我并不晓得。但是至少在强化进修和深度进修范畴,我希望KataGo中应用的某些战略和主意能发挥作用。

7. Not long ago, Yike was very fortunate to contact the developer who completed Gobang AI based on the KataGo engine and successfully applied that program to the Yike platform, which brings an unprecedented win rate, strategy and opening experience for Gobang players. Do you would like to see such kind of cross-border cooperation?

不久之前弈客异常有幸的联络到了经由历程KataGo引擎完成五子狗的开发者,并成功将程序应用到了平台上。为五子棋玩家带来了亘古未有的胜率,支招以及残局库的体验。您是不是认为如许的跨界是你希望看到的?

Yes, definitely. As I mentioned above, the entire original purpose of KataGo was about more than just Go. It was to make it easier for a wide range of game AI researchers and developers to be able to build high-quality programs for different games. If anyone wants to take KataGo's ideas, or its published algorithm techniques, or its code directly, and build upon them further to solve new problems or surpass KataGo itself - then that is a success. My only wish is for people to be friendly and honest about when they use KataGo - whether they clone it with only minor modifications, or whether they use it as simply the foundation for genuine new training and original research. When developing KataGo, the goal has never been about trying to beat other people, or to be the best, or to win. I don't care if it wins or is the top bot, that doesn't matter. Instead KataGo's purpose is to make it possible for everyone to do better together.

固然。我前面提过,KataGo的悉数初志毫不仅仅是围棋,而是为协助AI研讨人员和开发人员更轻松适配差别游戏所构建的高质量程序。假如有人直接套用了KataGo,或拿走已公然的算法手艺或代码为之所用,并在其基本上进一步处理新问题或逾越KataGo自身——那就是一种成功。我唯一的希望是人们对借用KataGo的行动可以慷慨、老实——不论是对其举行少许修正的克隆,照样将其用作新研讨的基石。开发KataGo的目标历来都不是击败人类、冠绝AI或是博得成功。我不在乎它是永久赢棋照样最顶尖AI,这无所谓。相反,KataGo是希望让人人一同做到更好。

And in Go, I've been told that in the recent Go AI tournament preliminaries in Fuzhou, besides the public KataGo entry, at least a few of the submissions were based off of KataGo and that in at least one case, a team also developed new improvements with new separate training. And I've been told that a few of these submissions might have made it to the upcoming final rounds as well, which is great. I am mostly a spectator and not actively involved, but if this is true then I would hope that after the conclusion of the tournament such teams would consider publishing their methods, especially if they can share new algorithms and training techniques. It makes me happy that I was able to make an AI that other people would want to use or to build on top of.

我被示知说在近来的福州围棋AI锦标赛初赛中,除KataGo外,另有一些参赛作品是基于KataGo编写的,而且不止一支团队都经由历程自力演习后有了新的革新。大概会在后续淘汰赛中看到各AI的出色表现,这很棒。没有亲自介入竞赛的我只是一位看客,但假如这是真的,那末我希望竞赛完毕后,相干团队可以斟酌公然,特别是同享新的算法和演习手艺。我为自身可以创作出其他人想要应用或构建的AI觉得异常高兴。

Aside from Go and "Gobang" (Gomoku?), I have also been privately contacted by a few developers for other different games, who have reported that they found some of the individual techniques in KataGo useful ("playout cap randomization", "auxiliary training targets", etc), and helped answer questions about how to apply them. I've also talked with some researchers doing more general work on trying to improve the accuracy of game-tree-search as well. In all of these cases, if KataGo can help make a foundation for other people to do new and better research, that makes me excited.

除了围棋和五子棋以外,一些开发人员还私自与我联络,说他们发明KataGo中的某些自力手艺很有效(“盘算量上限随机化”,“辅佐演习目标”等),我还与一些研讨人员举行了攀谈,他们也在尝试进步游戏树搜刮的准确性方面做了更普遍的事情。在一切这些情况下,假如KataGo可认为其他人展开新的更好的研讨打下基本,那会让我很冲动。

8. Taxing makes the game of Go different, which is an option in KataGo. Is this tax process achieved through training or a specific algorithm? Could it be realized that in the tax mode, White first moves?

还棋头是KataGo中的一个选项,因为还棋头,使围棋的下法涌现差别。这个历程是经由历程演习所得照样特定算法完成的?因而可否完成还棋头形式下,白先落子?

KataGo handles different rules variations and board sizes simply by training the neural net with lots of games with these rules during self-play. You can definitely use "tax" rules or "stone scoring" rules - KataGo plays a major fraction of its games with them, so it should have much experience. And including with white playing first if you like, since KataGo doesn't care what color moves first. If you want to make white move first, then just tell KataGo to play a move for white first instead of black, and set the "komi" to either 0 or to a negative number so that black is the one that receives compensation for moving second instead of white.

KataGo经由历程大批自棋战,完成了对神经网络顺应差别划定规矩和棋盘尺寸的演习。“还棋头”或“数子”划定规矩也不在话下——KataGo已然成功完成了许多对局,可以说是履历雄厚。别的白棋先行也没问题,KataGo不在乎棋子色彩。假如要先落白子,只须要通知KataGo先是白子而非黑子先行棋,然后将“贴目”设置成0或负数,如许黑色就是被贴目标那一方。

One fascinating thing about the ancient "tax" or "stone scoring" rules is that they seem to slightly encourage a more cosmic-style of play. Because the penalty is increased for making multiple small groups, this means playing lots of big global moves and making large frameworks becomes more favored. For example, under these rules, 3-3 invasion appears to be no longer a good move to play early, and fighting for influence on the sides and center becomes more favored too. For people who have been a little disappointed about the high value that modern AIs place on the corner territory and the resulting tight style of game, perhaps these ancient rules might feel refreshing.

关于古代“还棋头”和“数子”划定规矩风趣的是,好像在某种水平上勉励的是一种更远大的行棋思绪。因为多块活棋会被请求还子,也就使得举行通盘性子的大行动和大型样子容貌作战越发遭到喜爱。比方,在这些划定规矩下,“三三”打击好像不再是规划的好选点,而争取边路和中心势力范围显得更为重要。那些对当代AI注重四角和紧凑棋风扫兴的兴趣者,也许这些古棋划定规矩大概使人耳目一新。

9. What level do you think KataGo will eventually reach, such as how much higher the elo rating will be, comparing with the current version?

您认为KataGo终究会到达一个什么水平,比方比方今的版本凌驾若干elo等级分?

It's very hard to say! As I mentioned above, I hope KataGo can begin distributed training fairly soon, and that there can be enough community support to continue improving as a free and open program for everyone to use. We will see how much farther it can improve. :)

很难讲吧!如前所述,我希望KataGo可以尽快投入分布式演习,而且衷心期盼作为供一切人应用的免费开放程序,可以有充足的反应来支撑其继承革新。我们会看到它可以到达多高的水准的(笑)。

中国量子科技走出实验室: 通信有优势,计算需追赶

如今量子计算、量子通信、量子精密测量和传感技术的兴起和发展,也正在推动信息技术向量子信息技术跨越,将可能导致新的技术革命。 中国科学技术大学最早从事量子技术产业化的研究人员赵义博告诉第一财经记者:“…