ATOM4(6) | Games Manual | ATOM4(6) |
NAME¶
atom4 - two-player color puzzle gameSYNOPSIS¶
atom4 [ -a n ] [ -d level ] [ -mt | -mx ]DESCRIPTION¶
Atom-4 is a two-player color manipulation game played with colored spherical pieces on a board divided into equilateral triangles. The player who first makes a row of 4 pieces of the right color wins. There is an AI mode where you play against the computer. By default, atom4 runs in 2-player mode. Since 2-player mode is controlled from the same terminal, it can be used as a "practice" mode to acquiant oneself with the color change rules or to explore strategic possibilities in a controlled way. atom4 supports both a curses-based text interface and an X11 interface. The interface can be selected with the -m option. By default, atom4 launches the X11 interface if the $DISPLAY environment variable is set, and the curses-based interface otherwise.OPTIONS¶
- -a n
- Play against AI player. n must be either 1 or 2, specifying which player the AI will be.
- -d n
- Set AI player's difficulty level, where n is an integer from 0 or larger. The default difficulty setting is 2. This version of Atom-4 uses a real min-max algorithm; higher difficulty settings are actually much harder unlike in the previous version. However, be warned that very high difficulty settings will likely be very slow, as the game tree grows very quickly.
- -h
- Shows a summary of command-line options that atom4 takes.
- -mt
- Selects the text (curses-based) interface. The curses-based interface requires a terminal with color capabilities; at least 9 colors are needed.
- -mx
- Selects the X11 interface. The X11 interface requires an X display that supports at least 8-bit color. Note that currently, atom4 will always connect to the X server specified in the $DISPLAY environment variable.
TEXT MODE INTERFACE¶
The text mode interface requires a terminal that supports at least 9 colors. The game controls are straightforward: the keypad arrow keys move the cursor around the board, and the Enter key or the Space key will place the piece being played on the board. The panel on the right shows you which piece is currently being played. Gameplay proceeds until one of the players win. You can press q at any time to quit the game. After one of the players win, the game will pause. You can either press n to proceed to the next round, or q to quit.X11 INTERFACE¶
The X11 interface requires an X display which has at least 8-bit color. Gameplay on the X11 interface is simple: the color wheel in the right panel shows the order in which pieces are played, as well as the current player (number in the center). The current piece being played is highlighted in the color wheel. To play the piece, simply locate your mouse over the desired spot on the board and click the mouse button. When it is your turn to play, and your mouse hovers over a legal position where you can place a piece, the piece you are currently playing will appear under the mouse cursor. It is not actually placed on the board until you click the mouse button. At any time during the game, you may press q to quit the game. After one of the players win, press n to proceed to the next round.GAME RULES¶
(Adapted from the README file.) Pieces may be placed only on the vertices of the triangular game board divisions, and only if touching two other pieces which themselves are adjacent to each other (i.e., it must form an equilateral triangle with two adjacent pieces already on the board). Theoretically, the board is unlimited in size; practically, we limit it to 16 vertices across and 16 rows down. Pieces have 8 different colors in total, grouped into 4 groups:- black
- red, green, and blue (the primary, or "additive", colors)
- yellow, cyan, and purple (the secondary, or "subtractive", colors)
- white
red yellow
\ /
purple --*-- green
/ \
blue cyan
1) If the
neighbouring piece has an adjacent color on the wheel, it does not change. For
example, if red is placed next to yellow or purple, the yellow or purple
remains the same.
2) If the
neighbouring piece has a color 60 degrees away on the wheel, then it changes
to the color in between. For example, if red is placed next to green, the
green turns into a yellow. If a red is placed next to a blue, the blue turns
purple.
3) If the
neighbouring piece has the opposite color on the wheel, then it changes to
either white or black, depending on what type of color the new piece is. If
the new piece is an additive piece, the neighbour becomes white; if it is a
subtractive piece, the neighbour becomes black. For example, if a red is
placed next to a cyan, the cyan turns white; but if a cyan is placed next to
the red, the red turns black.
4) If the new
piece is additive and the neighbouring piece is black, then the black changes
to the same color as the new piece. Similarly, if the new piece is subtractive
and the neighbouring piece is white, then the white changes to the same color
as the new piece.
5) If the new
piece is additive and the neighbouring piece is white, then the white does not
change, but the color change effect "propagates" through the white
to the piece behind the white. That piece then changes as though the new piece
had been placed next to it. If it is also white, then the effect continues
propagating in the same direction, in a straight line, until it reaches a
non-white piece, and then changes that non-white piece as though the new piece
was placed next to it. If an empty spot is reached before a non-white piece,
then nothing happens. Because of this effect, white pieces are also called
"additive propagators".
6) Similarly,
if the new piece is subtractive and the neighbouring piece is black, the color
change effect propagates in the direction of the black until it reaches a
non-black piece, which then changes as though the new piece had been placed
next to it. Nothing happens if an empty spot is reached before a non-black
piece. Hence, black pieces are also called "subtractive
propagators".
(Another way to understand the color changes is treat colors as red, green, and
blue combinations. Additive colors always try to "add" themselves to
their neighbours: red + green = yellow (red & green together); red + cyan
(green & blue) = white. Subtractive colors try to remove their complement
color from their neighbours. For example, the complement of yellow (red &
green) is blue; so yellow tries to remove blue from its neighbours. Hence,
when yellow (red & green) is placed next to cyan (green & blue), the
cyan turns green (loses the blue component). Similarly, when cyan (green &
blue) is placed next to white (red & green & blue), it removes its
complement, red, from the white; so the white becomes cyan as well. In other
words, additive colors behave like colored light, whilst subtractive colors
behave like colored paint.)
The initial state of the board consists of two pieces, green and purple, in the
middle of the board, touching each other. The first player then plays a red,
the second player plays a yellow, and then the first player plays a green, and
so on, taking turns, going clockwise around the color wheel. The first person
to make a row of 4 propagators wins.
If the game is played in multiple rounds, the second player may start first on
the second round, using a subtractive piece, and then the first player with
the next color clockwise on the color wheel, and so on. The starting
configuration always consists of two pieces, one 30 degrees counterclockwise
from the starting color on the color wheel, and the other 60 degrees
clockwise; each touching the other in the center of the board.