Statistical analysis of scores in Glines - a possible reflection of success and failure in life activities.#

Zbigniew Koziol,

#First published in 2000. This version contains updated links.


Glines, an open-source ( game on Linux has been played many times for collecting a large range of scores. Statistical analysis.of the results shows that the probability distribution function of scores, P, may be approximated with a large accuracy and in a broad range of scores achieved (S) with a formula P(s) = sa/(1+sa), where s=S/k, and k is a certain normalization number while a has a value of about 3.6 in the studied case. It is suggested that the results presented reflect in fact a wide variaty of human success and failure in ordinary life activities.


There is an almost unexplored broad research field near the borders of sociology, psychology, physics, mathematics, where human behaviour could be studied in order to describe certain it's features in a quantitative way. As an example of that kind of studies let us remind an early publication on the Internet in 2000, by this author (1). The problem discussed there concerned statistical description of members activities on e-mail discussions lists. It has been shown than that a probability distribution function describing frequency of occuring of new messages (postings) to mailing lists resembles well Fermi-Dirac distribution of electron holes in a semiconductor. Or, within the accuracy of the available data, that distribution could be approximated well by a simpler function of the type P(s) = sa/(1+sa), as defined in the Abstract.

In this article, another aspect of human behaviour is researched and it is shown that it is very well described by similar statistical functions. This time, the success of playing a computer board game Glines is analyzed.

Glines (2) is the Gnome (open-source desktop for Linux operating system) port of the once popular Windows game called Color Lines (Fig. 1). The game's objective is to align as often as possible five balls or more of the same color causing them to disappear. The game ends when there is no space left on the board for new balls. More detailed information about playing Glines, and it's rules, can be found at

Fig. 1. Screen capture of Glines board. The aim of the game is to align 5 or more balls of the same colour, which is rewarded by 10 or more points, respectively. After that these aligned balls disapear from the board. Every single movement of a ball causes 3 new balls to appear on the board (these displayed at the top). Unless a movement caused alignement of balls - in that case new balls do not fall to the board. Positions and colours of new balls are random. The situation captured on this figure is such that it is difficult to make any reasonable new move. But in Glines, like in life, one should never give up, because the future is unknown, and it happens, though not often that a seemingly hopeless situation may become averted into a success.

For the purpose of this article, it is sufficient to know that playing successfuly this game requires some concentration of the player and advance predicting of possible development of the game. However, playing Glines involves also a factor of chance, since the position of new objects on the board is random. Hence, from one side some thinking is required in order to achieve high score in the game, some basic at least experience with the game and developing certain rules of playing succesfuly. But in any case the factor of randomness may prevent a good player from reaching a high score. In practice, it looks like that a concentration and slow, wise decisions of the player help significantly to achieve high score. Hence, a success is largely determined by the condition of mind of the player, his or her patience, and concentration. In this meaning, the success and failure in this game reflect somehow success and failure of human beings in real life, where similarely both wise decisions of a person and chance play a significant role.


The game has been played more than 2000 times, over a few months period of time. A small change in it's source code before compiling it did allow to store all results in a log file. Every efford has been made in order to achieve accurate data: once the game has been started, it has always been played till the end, with an attempt to achive the highest possible score, regardless of the situation on the board. Otherwise, the results would be spoiled by arbitrary data.

Fig. 2 shows a simple presentation of the results: on a diagram with double-logarithmic axes numbers of scores from within certain range, is represented by vertical bars. For instance, the most left vertical bar shows that there was one only result observed falling into the range between 10 and 20 points earned.

Fig. 2. Number of scores for certain ranges of scores as a function of score. Double-logarithmic axes are used. For instance, the most left vertical bar shows that there was one only result observed falling into the range between 10 and 20 points earned. While most results, about 1000, has been observed for scores between 320 and 640.

Results on Fig. 2 do not help us much in finding out a good mathematical description of them. More useful is drawing the total number of results observed for scores, i.e. showing a probability distribution function. This is done in Fig. 3.

Fig. 3. Probability distribution function for all results as a function of score (blue points). The red curve has been drawn according to Eq. 1, where s=Score/k, with the following parameters: k=398, a=3.6

Blue points represent observed number of scores, normalized by the total number of results (see the note 3). The shape of the curve obtained clearly resembles for instance a Fermi-Dirac (F-D) probability distribution function. Since however there is no reason visible for using F-D function in this case, a simpler one is tryed:

P(s) = sa/(1+sa),      (Eq. 1)

where s=Score/k, and k is a certain normalization number while a is an exponent. The red curve on Fig. 3 has been drawn with the following parameters: k=398, a=3.6. The same parameters are used on all remaining figures, showing that these values and this function does indeed describe experimental results very well.

Fig. 4. Probability distribution function for all results as a function of score drawn on diagram with double-logarithmic axes. Red and black lines are from calculation, according to Eq.1 for P(s) and according to 1-P(s). The results illustrate a very good coincidence of the data with Eq. 1 both for small and for large scores.
Fig. 5. One more diagram showing a good coincidence of the data points with the calculated result according to Eq. 1 (red line). Positions on the lower horizontal axis are calculated by using that equation, hence all the data fall into a stright line with the slope of 1.
Fig. 6. A diagram similar to that one on Fig. 1, except now the points represent total number of results obtained in a range of scores from 10 to 20, from 20 to 30, etc, i.e. in every case the range is 10. The solid red line is drawn according to an equation which is derivative of Eq. 1.


To the best of my knowledge, this is the first attempt to find a mathematical formula for probability distribution function describing scores in a computer game achieved by a player. It is likely however that the results have much in common with a broad range of human activities and as such these first studies might begin a development of a new descipline devoted to success and failure of humans in various life circumstances, a subject mathematicaly not explored, as far as the author is aware. This work and earlier studies (1) provide a likely evidence of the existence of a broad unexplored field for research.

There is a more practical aspect of this study, more directely exploitable. Glines is a one of plenty of games that could be played on computers for enjoyement. However, computer users more and more often start to spend money on games where real profits could be earned, like for instance by participating in online-gambling. The author believes that playing some of online casino games could bring the player more likely rewards once he or she understands better their chances. These chances could certainly be modeled by some mathematical functions and after that evaluated calmely before real money is thrown into a real game.

The k and a values of parameters used for fitting the data in Eq. 1 are certainly to some extend player-specific.


The author would like to thank to Shooby Ban, one of the authors of Glines, for discussions and help in preparing the source code of the game for logging of all results of the game. An acknowledgement deserves also the idea of using the type of function described in the text for fitting the results. That suggestion has been made first by Dr Mikolaj Sawicki of John A. Logan College in Illinois.


(1) Zbigniew Koziol, unpublished work; See also: Zbigniew Koziol, Activity of mailing lists users - a mathematical approach.

(2) Five or More,

(3) The total number of results was 2172. We are however attempting to fit to the data a certain probaility distribution function that would describe well the results in the limit of infinite number of experimental data. Hence, in order to normalize the data properly, we shold devide the number of observed results not by 2172 but by a number slightely larger. A best fitting has been observed when the number 2190 has been used for normalization.