Python Sample Code

All sample code is written in Python 3. Code is used for activities and assignments. Code includes a series of Go programs, starting from the basics and leading up to simple re-implementations of many of the techniques used by AlphaGo.


First Go programs - Go0 and Go1

Download go.tgz and unpack it. The go directory contains the following files:

Lecture 2, 2d Go board

Assignment 1 starter code

Download assignment1.tgz and unpack it. For description of contents, see Assignment 1

Lecture 3, St. Petersburg Paradox

Lecture 5, Trees and DAGs

Lecture 6, Profiling and Optimization

Go2, optimized version of Go1

Assignment2 Starter Code

Lecture 7, Blind Search

Lecture 8, Minimax and Alphabeta part 1

Lecture 9, Minimax and Alphabeta part 2

Lecture 10, Minimax and Alphabeta part 3

Lecture 12, Simulation methods

Solutions for Selected Activities


Assignment 3 starter code

Lecture 14, Probabilistic simulation policies and Bernoulli experiments

Lecture 15 and 16, MCTS

Lecture 19, Introduction to Neural Networks (NN)

Go4 and Go5 programs

Created: Jan 3, 2018 Last modified: Nov 16, 2020

Martin Müller and Ting-Han Wei