Combinatorial games procedures for Maple

Introduction

This page describes combgame, a set of procedures for working with finite combinatorial game theory in the mathematical software package Maple. These procedures have been tested in Maple V Release 4 and Maple 8. To read them from within Maple use the read statement.

combgame was inspired by David Wolfe's Gamesman's Toolkit, a toolkit written in C under Unix with a similar purpose. The current predominant combinatorial games toolkit is Aaron Siegel's cgsuite. I highly recommend these programs: indeed, mine is quite inefficient compared to them.


Contents

A game with left and right option sets l and r is represented by game(l,r). game is not defined as a function and does not evaluate.

The following is a list of the functions of the procedures. Some of these procedures (for instance cool2) were designed for internal use.


The output format

Games that are numbers are displayed as Maple displays numbers of its internal numeric type. Infinitesimal games that are sums of ups and stars are recognized and displayed as such. ^ denotes up, v down, and a following number is a multiplier (which is omitted if one). Nimbers are represented as *n, where n is omitted if one. When these notations and numbers are catenated, a sum is intended.
For other games the standard notation with braces and slash is used. Multiple slashes are not currently supported.


A sample game using this package

The file toadsandfrogs contains the procedure toadsandfrogs, which evaluates positions in the game Toads-and-Frogs (described in Chapter 1 of Winning Ways). A Toads-and-Frogs position is represented as an ordered list (between square brackets) using 'F' or 'f' for a frog, 'T' or 't' for a toad, and anything else for a space.


Limitations

Due to properties of Maple's concatenation operator, gprint handles games like 1/2|0 poorly. gprint3 is a kluge to make * not evaluate to multiplication, and there are probably assorted other oddities related to the display procedures that I have not found. Many of these could probably be remedied by the use of strings, but the current version avoids strings for compatibility with Maple V release 4.


Changes

3 February 2003: leftoptions, rightoptions, and gsimp make sure that their arguments are games and print an appropriate error message otherwise. Toads-and-Frogs was added.


This page was last modified 14 August 2005.
Up