Optimizing Time for Eigenvector Calculation

Total Page:16

File Type:pdf, Size:1020Kb

Optimizing Time for Eigenvector Calculation Optimizing Time For Eigenvector Calculation [to find better moves during the Fuseki of Go] Bachelor-Thesis von Simone Wälde aus Würzburg Tag der Einreichung: 1. Gutachten: Manja Marz 2. Gutachten: Johannes Fürnkranz Fachbereich Informatik Knowlegde Engineering Group Optimizing Time For Eigenvector Calculation [to find better moves during the Fuseki of Go] Vorgelegte Bachelor-Thesis von Simone Wälde aus Würzburg 1. Gutachten: Manja Marz 2. Gutachten: Johannes Fürnkranz Tag der Einreichung: Bitte zitieren Sie dieses Dokument als: URN: urn:nbn:de:tuda-tuprints-12345 URL: http://tuprints.ulb.tu-darmstadt.de/1234 Dieses Dokument wird bereitgestellt von tuprints, E-Publishing-Service der TU Darmstadt http://tuprints.ulb.tu-darmstadt.de [email protected] Die Veröffentlichung steht unter folgender Creative Commons Lizenz: Namensnennung – Keine kommerzielle Nutzung – Keine Bearbeitung 2.0 Deutschland http://creativecommons.org/licenses/by-nc-nd/2.0/de/ Erklärung zur Bachelor-Thesis Hiermit versichere ich, die vorliegende Bachelor-Thesis ohne Hilfe Dritter nur mit den angegebenen Quellen und Hilfsmitteln angefertigt zu haben. Alle Stellen, die aus Quellen entnommen wurden, sind als solche kenntlich gemacht. Diese Arbeit hat in gleicher oder ähnlicher Form noch keiner Prüfungs- behörde vorgelegen. Darmstadt, den November 30, 2016 (S. Wälde) Contents 1 Abstract 6 2 Introduction 7 2.1 Introduction to Go . 7 2.1.1 History of the Game . 7 2.1.2 Rules of the Game . 8 2.2 Rating and Ranks in Go . 11 2.2.1 EGF Rating Formula . 11 2.2.2 Online Servers . 12 2.3 Different Approaches to Computer Go . 12 2.3.1 Pattern Recognition . 12 2.3.2 Monte Carlo Tree Search . 13 2.3.3 Neural Networks . 14 2.4 Composition of this Thesis . 15 3 Introducing the Heuristic and its Underlying Algorithm 16 3.1 Explanation of the Algorithm . 16 3.2 Mathematical Background of the Algorithm . 17 3.3 The Purpose of Eigenvector Computation . 19 3.4 Demonstration of the Algorithm . 20 4 Perfomance Comparison of Eigenvector Functions 24 4.1 Direct Methods . 25 4.1.1 Performance of eigen() ................................................ 25 4.1.2 Performance of the EigenSolver ........................................... 26 4.1.3 Performance of gsl_eigen_symmv() ......................................... 27 4.1.4 Performace of SciPy and NumPy Routines . 28 4.1.5 Overview and Discussion of Direct Methods . 31 4.2 Iterative Methods . 32 4.2.1 Performance of the Arnoldi and Lanczos Method . 32 4.2.2 Performance of the Spectral Shift Power Method . 34 4.2.3 Performance of the Inverse Power Method . 35 4.2.4 Overview and Discussion of Iterative Methods . 40 4.3 Conclusion on Performance Tests . 41 5 Testing the Heuristic in Pachi 42 5.1 About Pachi . 42 5.2 Testing Pachi* against Pachi . 42 5.3 First Tests . 43 5.3.1 First Test without modifications . 43 5.3.2 Test 2: Adding a Phantom Function to Pachi . 43 5.3.3 Test 3: Confining the Algorithm to Fuseki . 44 5.3.4 Test 4: Without p1 . 44 5.3.5 Conclusion on the First Tests . 44 5.4 Additional Tests: Varying Equivalent Experience . 45 5.4.1 Eqex Formula inspired by Pachi’s Pattern Prior . 45 5.4.2 Enhancing the Formula . 46 5.5 Conclusion on Pachi . 47 6 Conclusion 48 Appendices 49 A Performance Files of eigen() 50 A.1 matrix A . 50 A.2 matrix B . 50 2 A.3 matrix C . 50 B Performance Files of gsl_eigen_symmv() 51 B.1 matrix A . 51 B.2 matrix B . 51 B.3 matrix C . 51 C Performance Files of Naive Self Implementation 52 C.1 matrix A . 52 C.2 matrix B . 52 C.3 matrix C . 52 D Performance Files of numpy.linalg.eigh() 53 D.1 matrix A . 53 D.2 matrix B . 53 D.3 matrix C . 53 E Performance Files of scipy.linalg.eig 54 E.1 matrix A . 54 E.2 matrix B . 54 E.3 matrix C . 54 F Performance Files of scipy.linalg.eigh() 55 F.1 matrixA.............................................................. 55 F.2 matrixB.............................................................. 55 F.3 matrixC.............................................................. 55 G Performance Files of EigenSolver 56 G.1 matrix A . 56 G.2 matrix B . 56 G.3 matrix C . 56 H Performance Files of Naive Self Implementation 57 H.1 matrix A . 57 H.2 matrix B . 57 H.3 matrix C . 57 I Performance Files of Spectral Shift using Eigen 58 I.1 matrix A . ..
Recommended publications
  • Ascj 2006 [Abstracts]
    ASCJ 2006 [ABSTRACTS] Session 1: Koreans and the Japanese Empire: New Historical Perspectives .……………….….……….. 2 Session 2: Reproducing Modernities: Race, Gender, and Labor in Making Nations across the Pacific ... 4 Session 3: How Will Japan’s International Identity Be Affected by New Security Issues? ….….…….... 6 Session 4: Shibusawa Keizō and the Possibilities of Social Science in Modern Japan …….….……….. 8 Session 5: Poets, Audience, and Court Spectacle: Facets of the Fujiwara Patronage of Poetry in Late Tenth-Century Waka ….….….….….….….….….….….….….….….….….….….…………. 10 Session 6: Individual Papers on Japanese Literature and Art .….….….….….….….….…….….……... 12 Session 7: “Japaneseness” in Transwar Japan: Assimilation and Elimination .….….…....….….……… 14 Session 8: The Social Dynamics and Political Ramifications of “Scientific” Knowledge in India, Japan, Taiwan, and Vietnam ….….….….….….….….….….….….….…...….….….….….……... 17 Session 9: Roundtable: Economic Planning of Japan in Historical Perspective ….….…..….….………. 19 Session 10: Mobilizing the Urban Experience of Tokyo .….….….….….….….….….….….….………. 20 Session 11: Roundtable: The Future of Basic Textual Research in Classical Japanese Literature ……... 22 Session 12: The Other and the Same in Recent Japanese Literature and Film ….….…...….….………. 22 Session 13: Individual Papers on Modern Chinese History .….….….….….….….….…….….……….. 25 Session 14: Gender and Ethnicity in Contemporary Japan .….….….….….….….….….….….……….. 27 Session 15: Good Times, Bad Times: New Perspectives on Chinese Business and
    [Show full text]
  • WINTER 2016-2017 No.148 AISA Basketball, Math, Leadership 英検1級に4名合格 Bookmark Contest
    INTERCULTURE WINTER 20 6 - 2 0 7 N o . 4 8 INTER関西学院千里国際中等部・高等部 Senri International School of KwanseiCULTURE Gakuin (SIS) | 関西学院大阪インターナショナルスクール Osaka International School of Kwansei Gakuin (OIS) 〒562-0032大阪府箕面市小野原西4-4-16 | 4-4-16 Onohara-nishi, Minoh-shi, Osaka-fu, 562-0032 JAPAN | TEL 072-727-5050 | FAX 072-727-5055 | URL http://www.senri.ed.jp All School Production WINTER 2016-2017 No.148 AISA Basketball, Math, Leadership 英検1級に4名合格 Bookmark Contest Picture by Mitsuhiko Kono 関西学院千里国際キャンパス Senri and Osaka International Schools of Kwansei Gakuin (SOIS) は、帰国生徒・一般生徒・外国人生徒を対象とする関西学院千里国際中等部・高等部 Senri International School of Kwansei Gakuin (SIS) と、4歳から18歳までの主に外国人児童生徒を対象とする関西学院大阪インターナショナルスクール Osaka International School of Kwansei Gakuin (OIS) とを、同一敷地・校舎内に併設しています。両校は一部の授業や学校行事・クラブ活動・生徒会活動等を合同で行っています。チームスポーツはこの2校で1チームを編成しており、国内 外のインターナショナルスクール、日本の中学・高校との交流試合等に参加しています。このため、校内ではインターナショナルスクールの学校系統に合わせて、6年生~8年生(日本の小学6年生~中 学3年生春学期)をミドルスクール(MS)、9年生~12年生(日本の中学3年生秋学期~高校3年生)をハイスクール(HS)と呼んでいます。 INTERCULTURE WINTER 20 6 - 2 0 7 N o . 4 8 壁 井藤眞由美 に知って来られる場合もそうでは SIS校長 ない場合も、校内を案内している 年末をベルリンで過ごした。二年ぶり二度目の訪問だ。出発前 ときにこう尋ねられることが少なく 日にクリスマスマーケットにトラックが突っ込むというテロ事件が ない。「二つの学校がキャンパス あったのは悲しかったが予定通り出発。現地に住んでいる長女を と建物を共有しているとは聞いて 訪ねるのが一番の目的ではあるが、これまで二度の訪問で、歴 いましたが、え?仕切りの壁もな 史上数奇な運命を辿ってきたベルリンという都市に多くのことを教 いのですか?」 わった。そのひとつはやはりベルリンの壁。 この空間に慣れている私たちは 1989年11月、ベルリンの壁崩壊のニュース映像をテレビで見たと 逆にこのことばが新鮮に聞こえる きの衝撃と感動は忘れられない。(その年に生まれた生後三か月 ことと思う。私にとっても、耳に慣 の長男のおむつを替えている途中でテレビ画面に映る歴史的瞬 れている言葉であったはずだが、 間に目が釘付けになったため、ちょっとしたハプニングが起こり、 新年が明けてからのお客様から その場面がコメディドラマの1シーンのような映像として記憶に刻
    [Show full text]
  • CSC321 Lecture 23: Go
    CSC321 Lecture 23: Go Roger Grosse Roger Grosse CSC321 Lecture 23: Go 1 / 22 Final Exam Monday, April 24, 7-10pm A-O: NR 25 P-Z: ZZ VLAD Covers all lectures, tutorials, homeworks, and programming assignments 1/3 from the first half, 2/3 from the second half If there's a question on this lecture, it will be easy Emphasis on concepts covered in multiple of the above Similar in format and difficulty to the midterm, but about 3x longer Practice exams will be posted Roger Grosse CSC321 Lecture 23: Go 2 / 22 Overview Most of the problem domains we've discussed so far were natural application areas for deep learning (e.g. vision, language) We know they can be done on a neural architecture (i.e. the human brain) The predictions are inherently ambiguous, so we need to find statistical structure Board games are a classic AI domain which relied heavily on sophisticated search techniques with a little bit of machine learning Full observations, deterministic environment | why would we need uncertainty? This lecture is about AlphaGo, DeepMind's Go playing system which took the world by storm in 2016 by defeating the human Go champion Lee Sedol Roger Grosse CSC321 Lecture 23: Go 3 / 22 Overview Some milestones in computer game playing: 1949 | Claude Shannon proposes the idea of game tree search, explaining how games could be solved algorithmically in principle 1951 | Alan Turing writes a chess program that he executes by hand 1956 | Arthur Samuel writes a program that plays checkers better than he does 1968 | An algorithm defeats human novices at Go 1992
    [Show full text]
  • E-Book? Začala Hra
    Nejlepší strategie všech dob 1 www.yohama.cz Nejlepší strategie všech dob Obsah OBSAH DESKOVÁ HRA GO ................................................................................................................................ 3 Úvod ............................................................................................................................................................ 3 Co je to go ................................................................................................................................................... 4 Proč hrát go ................................................................................................................................................. 7 Kde získat go ................................................................................................................................................ 9 Jak začít hrát go ......................................................................................................................................... 10 Kde a s kým hrát go ................................................................................................................................... 12 Jak se zlepšit v go ...................................................................................................................................... 14 Handicapová hra ....................................................................................................................................... 15 Výkonnostní třídy v go a rating hráčů .......................................................................................................
    [Show full text]
  • FUEGO—An Open-Source Framework for Board Games and Go Engine Based on Monte Carlo Tree Search Markus Enzenberger, Martin Müller, Broderick Arneson, and Richard Segal
    IEEE TRANSACTIONS ON COMPUTATIONAL INTELLIGENCE AND AI IN GAMES, VOL. 2, NO. 4, DECEMBER 2010 259 FUEGO—An Open-Source Framework for Board Games and Go Engine Based on Monte Carlo Tree Search Markus Enzenberger, Martin Müller, Broderick Arneson, and Richard Segal Abstract—FUEGO is both an open-source software framework with new algorithms that would not be possible otherwise be- and a state-of-the-art program that plays the game of Go. The cause of the cost of implementing a complete state-of-the-art framework supports developing game engines for full-information system. Successful previous examples show the importance of two-player board games, and is used successfully in a substantial open-source software: GNU GO [19] provided the first open- number of projects. The FUEGO Go program became the first program to win a game against a top professional player in 9 9 source Go program with a strength approaching that of the best Go. It has won a number of strong tournaments against other classical programs. It has had a huge impact, attracting dozens programs, and is competitive for 19 19 as well. This paper gives of researchers and hundreds of hobbyists. In Chess, programs an overview of the development and current state of the UEGO F such as GNU CHESS,CRAFTY, and FRUIT have popularized in- project. It describes the reusable components of the software framework and specific algorithms used in the Go engine. novative ideas and provided reference implementations. To give one more example, in the field of domain-independent planning, Index Terms—Computer game playing, Computer Go, FUEGO, systems with publicly available source code such as Hoffmann’s man-machine matches, Monte Carlo tree search, open source soft- ware, software frameworks.
    [Show full text]
  • Move Prediction in Gomoku Using Deep Learning
    VW<RXWK$FDGHPLF$QQXDO&RQIHUHQFHRI&KLQHVH$VVRFLDWLRQRI$XWRPDWLRQ :XKDQ&KLQD1RYHPEHU Move Prediction in Gomoku Using Deep Learning Kun Shao, Dongbin Zhao, Zhentao Tang, and Yuanheng Zhu The State Key Laboratory of Management and Control for Complex Systems, Institute of Automation, Chinese Academy of Sciences Beijing 100190, China Emails: [email protected]; [email protected]; [email protected]; [email protected] Abstract—The Gomoku board game is a longstanding chal- lenge for artificial intelligence research. With the development of deep learning, move prediction can help to promote the intelli- gence of board game agents as proven in AlphaGo. Following this idea, we train deep convolutional neural networks by supervised learning to predict the moves made by expert Gomoku players from RenjuNet dataset. We put forward a number of deep neural networks with different architectures and different hyper- parameters to solve this problem. With only the board state as the input, the proposed deep convolutional neural networks are able to recognize some special features of Gomoku and select the most likely next move. The final neural network achieves the accuracy of move prediction of about 42% on the RenjuNet dataset, which reaches the level of expert Gomoku players. In addition, it is promising to generate strong Gomoku agents of human-level with the move prediction as a guide. Keywords—Gomoku; move prediction; deep learning; deep convo- lutional network Fig. 1. Example of positions from a game of Gomoku after 58 moves have passed. It can be seen that the white win the game at last. I.
    [Show full text]
  • Strategy Game Programming Projects
    STRATEGY GAME PROGRAMMING PROJECTS Timothy Huang Department of Mathematics and Computer Science Middlebury College Middlebury, VT 05753 (802) 443-2431 [email protected] ABSTRACT In this paper, we show how programming projects centered around the design and construction of computer players for strategy games can play a meaningful role in the educational process, both in and out of the classroom. We describe several game-related projects undertaken by the author in a variety of pedagogical situations, including introductory and advanced courses as well as independent and collaborative research projects. These projects help students to understand and develop advanced data structures and algorithms, to manage and contribute to a large body of existing code, to learn how to work within a team, and to explore areas at the frontier of computer science research. 1. INTRODUCTION In this paper, we show how programming projects centered around the design and construction of computer players for strategy games can play a meaningful role in the educational process, both in and out of the classroom. We describe several game-related projects undertaken by the author in a variety of pedagogical situations, including introductory and advanced courses as well as independent and collaborative research projects. These projects help students to understand and develop advanced data structures and algorithms, to manage and contribute to a large body of existing code, to learn how to work within a team, and to explore areas at the frontier of computer science research. We primarily consider traditional board games such as chess, checkers, backgammon, go, Connect-4, Othello, and Scrabble. Other types of games, including video games and real-time strategy games, might also lead to worthwhile programming projects.
    [Show full text]
  • Collaborative Go
    Distributed Computing Master Thesis COLLABORATIVE GO Alex Hugger December 13, 2011 Supervisor: S. Welten Prof. Dr. R. Wattenhofer Distributed Computing Group Computer Engineering and Networks Laboratory ETH Zürich Abstract The game of Go is getting more and more popular in Europe. Its simple rules and the huge complexity for computer programs make it very interesting for a study about collaborative gaming. The idea of collaborative Go is to play a simple two player game in a setup of teams behaving as one single player instead of one versus one. During this thesis, we implemented a framework allowing to play collaborative Go. The framework is heavily based on the existing Go Text Protocol allowing an inte- gration into already existing Go servers or a competition with existing Go programs. Multiple players are merged through the use of different decision engines into one single player. Two decision engines were implemented based on different interac- tion schemes. One is based on a voting process whereas the other one decides on the final move of a team by applying a Monte Carlo simulation. The final experiments show that collaborative gaming is very interesting and atten- tion attracting for the players. Especially the voting mechanism used in the collab- orative player achieved a high user satisfaction. For an automated decision engine, we found out that it is very important to make the decision process as transparent as possible to all users, as this increases the level of the acceptance even when a bad decision was made. Acknowledgments During the accomplishment of this master thesis, a lot of people supported and guided me to a successful completion of the work.
    [Show full text]
  • Combining Tactical Search and Deep Learning in the Game of Go
    Combining tactical search and deep learning in the game of Go Tristan Cazenave PSL-Universite´ Paris-Dauphine, LAMSADE CNRS UMR 7243, Paris, France [email protected] Abstract Elaborated search algorithms have been developed to solve tactical problems in the game of Go such as capture problems In this paper we experiment with a Deep Convo- [Cazenave, 2003] or life and death problems [Kishimoto and lutional Neural Network for the game of Go. We Muller,¨ 2005]. In this paper we propose to combine tactical show that even if it leads to strong play, it has search algorithms with deep learning. weaknesses at tactical search. We propose to com- Other recent works combine symbolic and deep learn- bine tactical search with Deep Learning to improve ing approaches. For example in image surveillance systems Golois, the resulting Go program. A related work [Maynord et al., 2016] or in systems that combine reasoning is AlphaGo, it combines tactical search with Deep with visual processing [Aditya et al., 2015]. Learning giving as input to the network the results The next section presents our deep learning architecture. of ladders. We propose to extend this further to The third section presents tactical search in the game of Go. other kind of tactical search such as life and death The fourth section details experimental results. search. 2 Deep Learning 1 Introduction In the design of our network we follow previous work [Mad- Deep Learning has been recently used with a lot of success dison et al., 2014; Tian and Zhu, 2015]. Our network is fully in multiple different artificial intelligence tasks.
    [Show full text]
  • (CMPUT) 455 Search, Knowledge, and Simulations
    Computing Science (CMPUT) 455 Search, Knowledge, and Simulations James Wright Department of Computing Science University of Alberta [email protected] Winter 2021 1 455 Today - Lecture 22 • AlphaGo - overview and early versions • Coursework • Work on Assignment 4 • Reading: AlphaGo Zero paper 2 AlphaGo Introduction • High-level overview • History of DeepMind and AlphaGo • AlphaGo components and versions • Performance measurements • Games against humans • Impact, limitations, other applications, future 3 About DeepMind • Founded 2010 as a startup company • Bought by Google in 2014 • Based in London, UK, Edmonton (from 2017), Montreal, Paris • Expertise in Reinforcement Learning, deep learning and search 4 DeepMind and AlphaGo • A DeepMind team developed AlphaGo 2014-17 • Result: Massive advance in playing strength of Go programs • Before AlphaGo: programs about 3 levels below best humans • AlphaGo/Alpha Zero: far surpassed human skill in Go • Now: AlphaGo is retired • Now: Many other super-strong programs, including open source Image source: • https://www.nature.com All are based on AlphaGo, Alpha Zero ideas 5 DeepMind and UAlberta • UAlberta has deep connections • Faculty who work part-time or on leave at DeepMind • Rich Sutton, Michael Bowling, Patrick Pilarski, Csaba Szepesvari (all part time) • Many of our former students and postdocs work at DeepMind • David Silver - UofA PhD, designer of AlphaGo, lead of the DeepMind RL and AlphaGo teams • Aja Huang - UofA postdoc, main AlphaGo programmer • Many from the computer Poker group
    [Show full text]
  • Deep Learning for Go
    Research Collection Bachelor Thesis Deep Learning for Go Author(s): Rosenthal, Jonathan Publication Date: 2016 Permanent Link: https://doi.org/10.3929/ethz-a-010891076 Rights / License: In Copyright - Non-Commercial Use Permitted This page was generated automatically upon download from the ETH Zurich Research Collection. For more information please consult the Terms of use. ETH Library Deep Learning for Go Bachelor Thesis Jonathan Rosenthal June 18, 2016 Advisors: Prof. Dr. Thomas Hofmann, Dr. Martin Jaggi, Yannic Kilcher Department of Computer Science, ETH Z¨urich Contents Contentsi 1 Introduction1 1.1 Overview of Thesis......................... 1 1.2 Jorogo Code Base and Contributions............... 2 2 The Game of Go5 2.1 Etymology and History ...................... 5 2.2 Rules of Go ............................. 6 2.2.1 Game Terms......................... 6 2.2.2 Legal Moves......................... 7 2.2.3 Scoring............................ 8 3 Computer Chess vs Computer Go 11 3.1 Available Resources......................... 11 3.2 Open Source Projects........................ 11 3.3 Branching Factor .......................... 12 3.4 Evaluation Heuristics........................ 13 3.5 Machine Learning.......................... 13 4 Search Algorithms 15 4.1 Minimax............................... 15 4.1.1 Iterative Deepening .................... 16 4.2 Alpha-Beta.............................. 17 4.2.1 Move Ordering Analysis.................. 18 4.2.2 History Heuristic...................... 18 4.3 Probability Based Search...................... 19 4.3.1 Performance......................... 20 4.4 Monte-Carlo Tree Search...................... 21 5 Evaluation Algorithms 23 i Contents 5.1 Heuristic Based........................... 23 5.1.1 Bouzy’s Algorithm..................... 24 5.2 Final Positions............................ 24 5.3 Monte-Carlo............................. 25 5.4 Neural Network........................... 25 6 Neural Network Architectures 27 6.1 Networks in Giraffe........................
    [Show full text]
  • SAI: a Sensible Artificial Intelligence That Targets High Scores in Go
    SAI: a Sensible Artificial Intelligence that Targets High Scores in Go F. Morandin,1 G. Amato,2 M. Fantozzi, R. Gini,3 C. Metta,4 M. Parton,2 1Universita` di Parma, Italy, 2Universita` di Chieti–Pescara, Italy, 3Agenzia Regionale di Sanita` della Toscana, Italy, 4Universita` di Firenze, Italy [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] Abstract players. Moreover, one single self-play training game is used to train 41 winrates, which is not a robust approach. Finally, We integrate into the MCTS – policy iteration learning pipeline in (Wu 2019, KataGo) the author introduces a heavily modi- of AlphaGo Zero a framework aimed at targeting high scores fied implementation of AlphaGo Zero, which includes score in any game with a score. Training on 9×9 Go produces a superhuman Go player. We develop a family of agents that estimation, among many innovative features. The value to be can target high scores, recover from very severe disadvan- maximized is then a linear combination of winrate and expec- tage against weak opponents, and avoid suboptimal moves. tation of a nonlinear function of the score. This approach has Traning on 19×19 Go is underway with promising results. A yielded a extraordinarily strong player in 19×19 Go, which multi-game SAI has been implemented and an Othello run is is available as an open source software. Notably, KataGo is ongoing. designed specifically for the game of Go. In this paper we summarise the framework called Sensi- ble Artificial Intelligence (SAI), which has been introduced 1 Introduction to address the above-mentioned issues in any game where The game of Go has been a landmark challenge for AI re- victory is determined by score.
    [Show full text]