Chapter 8. Deploying bots in the wild

 

This chapter covers

  • Building an end-to-end application to train and run a Go bot
  • Running a frontend to play against your bot
  • Letting your bot play against other bots locally
  • Deploying your bot on an online Go server

By now, you know how to build and train a strong deep-learning model for Go move prediction—but how do you integrate this into an application that plays games against opponents? Training a neural network is just one part of building an end-to-end application, whether you’re playing yourself or letting your bot compete against other bots. The trained model has to be integrated into an engine that can be played against.

In this chapter, you’ll build a simple Go model server and two frontends. First, we provide you with an HTTP frontend that you can use to play against your bot. Then, we introduce you to the Go Text Protocol (GTP), a widely used protocol that Go bots use to exchange information, so your bot can play against other bots like GNU Go or Pachi, two freely available Go programs based on GTP. Finally, we show you how to deploy your Go bot on Amazon Web Services (AWS) and connect it against the Online Go Server (OGS). Doing so will allow your bots to play ranked games in a real environment, compete against other bots and human players worldwide, and even enter tournaments. To do all this, we’ll show you how to tackle the following tasks:

8.1. Creating a move-prediction agent from a deep neural network

8.2. Serving your Go bot to a web frontend

8.3. Training and deploying a Go bot in the cloud

8.4. Talking to other bots: the Go Text Protocol

8.5. Competing against other bots locally

8.6. Deploying a Go bot to an online Go server

8.7. Summary