예제 #1
0
        public void initConfigDelegation()
        {
            #region Genetic Configuration

            this.numCycles.Value = GlobalConfiguration.GenerationCount;
            this.numCycles.Tag   = GlobalConfiguration.GetDelegate("GenerationCount");

            this.tbPopulationSize.Value = GlobalConfiguration.PopulationCount;
            this.tbPopulationSize.Tag   = GlobalConfiguration.GetDelegate("PopulationCount");

            this.tbMutationChance.Value = (decimal)GlobalConfiguration.MutationChance;
            this.tbMutationChance.Tag   = GlobalConfiguration.GetDelegate("MutationChance");

            this.tbParentChance.Value = (decimal)GlobalConfiguration.ParentChance;
            this.tbParentChance.Tag   = GlobalConfiguration.GetDelegate("ParentChance");

            this.cbApplyElitist.CheckState = GlobalConfiguration.ApplyElitist ? CheckState.Checked : CheckState.Unchecked;
            this.cbApplyElitist.Tag        = GlobalConfiguration.GetDelegate("ApplyElitist");

            this.cbApplyNaturalSelection.CheckState = GlobalConfiguration.ApplyNaturalSelection ? CheckState.Checked : CheckState.Unchecked;
            this.cbApplyNaturalSelection.Tag        = GlobalConfiguration.GetDelegate("ApplyNaturalSelection");

            #endregion

            #region Genetic Configuration

            this.nmInitialTempature.Value = GlobalConfiguration.InitialTempature;
            this.nmInitialTempature.Tag   = GlobalConfiguration.GetDelegate("InitialTempature");

            this.nmTempatureDecay.Value = (decimal)GlobalConfiguration.TempatureDecay;
            this.nmTempatureDecay.Tag   = GlobalConfiguration.GetDelegate("TempatureDecay");

            this.nmAnnealingInstances.Value = GlobalConfiguration.AnealingInstances;
            this.nmAnnealingInstances.Tag   = GlobalConfiguration.GetDelegate("AnealingInstances");

            #endregion

            #region Performances

            this.nmThreadBulkSize.Value = GlobalConfiguration.Performances.ThreadBulkSize;
            this.nmThreadBulkSize.Tag   = GlobalConfiguration.GetDelegate("ThreadBulkSize");

            #endregion


            #region Assignment

            this.nmBattalionCount.Value = GlobalConfiguration.Assignemnt.BattalionCount;
            this.nmBattalionCount.Tag   = GlobalConfiguration.GetDelegate("BattalionCount");

            this.nmSectorCount.Value = GlobalConfiguration.Assignemnt.SectorCount;
            this.nmSectorCount.Tag   = GlobalConfiguration.GetDelegate("SectorCount");

            #endregion
        }
