An extensive game simulator and animated visualizer for 2D battles drawn with inspiration from Totally Accurate Battle Simulator (TABS). Define units and learn patterns of behaviour to train Machine Learning algorithms.
GNU General Public License v3.0
19
stars
9
forks
source link
Error in simulate_k when number of teams are different #5
In examples/notebook2 I am receiving an error after changing Magmaguard team to a third team name in the starwars-cloneswars.csv dataset.
The issue appears to be due to the battle now containing 3 teams after loading the unit dataset file, but the simulate_battle is only returning a result for the unique teams in M.
Generically: this error happens when the number of unique teams loaded into the battle object is different than the number of teams that are added via create_armies
Solution: I suppose you can just make sure to add armies for all of the teams that are loaded into the battle object.
I found this when playing around with examples/notebook2 which loads a number of units from the csv dataset file but only runs a sim using two unit types which are in three army groups, and represent only two of the three unique teams in the dataset file (after I changed the Magmaguard to a third team name).
In examples/notebook2 I am receiving an error after changing Magmaguard team to a third team name in the starwars-cloneswars.csv dataset.
The issue appears to be due to the battle now containing 3 teams after loading the unit dataset file, but the simulate_battle is only returning a result for the unique teams in M.
Generically: this error happens when the number of unique teams loaded into the battle object is different than the number of teams that are added via create_armies
Solution: I suppose you can just make sure to add armies for all of the teams that are loaded into the battle object.
I found this when playing around with examples/notebook2 which loads a number of units from the csv dataset file but only runs a sim using two unit types which are in three army groups, and represent only two of the three unique teams in the dataset file (after I changed the Magmaguard to a third team name).