Skip to content
Albert Julius Liu edited this page Sep 11, 2017 · 13 revisions

The paper

Balancing Zero-sum Games with One Variable per Strategy

Python

This is the primary implementation.

zerosum.balance package: The core functionality

This package contains the core functionality of defining handicap functions and performing the optimization that finds the balancing handicaps.

Base classes

The base module contains the base classes. Implementing a handicap function is done by extending one of these base classes. See the above page for details.

Specific handicap functions

The following specific handicap functions are implemented:

Note that the concrete classes (e.g. MultiplicativeBalance) are imported directly into the parent zerosum.balance package, so it is not necessary to import the specific modules; they may be accessed as e.g. zerosum.balance.MultiplicativeBalance.

examples package

Example scripts presented as Jupyter notebooks.

From the paper:

Additional examples:

Other packages and modules

  • zerosum.excel: Microsoft Excel integration via user-defined functions (UDFs). Requires xlwings. Unfortunately this only works on Windows.
  • zerosum.nash: Determines the Nash equilibrium of a game using linear programming.
  • tests: Unit tests.

gs (Google Apps Script)

This contains a Google Apps Script implementation of Sinkhorn's algorithm, which computes handicaps for a multiplicative handicap function. An example Google Sheet running this script can be found here; make a copy to play around with it.

This does not implement any of the other handicap functions.