예제 #2
0
        public void initConfigDelegation()
        {
            #region Genetic Configuration

            this.tbPopulationSize.Value = GlobalConfiguration.PopulationCount;
            this.tbPopulationSize.Tag   = GlobalConfiguration.GetDelegate("PopulationCount");

            this.tbMutationChance.Value = (decimal)GlobalConfiguration.MutationChance;
            this.tbMutationChance.Tag   = GlobalConfiguration.GetDelegate("MutationChance");

            this.tbParentChance.Value = (decimal)GlobalConfiguration.ParentChance;
            this.tbParentChance.Tag   = GlobalConfiguration.GetDelegate("ParentChance");

            this.cbApplyElitist.CheckState = GlobalConfiguration.ApplyElitist ? CheckState.Checked : CheckState.Unchecked;
            this.cbApplyElitist.Tag        = GlobalConfiguration.GetDelegate("ApplyElitist");

            this.cbApplyNaturalSelection.CheckState = GlobalConfiguration.ApplyNaturalSelection ? CheckState.Checked : CheckState.Unchecked;
            this.cbApplyNaturalSelection.Tag        = GlobalConfiguration.GetDelegate("ApplyNaturalSelection");

            this.cbPartialGenomCrossover.CheckState = GlobalConfiguration.PartialGenomCrossover ? CheckState.Checked : CheckState.Unchecked;
            this.cbPartialGenomCrossover.Tag        = GlobalConfiguration.GetDelegate("PartialGenomCrossover");

            this.cbPartialGenomCrossover.CheckState = GlobalConfiguration.PartialGenomCrossover ? CheckState.Checked : CheckState.Unchecked;
            this.cbPartialGenomCrossover.Tag        = GlobalConfiguration.GetDelegate("PartialGenomCrossover");

            this.cbSwitchMutation.CheckState = GlobalConfiguration.SwitchMutation ? CheckState.Checked : CheckState.Unchecked;
            this.cbSwitchMutation.Tag        = GlobalConfiguration.GetDelegate("SwitchMutation");

            #endregion

            #region Performances

            this.nmThreadBulkSize.Value = GlobalConfiguration.Performances.ThreadBulkSize;
            this.nmThreadBulkSize.Tag   = GlobalConfiguration.GetDelegate("ThreadBulkSize");

            #endregion

            #region Assignment

            this.nmBattalionCount.Value = GlobalConfiguration.Assignemnt.BattalionCount;
            this.nmBattalionCount.Tag   = GlobalConfiguration.GetDelegate("BattalionCount");

            this.nmSectorCount.Value = GlobalConfiguration.Assignemnt.SectorCount;
            this.nmSectorCount.Tag   = GlobalConfiguration.GetDelegate("SectorCount");

            #endregion
        }
