# Three Row Chomp (i+j+k=constant sheets)

Chomp is a game for two players, described on this Wikpedia page. You can play 4 row chomp on a page of Thomas S. Ferguson, here. See also my page here, for other pictures and more references.
I label my chomp position by i, j, k as in this image:

The following picture shows winning/loosing positions for fixed level = i+j+k. The above right sketch shows how the grid coordinates work. To increase level click on the advance button. The level starts at 10, but you can decrease to zero. To compare with the sheets of Friedman and Landberg, which I drew pictures of here, if we consider that 3 row chomp positions values live in a 3D space, the pictures in their paper are slices through the space with constant k, whereas this page shows slices through the space with constant i+j+k. A slice off a corner of a cube gives a triangle cross section, so the grids here are triangular. Just taking a different cross section of the 3D 3xN chomp space.
This is written in JavaScript and WebGl.

level = i+j+k = 0 mouse is at i, j, k=
change scale: change colour:
Change max level to reload the page with new level.
Your mouse is over a point corresponding to the following position (provided you have moved your mouse over the image, and you are using a browers which supports mouse movement detection; otherwise the picture is just an example position).

• In default display, little black circles are round second player wins, i.e., move to these values to win.
• Use the mouse to drag the grid to view different parts of the grid. In some browsers this is very slow. I have put a gray dot to show where the program thinks the mouse is; you may have to wait for it to catch up with where it actually it.
• Use scale slider to change scale. Auto scale is a normalisation, which can be turned off or on.
• Use advance,+10,+100,back,-10,-100, to change level=i+j+k
• Use the info displayed selector to display different info. This can be used to show the reason all first player winning moves are winning moves. A winning move is winning for first played if there is a move to a winning for second player position. There are 6 possible moves, as given further down this page, so the kind of move to display can be chosen.
• The position of the mouse will determine an (i,j,k) triple, which will be displayed below the grid and in the svg picture of the bar.
• The winning info option allows you to choose what to display. The moves are moves from (i,j,k) to positions of the form (i-ℓ,j,k), (i+ℓ,j-ℓ,k), (0,j-ℓ,k), (i,j+ℓ,k-ℓ), (i+j+ℓ,0,k-ℓ) and (0,0,k-ℓ), as decribed and diagrammed here. Moves type 2, 4 and 5 preserve the sum i+j+k, and so are moves in the same plane as displayed. The other moves are to earlier planes. The win by moves to these planes (moves 1, 3, 6) is comparable to Friedman and Landsberg's winning sheet, except I am passing to moves with smaller i+j+k, whereas their W sheets show wins passing to moves with smaller k (in my notation; my k is their x). Note that there is no winning move of type 6; all positions obtained in this way are rectangles, known to be first player wins.
If you choose to animate the second player wins you can do with or without a trail, which is of second player wins for the previous 20 values of i+j+k, with smaller circle radius the greater the difference between the chosen level and the value of the level at which (I,j,k) is a second player win for some I.
Note, k is constant on rows and increases for higher rows. i increases from the left and j increases from the right. Mouse over will display i,j,k values of dot it is over.
• The red hexagons lie on the line i = (2 - √2)k. The are exactly the points (i,j,k) where |(i - (2-√2)k|<0.208. This is to illustrate the pattern of where the periodic patterns happen. It seems that we almost always get these red hexagons differing from second player wins by either 1 in the i component (and no other difference) or 1 in the k component (and no other difference). However, this pattern is not always true, just quite a lot. The donuts are to illustrate the line where approximately j= (k-1)(√2-1).
Choose second display option (from winning info options) to show these lines.

## Pictures

Here is some example output from the above. Click for bigger versions.

First image is basic display option. A position at (i,j,k) has a particular colour depending on for which level (I,j,k) is a second player win for some I. A black circle is drawn around second player win positions at current level.
Second picture is the first place a periodic pattern with period not 1 occurs, at k=120, circled, as described by Andries E. Brouwer. The third picture shows the configuration this alternates with. The period is two.
A dot at position (i,j,k) is given colour L where (I,j,k) is a second player with with L=I+j+k and I<=i. Once (I,j,k) is a second player win, this forces all subsequent (i,j,k) to be first player wins. The advantage of the i+j+k=const sheets over the k=const sheets is that all of the information about all previous winning moves can easily be seen on one sheet.

### Different display options

I give 12 different display options, showing the different ways a position can be a first player win. you can change the display info selection to give different ways to display the computed data. There are two different looking cases, where either (i,0,level-i) or (0,j,level-j) is a winning move. As in Friedman and Landsberg's winning sheet, it's easy to see that there is a unique winning move for any rectangle (0,0,level), because when each level is constructed, we always add an extra i=0 column, which is empty, and either must get filled with a second player win, unless there is a move at (i,0,level-i), which then forces all the remaining positions to be first player wins at each level (this is a rough explanation, details follow from the algorithm used to construct the winning sheets, where we determine whether a position is first or second player win at a fixed level by working from the right most unfilled position on any k value, up from the bottom (k=0), crossing out positions via moves of type 2 and 4 as we go).

#### level=20

Different data display options, example. This is an example where the winning move from the 3x20 bar removes part of 2 rows. (The extra lines refers to some added points that are not computed from the winning moves data, but are there to indicate the pattern of the winning moves. As described previously on this page.)
Basic data
with extra lines
win by move 1
win by move 2
win by move 3
win by move 4
win by move 5
win by move 1 or 3
win by 2 or 4
1/3 red 2/4/5 blue
second player win
second player win trail

#### level=142

Different data display options, example. This is an example where the winning move from the 3x142 bar removes part of 1 row.
Basic data
with extra lines
win by move 1
win by move 2
win by move 3
win by move 4
win by move 5
win by move 1 or 3
win by 2 or 4
1/3 red 2/4/5 blue
second player win
second player win trail

Notice that win by move 5 picture is blank when the highest dot (P position with largest k value) in the second player win picture is on the left side of the triangle (ie., has i=0). The win by move 1 or 3 picture is most comparable with the winning sheets of Friedman and Landsberg.

Sketch of second player wins when there is a second player win with i=0 for some k,j. We start at position A, and construct row by row, up to positions B, C, then D. If C actually has j=0, then the path terminates, otherwise it continues to D.

Sketch of first player wins, describing winning move type. Move types are as described here.

More examples.
level 26 picture:

Level 112 picture: