Esempio n. 1
0
 public RLMChallenger(SimulationConfig config, ChallengerSimulationSettings simSettings)
 {
     this.config      = config;
     this.simSettings = simSettings;
     //this.gameRef = gameRef;
     //network.CycleComplete += Rlm_net_CycleComplete;
 }
Esempio n. 2
0
        public void SetSimSettings(ChallengerSimulationSettings simSettings)
        {
            if (simSettings != null)
            {
                this.simSettings        = simSettings;
                SimType                 = simSettings.SimType;
                Sessions                = simSettings.Sessions;
                Hours                   = simSettings.Hours;
                Score                   = simSettings.Score;
                chkSimDisplay.IsChecked = simSettings.EnableSimDisplay;

                if (!simSettings.EncogSelected)
                {
                    //grpEncogSettings.Visibility = Visibility.Collapsed;
                    //this.Height -= grpEncogSettings.Height;
                }
                else
                {
                    HiddenLayers         = simSettings.HiddenLayers;
                    txtHiddenLayers.Text = HiddenLayers.ToString();

                    HiddenLayerNeurons         = simSettings.HiddenLayerNeurons;
                    txtHiddenLayerNeurons.Text = HiddenLayerNeurons.ToString();
                }

                calculateMaxScore();
                simScoreSlider.Value      = simSettings.DefaultScorePercentage;
                simScoreSliderLbl.Content = simScoreSlider.Value + "%";

                switch (SimType)
                {
                case SimulationType.Sessions:
                    rdbSessions.IsChecked = true;
                    txtSimInput.Text      = Sessions.ToString();
                    showScoreSlider(false);
                    break;

                case SimulationType.Time:
                    rdbTime.IsChecked = true;
                    txtSimInput.Text  = Hours.ToString();
                    showScoreSlider(false);
                    break;

                default:
                    rdbScore.IsChecked = true;
                    txtSimInput.Text   = Score.ToString();
                    showScoreSlider(false);     // NOTE hid the score sliders for now
                    break;
                }
            }
        }