예제 #3
0
        public void initConfigDelegation()
        {
            #region Genetic Configuration

            this.tbPopulationSize.Value = GlobalConfiguration.PopulationCount;
            this.tbPopulationSize.Tag   = GlobalConfiguration.GetDelegate("PopulationCount");

            this.tbMutationChance.Value = (decimal)GlobalConfiguration.MutationChance;
            this.tbMutationChance.Tag   = GlobalConfiguration.GetDelegate("MutationChance");

            this.tbParentChance.Value = (decimal)GlobalConfiguration.ParentChance;
            this.tbParentChance.Tag   = GlobalConfiguration.GetDelegate("ParentChance");

            this.cbApplyElitist.CheckState = GlobalConfiguration.ApplyElitist ? CheckState.Checked : CheckState.Unchecked;
            this.cbApplyElitist.Tag        = GlobalConfiguration.GetDelegate("ApplyElitist");

            this.cbApplyNaturalSelection.CheckState = GlobalConfiguration.ApplyNaturalSelection ? CheckState.Checked : CheckState.Unchecked;
            this.cbApplyNaturalSelection.Tag        = GlobalConfiguration.GetDelegate("ApplyNaturalSelection");

            this.cbPartialGenomCrossover.CheckState = GlobalConfiguration.PartialGenomCrossover ? CheckState.Checked : CheckState.Unchecked;
            this.cbPartialGenomCrossover.Tag        = GlobalConfiguration.GetDelegate("PartialGenomCrossover");

            this.cbSingleTargetGenome.CheckState = GlobalConfiguration.SingleTargetGenome ? CheckState.Checked : CheckState.Unchecked;
            this.cbSingleTargetGenome.Tag        = GlobalConfiguration.GetDelegate("SingleTargetGenome");

            #endregion

            #region Game Settings

            #region General

            this.tbFriendlyCount.Value = GlobalConfiguration.GameSettings.FriendlyCount;
            this.tbFriendlyCount.Tag   = GlobalConfiguration.GetDelegate("FriendlyCount");

            this.tbEnemyCount.Value = GlobalConfiguration.GameSettings.EnemyCount;
            this.tbEnemyCount.Tag   = GlobalConfiguration.GetDelegate("EnemyCount");

            this.nmGridSize.Value = GlobalConfiguration.GameSettings.GridSize;
            this.nmGridSize.Tag   = GlobalConfiguration.GetDelegate("GridSize");

            #endregion

            #region DeadCount

            this.nmMaxDamage.Value = (decimal)GlobalConfiguration.GameSettings.MaxDamage;
            this.nmMaxDamage.Tag   = GlobalConfiguration.GetDelegate("MaxDamage");

            this.nmMinDamage.Value = (decimal)GlobalConfiguration.GameSettings.MinDamage;
            this.nmMinDamage.Tag   = GlobalConfiguration.GetDelegate("MinDamage");

            this.nmMaxRadius.Value = GlobalConfiguration.GameSettings.MaxRadius;
            this.nmMaxRadius.Tag   = GlobalConfiguration.GetDelegate("MaxRadius");

            this.nmMinRadius.Value = GlobalConfiguration.GameSettings.MinRadius;
            this.nmMinRadius.Tag   = GlobalConfiguration.GetDelegate("MinRadius");

            this.nmMaxAmmunition.Value = GlobalConfiguration.GameSettings.MaxAmmunition;
            this.nmMaxAmmunition.Tag   = GlobalConfiguration.GetDelegate("MaxAmmunition");

            this.nmMinAmmunition.Value = GlobalConfiguration.GameSettings.MinAmmunition;
            this.nmMinAmmunition.Tag   = GlobalConfiguration.GetDelegate("MinAmmunition");

            this.nmMinAccuracyForShot.Value = (decimal)GlobalConfiguration.GameSettings.MinAccuracyForShot;
            this.nmMinAccuracyForShot.Tag   = GlobalConfiguration.GetDelegate("MinAccuracyForShot");

            this.nmMaxAccuracyForShot.Value = (decimal)GlobalConfiguration.GameSettings.MaxAccuracyForShot;
            this.nmMaxAccuracyForShot.Tag   = GlobalConfiguration.GetDelegate("MaxAccuracyForShot");

            #endregion

            #region Price

            this.nmMaxPricePerShot.Value = GlobalConfiguration.GameSettings.MaxPricePerShot;
            this.nmMaxPricePerShot.Tag   = GlobalConfiguration.GetDelegate("MaxPricePerShot");

            this.nmMinPricePerShot.Value = GlobalConfiguration.GameSettings.MinPricePerShot;
            this.nmMinPricePerShot.Tag   = GlobalConfiguration.GetDelegate("MinPricePerShot");

            this.nmMaxImportance.Value = GlobalConfiguration.GameSettings.MaxImportance;
            this.nmMaxImportance.Tag   = GlobalConfiguration.GetDelegate("MaxImportance");

            this.nmMinImportance.Value = GlobalConfiguration.GameSettings.MinImportance;
            this.nmMinImportance.Tag   = GlobalConfiguration.GetDelegate("MinImportance");


            #endregion

            #region Weights

            this.nmDeadCountWeight.Value = (decimal)GlobalConfiguration.GameSettings.DeadCountWeight;
            this.nmDeadCountWeight.Tag   = GlobalConfiguration.GetDelegate("DeadCountWeight");

            this.nmPriceWeight.Value = (decimal)GlobalConfiguration.GameSettings.PriceWeight;
            this.nmPriceWeight.Tag   = GlobalConfiguration.GetDelegate("PriceWeight");

            this.nmImportanceWeight.Value = (decimal)GlobalConfiguration.GameSettings.ImportanceWeight;
            this.nmImportanceWeight.Tag   = GlobalConfiguration.GetDelegate("ImportanceWeight");

            #endregion

            #endregion

            #region Performances

            this.nmThreadBulkSize.Value = GlobalConfiguration.Performances.ThreadBulkSize;
            this.nmThreadBulkSize.Tag   = GlobalConfiguration.GetDelegate("ThreadBulkSize");

            this.cbFixedStrategy.CheckState = GlobalConfiguration.Performances.FixedStrategy ? CheckState.Checked : CheckState.Unchecked;
            this.cbFixedStrategy.Tag        = GlobalConfiguration.GetDelegate("FixedStrategy");

            #endregion
        }