Board

The first module that is called. It updates the board with the last move made,
indicates if there is a ko or if any prisoners were captured, and returns an
error if the move made was not legal. It also answers questions related to
the rule set for the current game, such as whether suicide is legal, or whether
bent four in the corner is automatically dead.

Groups

This module groups stones of the same color together if they are part of the
same group, e.g, if they would be captured as one unit. It returns information
such as the number of liberties for each group.

Random

This module exists for the purpose of producing variability in the output of
various modules. The amount of randomness is specified in the system
config file. It both assigns each move a random rating, and selects one choice
of many for tasks such as choosing among different possible joseki continuations.

Ladder

This module identifies all moves that would produce a ladder, the outcome of
that ladder assuming no ladder breakers, and any moves that would be effective
ladder breakers.

Tesuji

All moves on the board which would be considered to be good moves in the local
context would be identified by this module for both players.

Loose Group

A loose group is a grouping of one or more groups. It represents a collection
of stones that acts as a functional unit, even if it could possibly be split
up by the opponent. Examples are a shimari, or two stones on the third line
separated by two spaces.

Geometry

This module determines basic geometric relations between loose groups, such
as which ones are adjacent to others, which loose groups are closest to
an empty point, and whether one loose group encloses another.

Big Point

This module identifies big points. Thus, during the opening, it would identify
the opportunity to make a shimari, or play on a star point.

Safety

This module performs a simplistic analysis on each loose group to determine
its safety. This analysis occurs early on, and so does not use the more
advanced modules. It can be used by life and death to determine which
groups need a more thorough life and death analysis.

Proverbs

Legal moves are rated by whether they fulfill one or more proverbs,
such as "hane at the end of two stones", or "do not disturb symmetry".

Connection

This module identifies moves which connect or split two groups of stones. The test is
that if the sides alternate moves, can the two groups be linked or split. This would have
to be determined for both black and white making the first move. The strategic
consequences of this, such as does another group die as a result of this connection
or splitting, are not part of this low level analysis.

Shape

Legal moves are rated as to whether they make good shape or bad shape.
There is no strategic analysis done here.

Ko

This module provides methods relating to kos. It keeps a list
of possible ko threats and evaluates which side is likely to
win a ko at any time. When a ko arises, it evaluates the
importance of the ko, and identifies possible ways for dealing
with the ko other than capturing.

Vital Point

This module identifies vital points. It does not take into account factors
such as whether playing at the vital point kills anything.

Tactics

This module is similar to the Tesjui module, but it is a more advanced module,
and so can use the output of more modules to produce its results. This will be
an important module, because at many points in the game there is no overriding
strategic concern, and the player just needs to expand a group or protect a
cutting point. This module will produce moves of that nature. It does not
do a strategic analysis, but finds sequences that are good in a local context.

Life and Death

This module can answer a number of questions about life and death.
These include the standard ones such as the status of each group:
alive, dead, seki, ko, etc. It can also answer questions such as
how to kill groups in two moves for ko threat generation. It also
gives a rating of the safety of each group that is too ill-defined
to be the subject of a traditional life and death problem. This is
a low level module, which does not consider such things as splitting
attacks or the loss of territory elsewhere in defending a group.

Threat

This module generates a list of moves for each side which would be
considered to be threats in some way. This would include forcing
moves, threats to kill groups, threatening to crawl inside of
opponents walls, ataris on groups of stones, etc. This is a
low level module which only locates threats in the local sense.
Thus, it would identify peeps on both sides of a wall, even though
at least one of those moves might make no sense. It would also identify
ataris on groups of stones.

Aji

This module identifies situations where there is more than one
way to play. This could be considered a mid-level module. It does
not try to determine the best way to play, or whether to save the aji
or follow one path, it just presents all of the alternatives and lets
more high-level modules make this decision.

Efficiency

