private void CreateFormationVariablesXml() { string UCB1XmlFilePath = "Assets/XMLData/"; string RegretMatchingXmlFilePath = "Assets/XMLData/"; string formationVariablesPath = "Assets/XMLData/"; byte rows = (byte)BoardData.Get().GetRows(); byte columns = (byte)BoardData.Get().GetColumns(); byte maxUnitsInTeam = (byte)aiController.GetMaxUnitsInTeam(); byte unitTypesCount = (byte)System.Enum.GetNames(typeof(UnitType)).Length; uint actionsCount = aiController.GetPossibleActionsCount(); UCB1XmlFilePath += $"UCB1_{rows}x{columns}_{maxUnitsInTeam}_of_{unitTypesCount}_fake.xml"; RegretMatchingXmlFilePath += $"RM_{rows}x{columns}_{maxUnitsInTeam}_of_{unitTypesCount}.xml"; formationVariablesPath += $"FormationVariables_{rows}x{columns}_{maxUnitsInTeam}_of_{unitTypesCount}.xml"; formationVariablesXMLData = new XmlFormationVariables ( rows, columns, maxUnitsInTeam, unitTypesCount, actionsCount, UCB1XmlFilePath, RegretMatchingXmlFilePath ); XmlManaging.CreateFile <XmlFormationVariables>(formationVariablesXMLData, formationVariablesPath); }
private void ReadAlgorithimXml() { UtilityObjectData = XmlManaging.ReadFile <XmlUtilityObjectData>("Assets/XMLData/UCB1_2x4_2_of_4_fake.xml"); aiController.GetTeamFormer().SetUtility(UtilityObjectData.CastToArrayOfArray()); }
public void UpdateXmL() { XmlManaging.CreateFile <XmlUtilityObjectData>(UtilityObjectData, formationVariablesXMLData.UCB1ObjectDataPath); }