Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13518 for branches


Ignore:
Timestamp:
01/15/16 17:42:35 (9 years ago)
Author:
aballeit
Message:

#2283 UCT parameter c -> refactoring

Location:
branches/HeuristicLab.Problems.GrammaticalOptimization/Evaluation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GrammaticalOptimization/Evaluation/MainWindow.xaml

    r13492 r13518  
    4848                          Width="200" Margin="5,0,0,0"
    4949                          SelectionChanged="ComboBoxPolicies_OnSelectionChanged"></ComboBox>
    50                 <TextBlock Name="TextBlockEpsylon" Text="Epsylon:" Visibility="Hidden" Margin="5,0,0,0" VerticalAlignment="Center"></TextBlock>
    51                 <TextBox Name="TextBoxEpsylon" Text="{Binding Epsylon}" Visibility="Hidden" Margin="5,0,0,0" VerticalAlignment="Center" Width="50"></TextBox>
     50                <TextBlock Name="TextBlockEpsylon" Text="PolicyParameter:" Visibility="Hidden" Margin="5,0,0,0" VerticalAlignment="Center"></TextBlock>
     51                <TextBox Name="TextBoxEpsylon" Text="{Binding PolicyParameter}" Visibility="Hidden" Margin="5,0,0,0" VerticalAlignment="Center" Width="50"></TextBox>
    5252                <Button Name="ButtonRun" Margin="5,0,0,0" Click="ButtonRun_OnClick" Height="22" VerticalAlignment="Top">Run</Button>
    5353                <Button Name="ButtonPause" Margin="5,0,0,0" Click="ButtonPause_OnClick" IsEnabled="False">Pause</Button>
  • branches/HeuristicLab.Problems.GrammaticalOptimization/Evaluation/MainWindow.xaml.cs

    r13492 r13518  
    11using System.Collections.ObjectModel;
     2using System.Globalization;
    23using System.Security.AccessControl;
    34using System.Text;
     
    192193            if (policy == typeof(UCTPolicy))
    193194            {
    194                 policyInstance = new UCTPolicy(vm.Epsylon);
     195                policyInstance = new UCTPolicy(vm.PolicyParameter);
    195196            }
    196197            else if (policy == typeof(ThresholdAscentPolicy))
     
    204205            else if (policy == typeof(EpsGreedyPolicy))
    205206            {
    206                 policyInstance = new EpsGreedyPolicy(vm.Epsylon);
     207                policyInstance = new EpsGreedyPolicy(vm.PolicyParameter);
    207208            }
    208209            else
     
    457458            {
    458459                TextBoxEpsylon.Visibility = Visibility.Visible;
    459                 TextBoxEpsylon.Text = Math.Sqrt(1).ToString();
    460                 TextBlockEpsylon.Text = "Epsylon";
     460                vm.PolicyParameter = 0.5;               
     461                TextBlockEpsylon.Text = "Epsilon";
    461462                TextBlockEpsylon.Visibility = Visibility.Visible;
    462463            }
     
    464465            {
    465466                TextBoxEpsylon.Visibility = Visibility.Visible;
    466                 TextBoxEpsylon.Text = Math.Sqrt(2).ToString();
     467                vm.PolicyParameter = Math.Sqrt(2);
    467468                TextBlockEpsylon.Text = "c";
    468469                TextBlockEpsylon.Visibility = Visibility.Visible;
  • branches/HeuristicLab.Problems.GrammaticalOptimization/Evaluation/ViewModel/EvaluationViewModel.cs

    r12833 r13518  
    122122        }
    123123
    124         private double epsylon;
    125 
    126         public double Epsylon
    127         {
    128             get { return this.epsylon; }
    129             set
    130             {
    131                 this.epsylon = value;
    132                 this.OnPropertyChanged("Epsylon");
     124        private double _policyParameter;
     125
     126        public double PolicyParameter
     127        {
     128            get { return this._policyParameter; }
     129            set
     130            {
     131                this._policyParameter = value;
     132                this.OnPropertyChanged("PolicyParameter");
    133133            }
    134134        }
Note: See TracChangeset for help on using the changeset viewer.