AIFA Explained

The **AI Football Association** is a fictional world's football (soccer) leagues designed entirely by AI and neural networks.

All teams, stadiums, and players are generated via a recurrent neural network, and the teams are created in PES 2017 where the games are simulated. This Wiki is where all results, standings, and info for teams and leagues is kept.

## Origin of the project

In 2019, I was introduced to a project run by the Tottenham Hotspur SB Nation blog "Cartilage Free Captain", where they ran a recurrent neural network to generate names of English football clubs. The results were outstanding, and went so far as to creating fictional histories of the clubs, and building the teams in Football Manager.

I wanted to do something exactly like this, and reached out to the blog to get their blessing, and ask for any further resources they may have used. Those who I spoke to were very willing to share both, and so the project was a go. As my preference is to simulate games in a video game, I would be branching off into a different direction. At the time, I was able to get PES 2017 on a Steam sale, and my plan was to create the teams in that game and simulate a full season.

Similar to CFC's project, I used input data for as many names of football clubs as I could find from what I deemed the "Anglo" leagues (England, Scotland, Wales, Northern Ireland, and Ireland). I generated lines and lines of output data, culled through, and selected the 60 teams that would make up my 3 divisions of 20.

Additionally, I used the same parameters to collect names of stadiums and players to create the rosters and grounds of these fictional teams. I also created a map of the fictional country, which I named Neuraland, and placed the cities and locations of these clubs on the map.

The first season of the Neural Premier League, Second, and Third Division was 2020-21. In 2022, I began work on a second project, a German-inspired country/league called Ottostaat, which began in March 2022 under a summer league calendar. Currently, projects to create 2 more associations are in the works, with the current goal to reach a total of 7 associations, and a "Champions League" style continental club competition. For more specific updates, please visit the AIFA Updates page.

## What is a neural network?

The AI used to generate these names is a **recurrent neural network**, which runs using Python. See below in Acknowledgements for the link to the Python code and files used.

My technical knowledge is limited, but to offer a simplified explanation, the algorithm studies the data input file character-by-character, and then attempts to recreate the same process. It identifies patterns, such as strings of letters that often appear together, as well as when numbers or capital letters are used. There are variables that can be applied to the output to affect the variance, length of output, etc, but for the most part, the process is standard.

One thing I have noticed is that the output will contain exact or very, very close data to a name from the input data. (This is a case where the algorithm works TOO well!)

## In-game settings

All games are simulated using PES 2017. At the time I had the interest to create a simulated league, this game was more recent, and on sale on Steam. I have no plans to move this to a newer version of the game, because there is no way to transfer all of the edited teams and players without having to recreate everything manually.

All games are simulated in Coach Mode for both teams in Exhibition, in order to allow for random player Condition with settings that can be changed. In the Team Settings page, lineups are set "by Form", with auto change tactics and offense/defense level changes turned on, and "Early" set as Auto-Subs. Games are set at 25 minutes, substitutions are set to 3 (not updated to 5 to reflect real life), and no other major changes are made to the settings. Because it would be too hard to "enforce" in the game, suspensions due to yellow and red cards do not exist.

Auto Offside Trap is set as off for the first two seasons of the Neuraland FA. However, the first year of Ottostaat's league experimented with turning it on, and this will be done universally going forward.

## Fictional countries and leagues

While the project began with just an English-style league, my plans to expand was focused on groupings of countries. As with Neuraland being the "Anglo" countries, I focused on language families and similarities as best as possible, to both include as much data as possible, and to keep data output consistent enough to resemble the base language(s). This is not a perfect method, but within the limits of the project, it was the best option available.

### Other "non-member" countries

While they haven't been named, the limitations within the PES game used has kept the plans for the project at 7 member associations. However, players may represent fictional countries that are not part of the project or within the AIFA, similar to how players may play for UEFA member clubs while not being from a UEFA member association. As more additions are made to the project, this will be expanded upon.

Initially, 8 member associations were planned, with the "Franco" league having to be cut for now. In addition to this, other language families and parts of the world are definitely present in the player names, and will be recognized as representing the appropriate country at a later date.

## Acknowledgements

* Cartilage Free Captain - The blog where the original Recurrently Generated Football League was created. This is where I got the idea for the project.
* GitHub char-rnn - The GitHub page that contains the Python code used.
* PyTorch.org - Further examples of the char-rnn used to guide my project.
* Azgaar's Fantasy Map Generator - The site used to generate the maps for the countries.
* Pixabay - All images used in crests, logos, and other images are free-to-use from Pixabay.
* PES 2020 Kit Creator - How all the kits are made.
* MyStatsOnline - The site where stats for every game are kept, starting with 2021-22 Neural League season.