This article presents a tutorial on how to use repeated game theory as a framework for algorithm development in communication networks. The article starts by introducing the basis of one-stage games and how the outcome of such games can be predicted, through iterative elimination and Nash equilibrium. In communication networks, however, not all problems can be modeled using one-stage games. Some problems can be better modeled through multi-stage games, as many problems in communication networks consist of several iterations or decisions that need to be made over time. Of all the multi-stage games, the infinite-horizon repeated games were chosen to be the focus in this tutorial, because optimal equilibrium settings can be achieved, contrarily to the suboptimal equilibria achieved in other types of game. With the theoretical concepts introduced, it is then shown how the developed game theoretical model, and devised equilibrium, can be used as a basis for the behavior of an algorithm, which is supposed to solve a particular problem and will be running at specific network devices. Copyright © 2015 John Wiley & Sons, Ltd.