The Chainreaction domain is the examplary domain for jABC4 which will be used to introduce the first modeling steps.

Chainreaction is also available as standalone game. To download, visit: http://cr.freewarepoint.de/


Rules of the Game

A generic square placeholder image with rounded corners in a figure.
Fig1: A new game starts with an empty board

A new game starts with an empty board, then the players place 1 atom on every turn.

The Chainreaction game is a strategy board game for two players.

The board has 6×5 tiles (“cells“). Initially, they are empty. Each player alternately places one token (“atom“) on a cell that is either empty or belongs to that player. A cell belongs to a player if it contains at least one atom of that player.

Cell Capacity

A generic square placeholder image with rounded corners in a figure.

The capacity of any cell is equal to its amount of horizontal and vertical neighbors

Every cell can hold a fixed amount (“capacity“) of atoms. It is equal to the horizontal and vertical neighbors of the cell. Therefore,

Once a cell contains enough atoms so that it would reach its capacity by adding one more atom, it is considered “critical“. Adding an atom to a critical cell — ergo making it reach its capacity — makes this cell react (see below).

Cell Reaction

A generic square placeholder image with rounded corners in a figure.

When placing an atom onto a critical cell, it explodes.

A cell that has reached its capacity reacts, which means that all atoms on the cell are distributed to the (horizontal and vertical) neighbor cells. Since the amount of neighbors equals the capacity, every neighbor cell receives one atom. If a cell that receives an atom is owned by the opponent it is taken over by the player that started the cell reaction, assimilating all opponent atoms in that cell.

If a neighbor cell reaches its capacity during that process, it will react as well, which leads to chain reactions. This is where its name comes from.

End of Game

The player that conquers all opponent cells wins as soon as the opponent has no cells left.

Glossary


The Chainreaction Domain in jABC4

The Chainreaction scenario is delivered with jABC4 by default. The scenario covers the basic tasks of modeling graphs and comes with a clear goal as well as many preconfigured features that allow for an easy entry and a flat learning curve.

The basic workflow that this domain offers is the creation of a game strategy, which resembles the process that an AI would take in order to evaluate the cell onto which it will place an atom in the next turn.

Game Strategy

A generic square placeholder image with rounded corners in a figure.

Every possible cell gets evaluated separately and receives a higher value the better it is rated.

In short, the purpose of a game strategy is simply to evaluate a single cell based on the situation of that cell. It will lateron be automatically embedded into a framework, that takes over all other tasks such as considering all cells on the board, switching between players, evaluating winning conditions, reaction of critical cells, etc.

The game strategy will be automatically used for those cells only, that the AI is allowed to place upon.

When the game strategy is executed, it will be able to access information about the cell that it is currently evaluating, such as the cells’ position on the board (corner, edge, center) or the amount of critical neighbor cells. Additionally, it can acquire information about the whole board, for example the amount of critical cells on the board or the sum of all atoms owned by a player. Finally, a game strategy may virtually place an atom on the cell that it evaluates currently, in order to take the outcome of this action into account (i.e. the strategy may do a one-step glimpse into the future).

Based on these information, the value of the cell is determined.

Cell Value

A game strategy evaluates exactly one cell and rates it with an integer. The framework will use the game strategy to assign an integer to every active cell. This number represents the value of the cell. The higher a cell value, the more beneficial the game strategy considers placing an atom onto that cell. The smallest value a game strategy may assigns is a 0, so that negative cell value will internally be interpreted as a 0, too.

After the framework has iterated all possible cells and has passed every allowed cell to the game strategy, each cell has been given a cell value ≥ 0. The cell with the highest cell value will automatically be picked and an atom is placed onto it. After that, the AIs’ turn ends.

If there are multiple cells that have the “same highest” cell value, one of those will be chosen randomly.
The Chainreaction domain is the examplary domain for jABC4 which will be used to introduce the first modeling steps.