# Deep Learning and the Game of Go [![Build Status](https://travis-ci.org/maxpumperla/deep_learning_and_the_game_of_go.svg?branch=master)](https://travis-ci.org/maxpumperla/deep_learning_and_the_game_of_go)
This repository is first and foremost a comprehensive machine learning framework for the game of Go, focussing on deep learning techniques. What you'll find here is a library that builds up from the game-play basics to very advanced techniques. In particular, you find code **for early approaches in game AI, intermediate techniques using deep learning, to implementations of AlphaGo and AlphaGo Zero - all presented in one common framework**. You can install this library with pip and follow the `examples` in the `code` folder.
```bash
pip install dlgo
```
On the other hand, this repository at the same time contains [Code](https://github.com/maxpumperla/deep_learning_and_the_game_of_go/tree/master/code), and sample chapters for the book "Deep Learning and the Game of Go" (Manning), available for early access [here](https://www.manning.com/books/deep-learning-and-the-game-of-go), which ties into the library and teaches its components bit by biy. If you're following the code samples from the book, check out the branches for
individual chapters.
*Note for contributors*: To ensure the book stays in sync, consider requesting changes and submitting pull requests against the `improvements` branch, instead of `master` (which we keep reserved for bug fixes etc.).
![dl_go_cover](dl_go_cover.jpg)
## Playable demos
The book is all about getting you started to create your own bots. To make the experience more fun and interactive, we built and deployed several bots showcasing the techniques of the respective chapter. So far you can play:
- **Chapter 4** A tiny tree search bot on a 5x5 board [here](https://www.badukai.com/demos/static/play_mcts_55.html).
- **Chapter 7** A full 19x19 bot powered by a deep neural network trained to predict human moves [here](https://www.badukai.com/demos/static/play_predict_19.html)
- **Chapter 9** A bot playing on a 9x9 board, using policy gradients, [here](https://www.badukai.com/demos/static/play_pg_99.html)
These demos will be available in the [liveBook](https://www.manning.com/books/deep-learning-and-the-game-of-go) version of the book as well.
<iframe src="https://www.badukai.com/demos/static/play_predict_19.html" height="500" width="800" style="border:2px solid grey; background-color: #f8f8f8;"></iframe>
## Table of Contents
1. Toward deep learning: a machine learning introduction
2. Go as a machine learning problem
3. Implementing your first Go bot
4. Playing games with tree search
5. Getting started with neural networks
6. Designing a neural network for Go data
7. Learning from data: a deep learning bot
8. Deploying bots in the wild
9. Enter deep reinforcement learning
10. Reinforcement learning with policy gradients
11. Reinforcement learning with value methods
12. Reinforcement learning with actor-critic methods
13. AlphaGo: Combining approaches
14. AlphaGoZero and AlphaZero: Combining approaches
Appendices
- A. Mathematical foundations with Python
- B. The backpropagation algorithm
- C. Go programs and servers
- D. Training and deploying bots using Amazon Web Services
- E. Submitting a bot to the Online Go Server (OGS)
![chapter_succession](chapter_succession.png)
## Welcome
When AlphaGo hit the news in early 2016, we were extremely excited about this groundbreaking advancement in computer Go. At the time, it was largely conjectured that human-level artificial intelligence for the game of Go was at least 10 years in the future. We followed the games meticulously and didn’t shy away from waking up early or staying up late to watch the broadcasted games live. Indeed, we had good company — millions of people around the globe were captivated by the games against Fan Hui, Lee Sedol, and later, Ke Jie and others.
Shortly after the emergence of AlphaGo, we picked up work on a little open source library we coined [BetaGo](https://github.com/maxpumperla/betago) to see if we could implement some of the core mechanisms running AlphaGo ourselves. The idea of BetaGo was to bring AlphaGo to regular developers. While we were realistic enough to accept that we didn’t have the resources (time, computing power, or intelligence) to compete with Deepmind's incredible achievement, it has been a lot of fun to create our own Go bot. Since then, we’ve had the privilege to speak about computer Go at quite a few occasions.
We strongly believe that the principles underpinning AlphaGo can be taught to a general software engineering audience in a practical manner. Enjoyment and understanding of Go comes from playing it and experimenting with it. It can be argued that the same holds true for machine learning, or any other discipline for that matter. In this book, we hope to use the game of Go as a gateway to the exciting world of deep learning. We start with the classical AI principles for board games. Right from the start, you’ll have a working Go AI that you can play against—although it will be very weak at first. Then we’ll introduce some techniques from the world of deep learning and reinforcement learning. As you learn each technique, you can incorporate it into your Go AI and watch it improve.
If you share some of our enthusiasm for either Go or machine learning, hopefully both, at the end of this book, we’ve done our job. If, on top of that, you know how to build and ship a Go bot and run your own experiments, many other interesting artificial intelligence applications will be accessible to you as well. Enjoy the ride!
没有合适的资源?快使用搜索试试~ 我知道了~
Python-深度学习和围棋的游戏的源码和其他材料
共246个文件
py:145个
js:23个
html:17个
需积分: 49 53 下载量 144 浏览量
2019-08-11
05:53:49
上传
评论 2
收藏 316.93MB ZIP 举报
温馨提示
《深度学习和围棋的游戏》的源码和其他材料
资源推荐
资源详情
资源评论
收起资源包目录
Python-深度学习和围棋的游戏的源码和其他材料 (246个子文件)
config 586B
font-awesome.css 37KB
base.css 716B
Dockerfile 2KB
fontawesome-webfont.eot 162KB
.gitignore 1KB
test_alphago_rl_experience.h5 59.93MB
small_model_epoch_1.h5 47.29MB
small_model_epoch_4.h5 47.29MB
small_model_epoch_2.h5 47.29MB
small_model_epoch_3.h5 47.29MB
small_model_epoch_5.h5 47.29MB
test_alphago_value.h5 30.44MB
test_alphago_rl_policy.h5 27.18MB
test_alphago_sl_policy.h5 13.61MB
betago.hdf5 48.22MB
round_007.hdf5 24.3MB
play_q_99.html 8KB
play_predict_19.html 8KB
play_pg_99.html 8KB
play_random_99.html 8KB
play_mcts_55.html 8KB
example_99.html 8KB
ladder_breaker.html 7KB
under_the_stones.html 7KB
forcing_ko.html 7KB
life_and_death.html 6KB
demoSGF.html 6KB
ladder.html 6KB
the_net.html 5KB
snapback.html 5KB
connecting_groups.html 4KB
alive_group.html 4KB
ch6_simple.html 3KB
generate_advantage_plots.ipynb 67KB
walnut.jpg 248KB
walnut.jpg 248KB
shinkaya.jpg 208KB
shinkaya.jpg 208KB
walnut.jpg 93KB
shinkaya.jpg 72KB
dl_go_cover.jpg 51KB
jquery.min.js 82KB
jgoboard-latest.js 64KB
jgoboard-latest.js 64KB
gtp2ogs.js 63KB
canvas.js 15KB
iframeSizer.contentWindow.min.js 14KB
iframeSizer.contentWindow.min.js 14KB
sgf.js 13KB
board.js 10KB
record.js 5KB
stones.js 3KB
setup.js 3KB
auto.js 3KB
node.js 3KB
util.js 2KB
notifier.js 2KB
coordinate.js 2KB
board.js 2KB
board.js 2KB
board.js 2KB
constants.js 936B
index.js 460B
main.js 87B
package.json 891B
PULL_REQUEST_TEMPLATE.md 555B
README.md 6KB
features-40k.npy 25.61MB
labels-40k.npy 25.61MB
features-200.npy 7.23MB
labels-200.npy 7.23MB
features-20.npy 768KB
labels-20.npy 768KB
mnist.npz 10.96MB
FontAwesome.otf 132KB
chapter_1_MEAP_V01.pdf 2.3MB
chapter_succession.png 257KB
white.png 14KB
white.png 14KB
black.png 13KB
black.png 13KB
white.png 6KB
black.png 6KB
shadow_dark.png 5KB
shadow_dark.png 5KB
shadow.png 4KB
shadow.png 4KB
shadow_dark.png 4KB
shadow.png 3KB
zobrist.py 64KB
sgf.py 26KB
sgf_properties.py 23KB
sgf_grammar.py 16KB
goboard_fast.py 13KB
play_train_eval_value.py 10KB
goboard.py 10KB
play_train_eval_q.py 10KB
play_train_eval.py 10KB
play_train_eval_ac.py 10KB
共 246 条
- 1
- 2
- 3
资源评论
普通网友
- 粉丝: 485
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功