Welcome to SKAI - A project by RobbiTheFox and J.
The goal is to create an AI which is capable of building a proper economy to supply an army in the multiplayer meta.
In our current approach, we want to train an LSTM (long short-term memory) to do a time-series-multiclass-classification. That means, that at each tick the model decides whether a building has to be placed and if so, what kind of building.
But training the LSTM requires data. This is the part where we need your help!
You're probably wondering, what data we collect. Those who are fluent in Lua can just check the script, but we created a list for those who are not:
Installation:
Multiplayer:
We setup the datacollection script as a small mod, which can be downloaded here: DataCollection.zip
Go to your settlers directory. There you should have a folder called "MP_SettlerServer" which contains a folder called "Mods". Unzip the DataCollection.zip there, such there is "./MP_SettlerServer/Mods/DataCollection_main.lua" and "./MP_SettlerServer/Mods/DataCollection/DataCollection.bba".
Then, go to "./extra2/shr/maps/user/" and create a new empty folder called "s5kai". The sampled data will be stored there.
Singleplayer:
There is now also a mod for the singleplayer (important: SP(ext)!): DataCollection_SP.lua. Save the Lua file in the directory "./CSinglePlayer/Mods/".
For the mod to run properly, you need to install the multiplayer mod. The script for the singleplayer mod references the bba which is used for the mp.
If you just want the mod to run in singleplayer but not in multiplayer, just delete the "./MP_SettlerServer/Mods/DataCollection_main.lua"
The directory "s5kai" in "./extra2/shr/maps/user/" is needed for the singleplayer mod as well.
Additionally:
There are two more important steps, in order to have the LuaDebugger.WriteTableToFile function work properly:
1) You need to have the Lua debugger v0.6.4, which is the version that is available via the s5Updater.
v1.x.x requires a manual input of the target directory at which the file should be saved.
v5.x.x, which is the version provided by the MPUpdater, does not have an implementation of LuaDebugger.WriteTableToFile.
2) Depending on your system setup, you might need to start the MPUpdater as an admin. Otherwise the program does not have the privilege to write the file in "./extra2/shr/maps/user/s5kai/". If you do not want to start the MPUpdater as an admin, you can unpack the bba, adjust the path in the script and repack it.
As previously stated, you can find the generated data at "./extra2/shr/maps/user/s5kai/" as a lua file, which contains a table with the sampled features and targets.
You can upload all your sampled games here:
The goal is to create an AI which is capable of building a proper economy to supply an army in the multiplayer meta.
In our current approach, we want to train an LSTM (long short-term memory) to do a time-series-multiclass-classification. That means, that at each tick the model decides whether a building has to be placed and if so, what kind of building.
But training the LSTM requires data. This is the part where we need your help!
You're probably wondering, what data we collect. Those who are fluent in Lua can just check the script, but we created a list for those who are not:
- Features (denoted as x):
- 1. Maximum number of available village centers for the player during the building phase.
- 2. Current attraction limit.
- 3. Currently avaible attraction space.
- 4. Current motivation.
- 5.-10. Current resources.
- 11. Number of serfs.
- 12.-15. Number of pits.
- 16.-20. Number of resource piles, including wood piles.
- 21.-25. Number of currently available resources per pile type.
- 26.-94. For each tree type: Estimation (we do not have a good solution for that yet) of the number of available trees per player.
- 95.-124. Amount of workers without sleep and food for each worker class.
- 125. Peacetime.
- 126. Number of players.
- 127.-191. Tech states
- Targets (denoted as y):
- 1.-73. Building actions: Placing a new building or upgrading an existing.
- 74.-128. Research actions: Completing the research of a technology.
- 129.-131. Serf usage for building ressources.
Installation:
Multiplayer:
We setup the datacollection script as a small mod, which can be downloaded here: DataCollection.zip
Go to your settlers directory. There you should have a folder called "MP_SettlerServer" which contains a folder called "Mods". Unzip the DataCollection.zip there, such there is "./MP_SettlerServer/Mods/DataCollection_main.lua" and "./MP_SettlerServer/Mods/DataCollection/DataCollection.bba".
Then, go to "./extra2/shr/maps/user/" and create a new empty folder called "s5kai". The sampled data will be stored there.
Singleplayer:
There is now also a mod for the singleplayer (important: SP(ext)!): DataCollection_SP.lua. Save the Lua file in the directory "./CSinglePlayer/Mods/".
For the mod to run properly, you need to install the multiplayer mod. The script for the singleplayer mod references the bba which is used for the mp.
If you just want the mod to run in singleplayer but not in multiplayer, just delete the "./MP_SettlerServer/Mods/DataCollection_main.lua"
The directory "s5kai" in "./extra2/shr/maps/user/" is needed for the singleplayer mod as well.
Additionally:
There are two more important steps, in order to have the LuaDebugger.WriteTableToFile function work properly:
1) You need to have the Lua debugger v0.6.4, which is the version that is available via the s5Updater.
v1.x.x requires a manual input of the target directory at which the file should be saved.
v5.x.x, which is the version provided by the MPUpdater, does not have an implementation of LuaDebugger.WriteTableToFile.
2) Depending on your system setup, you might need to start the MPUpdater as an admin. Otherwise the program does not have the privilege to write the file in "./extra2/shr/maps/user/s5kai/". If you do not want to start the MPUpdater as an admin, you can unpack the bba, adjust the path in the script and repack it.
As previously stated, you can find the generated data at "./extra2/shr/maps/user/s5kai/" as a lua file, which contains a table with the sampled features and targets.
You can upload all your sampled games here: