Warning: This is possibly the least efficient and most spaghetti implementation of the algorithm every made. Enter at your own risk.
This is a basic implementation of a generalization of the backwards induction algorithm to find subgame-perfect Nash equilibria (SPNE) in complete extensive form dynamic games.
A modification of the Centipede game is also included. This lets us specify the number of turns (n), the amount added every turn (k), and the amount that is subtracted from the amount added each turn (k2). Changing these parameters creates a variety of different SPNE.