The LUDAE project

 goto main page next...

ACADEMY Knowledge

The ACADEMY purpose is to provide a place for cooperation among competing players. This cooperation is translated in a set of common knowledge about the game being played. This knowledge will be mainly the product of the experience gathered by the contests held on successive tournaments. Another knowledge will be provided by active game analysis and learning.

Patterns

Patterns are a coded way to keep playing knowledge. A pattern is a local representation of a certain board position or positions, labeled with a tuple of numbers, the pattern signature. This signature is made of: (a) the number of players proposing the pattern, (b) the average ELO of those players, (c) the expected value of that position, this value ranges from 0.0 (an expected loss) to 1.0 (an expected win), (d) what player are we addressing (1 for first player, 2 for second player).

Next, two pattern samples:


# - x b
# - o -
- x - w


< 3; 165; 0.78; 2 > 

- w
# - o
# - x #
- o -
- -

< 1; 700; 0.12; 1 > 

The left tuple <3;165;0.78;2> means: 3 players with average ELO 165, propose that this pattern has value 0.78 for the second player.

The first lines give local board areas (the left from a square board, the right from a hexagonal board) . The possible letters and meanings inside these areas are (let's assume black color for first player, white color for second player):

-, an empty cell
x, a black soldier
b, a black King
B, a black piece (soldier or King)
1, a cell with no white pieces 
o, a white soldier
w, a white King
W, a white piece
2, a cell with no black pieces
+, a non-cell (to define board edges and corners) 
#, anything

Symmetrical Games

For symmetrical games, all patterns are converted to first player patterns. When happens the second player evaluation, all pattern matching are reversed. This helps reducing the space of possible patterns, and enhance better playing.

Pattern Database

When the tournament begin, players will be inserting relevant patterns (so they assume) on the Academy. Inside the Academy, a matching process compares each new pattern with the available pattern database (pdb) already saved. One of the following things may happen (let the pattern signature be <n, e, v, p>):

The pattern matches a known pattern - the pattern signature <N, E, V, P> is updated using the following procedure:
The number of players is updated by one, i.e., new N = N + 1
The average ELO is updated by, new E = ( E * N + e ) / (N+1)
The expected pattern value is updated by, new V = ( E * V * N + e * v ) / (N+1)
The pattern can be matched by a process of generalization.
The pattern can be matched by a process of specialization.
The pattern does not match any known one - the pattern is included into the pdb.

Generalization

A new pattern A with signature <NA, EA, VA, PA> can match by generalization a known pattern B with signature <NB, EB, VB, PB> if they satisfy the following criteria:

EB + 200 > EA > EB - 200 (i.e., very bad players should not degrade known knowledge, while very good players should try to specialize it - see next section)
PA should be compatible with PB (i.e., it's the same player or the game is symmetric)
The two board positions must have the same non-empty area and the same piece positions. This rule can be overridden in the next cases: On a cell by cell comparison (for brevity, I just present the first player cases), if it is found a pair:
from and turn it to
x b or B B
b B B
- x or b or B 1
x or b or B o or w or W # *

* The don't care (#) signal can only be used if both patterns give a strict positive evaluation (>0.66) or a strict negative evaluation (<0.33). This means that the piece color is irrelevant to evaluate this pattern.

Specialization

A new pattern A with signature <NA, EA, VA, PA> can match by specialization a known pattern B with signature <NB, EB, VB, PB> if they satisfy the following criteria:

EA > EB + 200
PA should be compatible with PB
The two board positions must have the same area and the same piece positions. This rule can be overridden in the next cases: On a cell by cell comparison (for brevity, I just present the first player cases), if it is found a pair:
from A from B  turn it to
x B x
b B b
x or b or B 1 B
x or b or B # # *
(x or b) or B # B or 1 **

* The don't care (#) signal can only be used if both patterns give a strict positive evaluation (>0.66) or a strict negative evaluation (<0.33). This means that the piece color is irrelevant to evaluate this pattern.
**
This is for the other cases, where expectations are not definitive or even contradictory.

Pattern Libraries

To find the perfect Go player, he'd have to be 
a Zen Buddhist in the Opening, 
a Taoist in the Middle-game, 
and a Confucian in the Endgame!
Bill Taylor

This section deals with the question of how a player chooses patterns. It's common use to divide the game tree into three different sections: Opening, Middle-game and Endgame (or using the Go terms: Fuseki, Chuban and Yose). The ACADEMY will keep each one of these patterns in different section, and shape them differently.

Opening

This section will keep the set of board positions of the first N moves of the game (or just a list of moves descriptions, to save memory) used in the reported contests. This set of moves will slowly construct a tree of possible openings (called the Fuseki Library or the Opening Theory of the game), saving the average expected values of all players that reached that position, plus all reported wins, losses and draws.

The Fuseki library should have a fixed maximum limit (say 1000 nodes) and a maximum depth (1/3 of an average game length). When it is full, the leaves with less expected value should be removed (value of node N = expected value of N / tree depth of N) and update the win/loss/draw ration of the father node).

There is also a pruning process, stating that when the leaves of a certain node, have all negative values, erase those nodes (and update the father node), and highly decrease the expected value of that node.

Middle-game

The Chuban library consists of a set of patterns (like the ones defined above). Each pattern intends to be a good tactical move on a local area (in Go, called a Tesuji). 

This library too, should be restricted by a maximum size (say 1000 patterns). When full, the weakest patterns should be removed. A pattern <N, E, V, P> has value N * E * (0.5 - V)2.

Endgame

The Yose library (or Endgame Theory), as the others, should have a maximum size (but a bigger size, perhaps 5000 patterns) to keep the set of patterns gathered in the reported contests.

A pattern is added to the Yose library if one the following restrictions is satisfied:

It is a final position (win, loss or draw).
If the pattern is from a move within the last 20% of the average game length.
Then, the pattern should be multiplied by the final outcome of the game (this is a post-mortem analysis made by the ACADEMY where the result is already known).
If the result is a win, apply the square root to the expected value
If the result is a loss, multiply the expected value by itself (i.e., square it)
If the result is a draw, average the value with 0.5

Endgame patterns can also be generalized and specialized as mentioned. The removal process is the same as in the Chuban library.

Using the ACADEMY

Players should not use only the knowledge of these libraries. That would slow down and eventually freeze the learning process. The use of any library should be restricted to 25% for opening consultations, and middle-game and endgame should be restricted to positions with very low expected value. Players with ELO E should only accept proposals from patterns with an average ELO greater than E-200.

While updating Fuseki and Yose libraries is a post-mortem task for the ACADEMY, pattern insertion (as mentioned early) in the middle-game is an active player process (even it the library is just updated at the end of that contest). There should be a strict criteria for pattern insertion (or the library will quickly be flooded with useless patterns). For now, the best criteria that I find is:

If a player with ELO E is in a contest with an adversary with ELO greater than E-100, and a certain move increases the expected value by 20%, (10% if it goes from below 0.5 to above 0.5), and the game is a draw or a win, then post the pattern to the ACADEMY!

The Esperanto solution

One question posed about the ACADEMY is the question of how to represent in order to share the common knowledge among different players. This problem is solved by using patterns and move lists, since those are included in the common language known by all players: the game itself!

Game Measures

The Academy will also receive constant information from the Arena, about actual contests with player's reports, in order to maintain and update the values for the game measures already discussed.


goto top
goto main page next...