Worksheet Basics

Contents

Entering Games

You can type games directly into the worksheet.  For example, click on the window labeled "Worksheet 1" and enter the following:

1/2vv*2

This represents the game 1/2 + double-down + *2.  In general, you can enter combinations of numbers, ups and downs, and nimbers just as you'd expect.  The symbol ^ is used for up, v for down, and * for nimbers.  To enter, say, 5.up, you could type either ^^^^^ or ^5.

More complicated games can be entered using braces and slashes.  For example:

{2||1|0,*}

Expressions containing slashes must be enclosed in braces.  That is, to enter the game 1|0, you must type {1|0}.  Ambiguous expressions, such as {1|0|-1}, will be rejected; you'd need to enter {1||0|-1} or {1|0||-1} instead.

Combinatorial Game Suite recognizes a wide variety of common games and displays them using standard shorthand notation (such as +2 for tiny-two).  Here's a few to try (make sure to enter each on a separate line):

{0||0|-2}
{0|v*}
{1,1*|-1,-1*}

{0||0|-2} could also be entered as Tiny(2).

This tutorial contains many more examples of commands that you can enter into the worksheet.  If you're interested in seeing the results, but you don't want to type everything in manually, you can copy-paste directly from this tutorial into the worksheet.  Simply highlight the command with the mouse and select "Copy" from the Edit menu.  Then click back on the Worksheet and select "Paste" from the Edit menu.  Make sure to copy each command separately onto its own line of the Worksheet.

Operations on Games

You can enter sums and products directly. . is used for Norton product. For example:

{3|2} + {2|0}
4.{2||1|0}
1/8.^

There are nine comparison operators:  ==  <=  >=  <  >  !=  <|  |>  <>  (Respectively: equals, less than or equal to, greater than or equal to, less than, greater than, not equal to, less than or confused with, greater than or confused with, confused with.)  For example, try entering:

^^ > *
0 <| ^*

Other common operations can be entered as method calls. Some examples to try:

Mean({3||2|1})
Temperature({3||2|1})
Plot(Thermograph({3||2*|1}))
AtomicWeight({^^|vv})
Cool({3||2|1},1/2)
Freeze({3||2|1})
Heat(*,3)
Overheat(1/2,1,2)
Dissociate({3||2|1})
OrdinalSum(*7,1)

Many more are available as well; see the glossary of methods for a complete list. Variable assignments are permitted, e.g.:

G := {3||2|1}
Freeze(G)

And multiple statements can be strung together as a single command using semicolons, so the above could be rewritten on a single line as:

G := {3||2|1}; Freeze(G)

Note that output is generated only for the last command.  If a command ends with a semicolon, no output will be generated at all.

Types and Canonical Forms

Every object in Combinatorial Game Suite has a type associated with it. Objects such as ^^, {3||2|1}, etc., are canonical games, but CGSuite also supports games that are not in canonical form.  In this way, positions in a game such as Domineering are distinguished from their canonical forms.

For example, try entering the following:

H := DomineeringRectangle(4,4)

This assigns to H the Domineering position represented by an empty 4x4 grid.  Note that Combinatorial Game Suite does not yet try to calculate the canonical form of H. The canonical form of H can be obtained by explicit user request, using the Canonicalize method:

Canonicalize(H)

Alternatively, you can use the shorthand C(H).  Of course we could have just typed:

C(DomineeringRectangle(4,4))

Several other games are included as examples, including Amazons, Clobber, Fox and Geese, Konane, and Toads and Frogs.  Typically, positions can be entered as a sequence of strings, separated by commas; each string corresponds to a single row in the grid.  For example, try entering:

A := Amazons("L..X.","R....")

As always, C(A) calculates the canonical form of A.

Entering actual game positions via the worksheet is somewhat cumbersome.  A more intuitive interface is provided by the graphical explorer, which is described in the next section of this tutorial, Using the Explorer.

Exercises

1. Let G be the game {2||1|*}.  Calculate the canonical forms of G + G and G + G + G + G.  Compute the mean and temperature of G.  How does G compare with 1 and 1*?

2. Use the LeftOptions and RightOptions commands to determine the canonical form of ^5.

3. Let H be the canonical form of the 4x4 Domineering rectangle that we calculated above.  Try comparing H with small positive and negative numbers.  Make a conjecture as to whether or not H is an infinitesimal, and then use IsInfinitesimal(H) to verify it.  How does H compare with various tinies?

4. Heat *6 by 1.  Note that only the first few lines of the canonical form are displayed.  Click on the "More ..." button to display the full canonical form.

5. Try to find constraints on positive numbers a, b, c (a > b) such that {a|b} + +c = {a+c|b+c}.


Continue on to Using the Explorer