Chapter 7. Learning from data: a deep-learning bot

 

This chapter covers

  • Downloading and processing actual Go game records
  • Understanding the standard format for storing Go games
  • Training a deep-learning model for move prediction with such data
  • Using sophisticated Go board encoders to create strong bots
  • Running your own experiments and evaluating them

In the preceding chapter, you saw many essential ingredients for building a deep-learning application, and you built a few neural networks to test the tools you learned about. One of the key things you’re still missing is good data to learn from. A supervised deep neural network is only as good as the data you feed it—and so far, you’ve had only self-generated data at your disposal.

In this chapter, you’ll learn about the most common data format for Go data, the Smart Game Format (SGF). You can obtain historical game records in SGF from practically every popular Go server. To power a deep neural network for Go move prediction, in this chapter you’ll download many SGF files from a Go server, encode them in a smart way, and train a neural network with this data. The resulting trained network will be much stronger than any previous models in earlier chapters.

Figure 7.1 illustrates what you can build at the end of this chapter.

7.1. Importing Go game records

7.2. Preparing Go data for deep learning

7.3. Training a deep-learning model on human game-play data

7.4. Building more-realistic Go data encoders

7.5. Training efficiently with adaptive gradients

7.6. Running your own experiments and evaluating performance

7.7. Summary