Artificial Neural Networks Explained
or
Predicting Soccer Match Results in the English Premier League
Julian T Rubin
BA, Open University of Israel


A Simple Explanation

Jimmy decides to get rich with sports betting by predicting correctly outcomes of soccer matches in the English Premier League.

Jimmy develops a strategy. For this he identifies factors that influence game results, such as standings before the match of the two teams concerned, success rate at home and away and current team performance (form) which is the aggregated results of the last three games.

Jimmy collects the scores from the first six league rounds and analyzes them. His journey to wealth begins from the seventh round because at this point he has enough data to rely on.

For each game that Jimmy aspires to bet on, he builds a table and gives both teams points (weight) for the three factors he identified as having a possible impact on the game outcome based on the results accumulated from the first six games of both teams.

Jimmy begins with the first factor – the standings before the match. Since there are 20 teams in the English Premier League, the first team in the table gets 20 points, the last one 1 point, while the second team in the table gets 19 points, and so on in a descending order. (For the purpose of awarding points Jimmy turns the table upside down).

Now, Jimmy uses existing tables of home and away games, compiled by the Football Association, and the point score each team gets is according to the same principle applied in the previous paragraph.

Jimmy also compiles a table that reflects only the achievements of the teams in the last three rounds and each team gets a score point by applying the same method as before (first team 20 points, sixth team 15 points).

Jimmy writes down, in a new table he builds, the points scored by both teams playing against each other in the upcoming league round and summarizes them. The team that gets more points is marked as the winner. If the gap does not exceed 4 points – then the result is marked as a tie, since Jimmy has discovered in his study, based on the first six rounds of the season, that in most cases a gap of up to 4 points predicts a tie best.

Now Jimmy begins his betting work.

Below, data based on the first six rounds regarding the upcoming game between Liverpool and Manchester United:

Liverpool
Home match
Standings: 2 (19 points out of 20)
Standings (home): 3 (18 points out of 20)
Standings (last three games): 1 (20 points out of 20)
Total: 57 points
Manchester United
Away match
Standings: 6 (15 points out of 20)
Standings (away): 5 (16 points out of 20)
Standings (last three games): 7 (14 points out of 20)
Total: 45 points
Liverpool vs Manchester United
Factor Liverpool Manchester United
Standings 19 15
Home / Away 18 16
Last Three Games 20 14
Total 57 45
Result 57 - 45 > 4
Prediction Liverpool is the Winner

Weight

At one point Jimmy notices that not all factors have the same importance (weight) in predicting game results, as he thought so far, and it has been a mistake to award points to the three factors ranged from 1 to 20 in all cases. For example, Jimmy has discovered that the position in the table, before the game, is more important than the home / away factor and also than the success of a team in the last three rounds. It is possible that during the season, with the accumulation of additional data, things change again and it would be necessary to update the weight of these factors accordingly.

For this purpose, for each prospective game Jimmy builds a table and gives both teams a point score for the three factors he has identified as having a possible impact on a soccer game results, as before, but also taking into consideration each factor unique weight.

Jimmy finds out that in 60% of cases (weight = 0.6) the team ranked higher wins the match. Therefore, the team placed at the top of the table of 20 teams, such as the English Premier League, gets 12 points after taking the weight into consideration (20 X 0.6) instead of 20 till now; the team in last place gets 0.6 points (1 X 0.6) while the team in seventh place 8.4 points (14 X 0.6).

Jimmy also discovers that 50% of the games (weight = 0.5) end with the home team winning, 30% of the games are tied and 20% (weight = 0.2) end with the away team winning. Accordingly, a home team located at the top of the home games table gets 10 points (20X 0.5); the ninth team will get only 6 points (12 X 0.5) and so on.

In the same way, an away team, if placed fifth in the away games table gets 3.2 points (16 X 0.2).

Jimmy finds out that 54% of the games involving a team doing better in the last three games (form), the team wins also the fourth game. Therefore Jimmy compiles a new table, as before, in which the teams are placed according to their achievements in the last three games only. Therefore the team that is ranked 11th in the table of the last three rounds will receive 5.4 points (10 X 0.54).

Now, Jimmy records in a table the point score he awarded the factors of the two teams playing against each other in the next round, just as in the basic method shown at the top of the page, but by multiplying the score by the weight of the corresponding factor as we showed above. The team that gets more points is marked the winner. If the gap does not exceed 3 points between the teams, the result will be marked as a tie, since Jimmy has found in his study that in most cases a gap of up to 3 points, with the use of weights, predicts a draw best and not 4 points as before.

Learning

Jimmy monitors the game outcomes throughout the season and as time and rounds pass by he accumulates more useful information about the ideal weights he shoud use now and replace the old ones. For example, it may turn out that home / away determines more than it seemed at first, while the position in the table has decreased in importance. Jimmy may find out that a gap of up to 5 points between the teams predicts a tie better than 3 points as he has thought before, following the weight method he has introduced, and more significant is the success of the teams in the last two rounds than in the last three as he has thought so far. Therefore Jimmy updates occasionally the weights accordingly. For example, if the cumulative information indicates that 65% of the teams placed higher in the table win and not 60% as it has been so far – the new weight would be 0.65 and not 0.6.

Over time Jimmy may discover other factors that affect game results like the history of encounters between the two teams in the past, goal difference or number of goals conceded by the teams – which could be quantified, and Jimmy would be able to update his tables accordingly. Other significant factors may be, injuries, bad relationships as well as coach replacement – factors that cannot be quantified and Jimmy will have to figure out a way, in the future, to include these factors in his tables.

The process by which Jimmy updates the weight of the factors that affect game results, based on information accumulated throughout the season and by this improves game prediction is called learning. If the process is performed by an automated computer system then it is machine learning.

At some point Jimmy comes to the conclusion that his method favors the better team and therefore his method is not able to predict cases where a team wins against all odds – what we call upsets – which is the key to successful sports betting. Jimmy begins to research in depth upsets in order to introduce a new numerical factor able to perfect soccer predictions. For now, Jimmy is still trying to solve this issue and as soon as there will be results we are going to tell the world.

How does an Artificial Neural Network Really Work

The explanation above is a simplistic demonstration of how an artificial neural network works. This example demonstrates how future events can be predicted based on past events – in this case predicting soccer match outcomes. A practical real artificial neural network is much more complicated.

In a more formal language, an Artificial Neural Network (ANN) is a computational mathematical model inspired by cognitive processes in the brain that occur in a natural neural network (collection of neurons in the brain) and used in machine learning. This type of network usually contains a large number of information units (neurons) with interconnected inputs and outputs. The form of connection between the units simulates how the neurons in the brain connect. The use of artificial neural networks is especially common in many systems of artificial intelligence that perform a variety of tasks – face recognition, handwriting recognition, finance market forecasting, speech recognition systems, image recognition, translation and more.

In fact, an artificial neuron is actually a black box (usually marked as a circle) into which various numerical data is inserted and it emits a numerical result at the output according to an algorithm. The information to which the neuron is exposed increases over time and accordingly the weight of the various inputs varies also – what we call learning.

Changing weights and updating them is called also training. In machine learning we start with random weights and change them according to a formula and compare each time the output to the truth results (in our case the results of soccer games) and repeat this process until we reach statistically optimal results – a process of trial and error.

In the figure below, a three-cell network simulates the table shown above. The rectangular cell is an arithmetic-logical unit (ALU) whose function is to calculate the difference between the scores of the two teams to determine the outcome of the game.

An artificial neural network composed by 3 cells




webmaster@julianTrubin.com


Last updated: April 2021
Copyright © 2021 Julian Rubin