Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/08/15 13:05:53 (10 years ago)
Author:
gkronber
Message:

#2283: force selection of untried alternatives

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GrammaticalOptimization-gkr/HeuristicLab.Algorithms.GrammaticalOptimization/SequentialDecisionPolicies/GenericPolicy.cs

    r12294 r12295  
    4848      foreach (var afterState in afterStates) {
    4949        if (!Done(afterState)) {
    50           activeAfterStates[idx] = GetValue(afterState);
     50          if (GetTries(afterState) == 0)
     51            activeAfterStates[idx] = double.PositiveInfinity;
     52          else
     53            activeAfterStates[idx] = GetValue(afterState);
    5154          actionIndexMap[idx] = originalIdx;
    5255          idx++;
     
    179182      Console.WriteLine(Q.Values.Max());
    180183      var topTries = Q.Keys.OrderByDescending(key => T[key]).Take(50);
    181       var topQs = Q.Keys.Where(key=>key.Contains(",")).OrderByDescending(key => Q[key]).Take(50);
     184      var topQs = Q.Keys.Where(key => key.Contains(",")).OrderByDescending(key => Q[key]).Take(50);
    182185      foreach (var t in topTries.Zip(topQs, Tuple.Create)) {
    183186        var id1 = t.Item1;
Note: See TracChangeset for help on using the changeset viewer.