This module evaluates the overall shape of each loose group of stones.
A heavy group would have a low rating. This module is meant to
be used in determining when a group is attacked whether or not it
is worth saving, or is a candidate to be sacrificed. This is a
mid-level module, and does not take into account the strategic
significance of a group, such as whether it is a cutting stone.
It just evaluates its potential for making life when attacked.

Value

This module identifes the importance of each group of stones.
Thus, a single stone which was a peep against a wall of stones
would have a low value, while a cutting stone would have a
high value. This module is meant to refine the output of the
Efficiency module. Thus, a heavy group which contains a
cutting stone would have a high importance, whereas
the Efficiency module would give it a low importance.

Safety2

This module performs a mid level analysis of the safety of
each loose group on the board. It can use the results of
the LifeAndDeath, Efficiency, and Value modules in doing
its analysis.

Ko2

This module performs a more high level analysis of kos
than the earlier ko module. For example, it can use the results
of the Life and Death and Value modules in coming up with ko threats.

State

The state of the game. Some possible states are: fuseki, middle game,
end game, and ko. This information can be used by other modules,
for example the ko module might only generate ko threats when a ko
exists, or the fuseki module can stop generating moves after the
game enters the middle game.

Semeai

This module is concerned with situations where two groups are in contact
and only one has room to make two eyes. It determines best play, and
which group will die or if the result would be a seki.

Dame

This module identifies points which cannot be made into territory by either side.

Fight

This module is primarily concerned with dealing with situations
where there is a large fight occurring. This module both
identifies that there is in fact a major fight going on, and
identifies moves for dealing with that fight. It could be described
as a mid-level module, so if there is a fight involving multiple groups
for each side, it could identify sequences of moves that involve sacrificing
each of the friendly groups under attack, but does not make the determination
as to which groups should be saved and which sacrificed.

Connection2

This is a high level module that determines moves that connect
or split two groups of stones. It takes into account many strategic
factors that the Connection module does not, such as
whether connecting the two groups would weaken other groups,
splitting attacks that could be launched against multiple
pairs of connected groups, etc.

Territory

This module identifies possible territory for each side. For
each point of potential territory, a probability of that point
actually becoming territory is given. From this, a score
based only on profit can be determined.

Influence

Analogous to profit, this module identifies the influence for
each side. For each point influenced by nearby stones, the
degree of influence is given. From this, the relative amount
of influence by each side can be determined.

Score

This module uses the output of the profit and influence modules
to determine the score of the game. The estimate of the score
assumes effective use of influence, since the Profit module
give an estimate of the score based solely on territory.

Sacrifice

This module determines whether any groups of stones can be
sacrificed, and the sequence of moves which gives the best
way of doing so.

Invasion

This module determines whether a stone played inside the opponents
framework can live. It is concerned about things such as the
best points for the invasion and whether the invasion needs to be set
up by the use of forcing moves or kos.

Attack and Defense

This is a high level module that uses the evaluation of many of
the other modules to determine whether to attack or defend.
It determines whether to make a defensive move, invade, reduce,
or launch a splitting attack.

Safety3

This module performs a high level analysis of the safety of
each loose group. For example, it takes into account
high level attacks such as splitting or leaning attacks,
the possibility of sacrificing heavy groups, and the
aji or forcing moves available. It takes into account
both the possibility of attacking a loose group as well
as the desirability of doing so.

Miai

This module determines pairs of moves such that if one side
plays one, then the other side needs to play the other.
For example, if a group of stones surrounds four points in
a row, then the two central points are miai. This module
also returns a list of points where those points appear in
more than one set of miai relationships, and determines more
complex sequences where overlapping miai relationships can
be exploited, both for the current player, and the opponent.

Sabaki

This module determines moves or sequences that would make sabaki,
that is, light development in a hostile area of the board.

Kamikaze

This module is only important in situations where the player
is significantly behind in the score, and does not have a very good situation.
This module generates an all out attack that is not reasonable,
but is a last chance at getting back into the game. If the
module cannot find this type of move, then it suggests resigning.

