- Timestamp:
- 06/23/15 20:00:14 (9 years ago)
- Location:
- branches/HeuristicLab.Problems.GrammaticalOptimization
- Files:
-
- 473 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GrammaticalOptimization/GrammaticalOptimization.sln
r12099 r12503 68 68 EndProjectSection 69 69 EndProject 70 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Evaluation", "Evaluation\Evaluation.csproj", "{D043325A-097F-4512-A8FC-CF706577FA46}" 71 EndProject 72 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynamicDataDisplay", "DynamicDataDisplay\DynamicDataDisplay.csproj", "{ECD37682-DF7E-409F-912D-0965634556B5}" 73 EndProject 70 74 Global 71 75 GlobalSection(SolutionConfigurationPlatforms) = preSolution 72 76 Debug|Any CPU = Debug|Any CPU 73 77 Release|Any CPU = Release|Any CPU 78 ReleaseXBAP|Any CPU = ReleaseXBAP|Any CPU 74 79 EndGlobalSection 75 80 GlobalSection(ProjectConfigurationPlatforms) = postSolution … … 78 83 {CB9DCCF6-667E-4A13-B82D-DBD6B45A045E}.Release|Any CPU.ActiveCfg = Release|Any CPU 79 84 {CB9DCCF6-667E-4A13-B82D-DBD6B45A045E}.Release|Any CPU.Build.0 = Release|Any CPU 85 {CB9DCCF6-667E-4A13-B82D-DBD6B45A045E}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 86 {CB9DCCF6-667E-4A13-B82D-DBD6B45A045E}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 80 87 {EEA07488-1A51-412A-A52C-53B754A628B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 81 88 {EEA07488-1A51-412A-A52C-53B754A628B3}.Debug|Any CPU.Build.0 = Debug|Any CPU 82 89 {EEA07488-1A51-412A-A52C-53B754A628B3}.Release|Any CPU.ActiveCfg = Release|Any CPU 83 90 {EEA07488-1A51-412A-A52C-53B754A628B3}.Release|Any CPU.Build.0 = Release|Any CPU 91 {EEA07488-1A51-412A-A52C-53B754A628B3}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 92 {EEA07488-1A51-412A-A52C-53B754A628B3}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 84 93 {524CBD70-6F99-46AF-AD00-A0BC9FD1175B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 85 94 {524CBD70-6F99-46AF-AD00-A0BC9FD1175B}.Debug|Any CPU.Build.0 = Debug|Any CPU 86 95 {524CBD70-6F99-46AF-AD00-A0BC9FD1175B}.Release|Any CPU.ActiveCfg = Release|Any CPU 87 96 {524CBD70-6F99-46AF-AD00-A0BC9FD1175B}.Release|Any CPU.Build.0 = Release|Any CPU 97 {524CBD70-6F99-46AF-AD00-A0BC9FD1175B}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 98 {524CBD70-6F99-46AF-AD00-A0BC9FD1175B}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 88 99 {24408F7D-EE0F-4886-A08B-EC324D662E47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 89 100 {24408F7D-EE0F-4886-A08B-EC324D662E47}.Debug|Any CPU.Build.0 = Debug|Any CPU 90 101 {24408F7D-EE0F-4886-A08B-EC324D662E47}.Release|Any CPU.ActiveCfg = Release|Any CPU 91 102 {24408F7D-EE0F-4886-A08B-EC324D662E47}.Release|Any CPU.Build.0 = Release|Any CPU 103 {24408F7D-EE0F-4886-A08B-EC324D662E47}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 104 {24408F7D-EE0F-4886-A08B-EC324D662E47}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 92 105 {3A2FBBCB-F9DF-4970-87F3-F13337D941AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 93 106 {3A2FBBCB-F9DF-4970-87F3-F13337D941AD}.Debug|Any CPU.Build.0 = Debug|Any CPU 94 107 {3A2FBBCB-F9DF-4970-87F3-F13337D941AD}.Release|Any CPU.ActiveCfg = Release|Any CPU 95 108 {3A2FBBCB-F9DF-4970-87F3-F13337D941AD}.Release|Any CPU.Build.0 = Release|Any CPU 109 {3A2FBBCB-F9DF-4970-87F3-F13337D941AD}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 110 {3A2FBBCB-F9DF-4970-87F3-F13337D941AD}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 96 111 {17A7A380-86CE-482D-8D22-CBD70CC97F0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 97 112 {17A7A380-86CE-482D-8D22-CBD70CC97F0D}.Debug|Any CPU.Build.0 = Debug|Any CPU 98 113 {17A7A380-86CE-482D-8D22-CBD70CC97F0D}.Release|Any CPU.ActiveCfg = Release|Any CPU 99 114 {17A7A380-86CE-482D-8D22-CBD70CC97F0D}.Release|Any CPU.Build.0 = Release|Any CPU 115 {17A7A380-86CE-482D-8D22-CBD70CC97F0D}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 116 {17A7A380-86CE-482D-8D22-CBD70CC97F0D}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 100 117 {14BEC23F-63FD-4954-B8AE-E2F4962E9B57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 101 118 {14BEC23F-63FD-4954-B8AE-E2F4962E9B57}.Debug|Any CPU.Build.0 = Debug|Any CPU 102 119 {14BEC23F-63FD-4954-B8AE-E2F4962E9B57}.Release|Any CPU.ActiveCfg = Release|Any CPU 103 120 {14BEC23F-63FD-4954-B8AE-E2F4962E9B57}.Release|Any CPU.Build.0 = Release|Any CPU 121 {14BEC23F-63FD-4954-B8AE-E2F4962E9B57}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 122 {14BEC23F-63FD-4954-B8AE-E2F4962E9B57}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 104 123 {31171165-E16F-4A1A-A8AB-25C6AB3A71B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 105 124 {31171165-E16F-4A1A-A8AB-25C6AB3A71B9}.Debug|Any CPU.Build.0 = Debug|Any CPU 106 125 {31171165-E16F-4A1A-A8AB-25C6AB3A71B9}.Release|Any CPU.ActiveCfg = Release|Any CPU 107 126 {31171165-E16F-4A1A-A8AB-25C6AB3A71B9}.Release|Any CPU.Build.0 = Release|Any CPU 127 {31171165-E16F-4A1A-A8AB-25C6AB3A71B9}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 128 {31171165-E16F-4A1A-A8AB-25C6AB3A71B9}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 108 129 {E8138227-0C64-4E85-B676-21D3B97F254F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 109 130 {E8138227-0C64-4E85-B676-21D3B97F254F}.Debug|Any CPU.Build.0 = Debug|Any CPU 110 131 {E8138227-0C64-4E85-B676-21D3B97F254F}.Release|Any CPU.ActiveCfg = Release|Any CPU 111 132 {E8138227-0C64-4E85-B676-21D3B97F254F}.Release|Any CPU.Build.0 = Release|Any CPU 133 {E8138227-0C64-4E85-B676-21D3B97F254F}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 134 {E8138227-0C64-4E85-B676-21D3B97F254F}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 112 135 {8B4C199E-C08B-479E-9B82-6AE5B113459E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 113 136 {8B4C199E-C08B-479E-9B82-6AE5B113459E}.Debug|Any CPU.Build.0 = Debug|Any CPU 114 137 {8B4C199E-C08B-479E-9B82-6AE5B113459E}.Release|Any CPU.ActiveCfg = Release|Any CPU 115 138 {8B4C199E-C08B-479E-9B82-6AE5B113459E}.Release|Any CPU.Build.0 = Release|Any CPU 139 {8B4C199E-C08B-479E-9B82-6AE5B113459E}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 140 {8B4C199E-C08B-479E-9B82-6AE5B113459E}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 116 141 {2C115235-8FA9-4F7F-B3A0-A0144F8A35CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 117 142 {2C115235-8FA9-4F7F-B3A0-A0144F8A35CA}.Debug|Any CPU.Build.0 = Debug|Any CPU 118 143 {2C115235-8FA9-4F7F-B3A0-A0144F8A35CA}.Release|Any CPU.ActiveCfg = Release|Any CPU 119 144 {2C115235-8FA9-4F7F-B3A0-A0144F8A35CA}.Release|Any CPU.Build.0 = Release|Any CPU 145 {2C115235-8FA9-4F7F-B3A0-A0144F8A35CA}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 146 {2C115235-8FA9-4F7F-B3A0-A0144F8A35CA}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 147 {D043325A-097F-4512-A8FC-CF706577FA46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 148 {D043325A-097F-4512-A8FC-CF706577FA46}.Debug|Any CPU.Build.0 = Debug|Any CPU 149 {D043325A-097F-4512-A8FC-CF706577FA46}.Release|Any CPU.ActiveCfg = Release|Any CPU 150 {D043325A-097F-4512-A8FC-CF706577FA46}.Release|Any CPU.Build.0 = Release|Any CPU 151 {D043325A-097F-4512-A8FC-CF706577FA46}.ReleaseXBAP|Any CPU.ActiveCfg = Release|Any CPU 152 {D043325A-097F-4512-A8FC-CF706577FA46}.ReleaseXBAP|Any CPU.Build.0 = Release|Any CPU 153 {ECD37682-DF7E-409F-912D-0965634556B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 154 {ECD37682-DF7E-409F-912D-0965634556B5}.Debug|Any CPU.Build.0 = Debug|Any CPU 155 {ECD37682-DF7E-409F-912D-0965634556B5}.Release|Any CPU.ActiveCfg = Release|Any CPU 156 {ECD37682-DF7E-409F-912D-0965634556B5}.Release|Any CPU.Build.0 = Release|Any CPU 157 {ECD37682-DF7E-409F-912D-0965634556B5}.ReleaseXBAP|Any CPU.ActiveCfg = ReleaseXBAP|Any CPU 158 {ECD37682-DF7E-409F-912D-0965634556B5}.ReleaseXBAP|Any CPU.Build.0 = ReleaseXBAP|Any CPU 120 159 EndGlobalSection 121 160 GlobalSection(SolutionProperties) = preSolution -
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.Bandits/Policies/UCTPolicy.cs
r11981 r12503 30 30 q = double.PositiveInfinity; 31 31 } else { 32 q = aInfo.SumReward / aInfo.Tries + 2.0 * c * Math.Sqrt(Math.Log(totalTries) / aInfo.Tries);32 q = aInfo.SumReward / aInfo.Tries + 2.0 * c * Math.Sqrt(Math.Log(totalTries) / aInfo.Tries); 33 33 } 34 34 if (q > bestQ) { -
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.GeneticProgramming/OffspringSelectionGP.cs
r12023 r12503 46 46 // osga.Engine = new ParallelEngine.ParallelEngine(); 47 47 osga.Engine = new SequentialEngine.SequentialEngine(); 48 osga.ExceptionOccurred += (sender, args) => { Console.WriteLine(args.Value.Message); wh.Set(); };49 osga.Stopped += (sender, args) => { wh.Set(); };48 //osga.ExceptionOccurred += (sender, args) => { Console.WriteLine(args.Value.Message); wh.Set(); }; 49 //osga.Stopped += (sender, args) => { wh.Set(); }; 50 50 51 51 int numEvals = 0; -
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.MonteCarloTreeSearch/Base/TreeNode.cs
r12098 r12503 17 17 public IBanditPolicyActionInfo actionInfo; 18 18 19 public TreeNode(TreeNode parent, string phrase )19 public TreeNode(TreeNode parent, string phrase, IBanditPolicyActionInfo actionInfo) 20 20 { 21 21 this.parent = parent; 22 22 this.phrase = phrase; 23 actionInfo = new DefaultPolicyActionInfo();23 this.actionInfo = actionInfo; 24 24 } 25 25 public bool IsLeaf() -
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Algorithms.MonteCarloTreeSearch/MonteCarloTreeSearch.cs
r12098 r12503 53 53 string phrase = currentNode.phrase; 54 54 55 if (!grammar.IsTerminal(phrase) )55 if (!grammar.IsTerminal(phrase) && phrase.Length <= maxLen) 56 56 { 57 57 ExpandTreeNode(currentNode); … … 60 60 currentNode.children[behaviourPolicy.SelectAction(random, currentNode.GetChildActionInfos())]; 61 61 } 62 double quality = simulation.Simulate(currentNode); 63 OnSolutionEvaluated(phrase, quality); 62 if (currentNode.phrase.Length <= maxLen) 63 { 64 double quality = simulation.Simulate(currentNode); 65 OnSolutionEvaluated(phrase, quality); 64 66 65 Propagate(currentNode, quality); 67 Propagate(currentNode, quality); 68 } 66 69 } 67 70 } … … 88 91 if (newSequence.Length <= maxLen) 89 92 { 90 TreeNode childNode = new TreeNode(treeNode, newSequence.ToString() );93 TreeNode childNode = new TreeNode(treeNode, newSequence.ToString(), behaviourPolicy.CreateActionInfo()); 91 94 treeNode.children.Add(childNode); 92 95 } … … 101 104 StopRequested = false; 102 105 bestQuality = 0.0; 103 rootNode = new TreeNode(null, grammar.SentenceSymbol.ToString() );106 rootNode = new TreeNode(null, grammar.SentenceSymbol.ToString(), behaviourPolicy.CreateActionInfo()); 104 107 } 105 108 -
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Problems/SantaFeAntProblem.cs
r12099 r12503 55 55 } 56 56 57 private static void Run(Ant ant, string sentence, ref int p, bool stopAfterFirst = false) { 57 // changed stopAfterFirst to true.. 58 private static void Run(Ant ant, string sentence, ref int p, bool stopAfterFirst = true) { 58 59 while (!ant.Done()) { 59 60 if (p >= sentence.Length) { -
branches/HeuristicLab.Problems.GrammaticalOptimization/HeuristicLab.Problems.GrammaticalOptimization/Sequence.cs
r11793 r12503 18 18 // - terminal symbols can be almost all other characters 19 19 public class Sequence : IEnumerable<char> { 20 private const int maxIdx = 200; 20 // changed maxIdx to 10000... 21 private const int maxIdx = 10000; 21 22 22 23 private int len; -
branches/HeuristicLab.Problems.GrammaticalOptimization/Main/Program.cs
r12098 r12503 34 34 private static void RunDemo() 35 35 { 36 37 38 36 int maxIterations = 100000; 39 37 int iterations = 0; … … 46 44 var problem = new RoyalPairProblem(); 47 45 //var problem = new EvenParityProblem(); 48 //var alg = new SequentialSearch(problem, 23, random, 0,49 //new HeuristicLab.Algorithms.Bandits.GrammarPolicies.GenericGrammarPolicy(problem, new UCB1TunedPolicy()));50 var alg = new MonteCarloTreeSearch(problem, 23, random, new UCB1Policy(), new RandomSimulation(problem, random, 23));46 var alg = new SequentialSearch(problem, 23, random, 0, 47 new HeuristicLab.Algorithms.Bandits.GrammarPolicies.GenericGrammarPolicy(problem, new UCB1TunedPolicy())); 48 //var alg = new MonteCarloTreeSearch(problem, 23, random, new UCB1Policy(), new RandomSimulation(problem, random, 23)); 51 49 52 50
Note: See TracChangeset
for help on using the changeset viewer.