Joseki

This module is both responsible for classifying moves in the corner
as both good and bad, whether or not the corner situation corresponds
to that of any pattern in whatever joseki database the program may have.

Exchange

This module determines moves that would cause the two players
to exchange territory. For example, if the client invades,
rather than attempting to kill the invading stone, the server
could counterattack against an adjacent group, resulting in
each player taking territory from the other.

High Level Probe

This module identifies moves that would be considered to
be high level probes. These are moves that try to reduce
the flexibility of a position of the opponent before deciding
on how to play in a given area.

Sente

This high level module identifies all moves which carry sente.
Each of those moves is evaluated for the impact of the
opponent not answering it.

Fuseki

This module generates moves for the opening phase of the game.

Middle Game

This module attempts to integrate the evaluations of the many
different modules whose output would pertain to play in the
middle game, and produce some high level analysis.

EndGame

This module generates moves for the end game.

Strategy

This is one of the highest level modules, meant to be used
only by the Expert or Move Generator modules. The assumption is that
all possible moves in all possible games can be classified
into one of a number of different categories, which would not
be more than several hundred. Examples of those categories
would be:

Occupy empty corner

Approach single corner stone.

Capture ko.

Hane at the end of N stones.

Surround group.

Play in the center of surrounded group.

Make splitting attack on weak opponents groups.

Hane on the first line in sente in the endgame.

Make a monkey jump in sente.

This module would take a list of the most highly recommended
moves by the lower-level modules, and for each one determine
each of the strategies that that moves fulfills.

Most likely, this module would not be fully defined or implemented
for quite some time. It would only be necessary if the MoveGenerator
module implementations start becoming too complex, and a method is
needed for making them more manageable.

Expert

This module is meant for any module which attempts to generate a move,
but does not solely determine the move.
An example of this would be a neural network that produced a move based
only on the current board position. The output of the different Expert
module implementations can then be used by the move generator.
The purpose of having an Expert module type as opposed to just making these
Move Generator modules is that the output of multiple Expert modules can
be combined by the move generator in determining a move. Thus, unlike the
other module types, multiple implementations of the Expert module type may be
used simultaneously.

Move Generator

This module is by definition the top level module. The lower
level modules that are run are only those that this module
uses, or that other modules that it uses will eventually use. It may
use the Strategy module to determine a move, possibly by
taking the move that has the most different strategies
associated with it. It is not required to do this, and may
use some other algorithm entirely. It is anticipated that
once all of the lower level modules have been fleshed out
and provide a reasonable evaluation of their aspect of the
game, the amount of work on the Move Generator, Expert, and Strategy
modules may exceed all of the work on the other modules
combined. This is the level at which the soul of the program
occurs. Once all of the analysis is done, this is where
the overall approach to the game is implemented. There would
be a great deal of creativity involved at this level, and many
different developers might make an attempt at writing a Move Generator.

Helpers

This is a list of some possible helpers:

Rules - Board

Dictionary - Joseki

FusekiType - Fuseki

Invasion - Attack and Defense

Reducing Move - Attack and Defense

Splitting Attack - Attack and Defense

Live In Enemy Territory - Attack and Defense

Rules

This helper determines which moves are legal or illegal, as
well as rule dependent behavior such as which groups are
alive, and the scoring of situations such as sekis which
can be different between rule sets. A different helper would
be written for each rule set, such as Japanese, Chinese, or AGA.

Dictionary

This helper would access a joseki database, and return any moves which
continue the current position.

FusekiType

This helper would determine moves for a specific type of fuseki,
such as the Chinese Fuseki.

Invasion

This helper would determine moves for invading a moyo.

Reducing Move

This helper would determine moves for reducing a moyo.

Splitting Attack

This helper would determine moves for executing splitting attacks.

Live In Enemy Territory

This helper would determine moves for living inside the opponents territory.