Index: /branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/TestResults.ps1
===================================================================
--- /branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/TestResults.ps1	(revision 16533)
+++ /branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/TestResults.ps1	(revision 16533)
@@ -0,0 +1,134 @@
+﻿param(
+    [switch] $GenerateNew = $true,
+    [int] $WaitToStep = 200
+)
+
+
+$CLog = Join-Path -Path $(Resolve-Path $PSScriptRoot) -ChildPath 'CGen.log'
+$GoLog = Join-Path -Path $(Resolve-Path $PSScriptRoot) -ChildPath 'GoOut.log'
+
+$CExecutable = Join-Path -Path $(Resolve-Path $PSScriptRoot) -ChildPath 'a.exe'
+$GoExecutable = Join-Path -Path $(Resolve-Path $PSScriptRoot) -ChildPath 'go-code\go-pge\go-pge.exe'
+
+
+if($GenerateNew) {
+    $CGenProc = Start-Process -FilePath $CExecutable -RedirectStandardOutput $CLog -WorkingDirectory $PSScriptRoot -PassThru
+    $StepReached = $false
+    while(-not $StepReached) {
+        $CGenCont = Get-Content $CLog
+        if($CGenCont | Select-String -Pattern "\*+ StepW: $WaitToStep \*+") {
+            $StepReached = $true
+        }
+        Start-Sleep -Seconds 1
+    }
+
+    $CGenProc  | Stop-Process -ErrorAction SilentlyContinue
+
+
+    $GoGenProc = Start-Process -FilePath $GoExecutable -ArgumentList "-pcfg=prob/bench/Pagie_1.cfg -evals=3 -peel=3 -iter=$WaitToStep -init=method1 -grow=method1"  -RedirectStandardOutput $GoLog -WorkingDirectory $(Join-Path -Path $PSScriptRoot -ChildPath 'go-code\go-pge') -PassThru
+    $StepReached = $false
+    while(-not $StepReached) {
+        $GoGenCont = Get-Content $GoLog
+        if($GoGenCont | Select-String -Pattern "PS\.step\(\)\s+$($WaitToStep)") {
+            $StepReached = $true
+        }
+        Start-Sleep -Seconds 1
+    }
+    $GoGenProc | Stop-Process -ErrorAction SilentlyContinue
+}
+
+# Read Result
+
+function Get-CSteps {
+    param([Object[]] $Content)
+    $ValueList = @{}
+    $CurrentStep = 0
+    foreach($Line in $Content) {
+        if($Line -match "\*+ StepW: (\d+) \*+") {
+            [int]$CurrentStep = $Matches[1]
+            $ValueList[$CurrentStep] = $(New-Object -TypeName System.Collections.ArrayList)
+        } elseif($Line -match "push\/pop \(\d+\,\d+\) \((.+)\)") {
+            $ValueList[$CurrentStep].Add($Matches[1].Trim().Replace(' ', '')) | Out-Null
+        }
+    }
+    return $ValueList
+}
+
+function Get-GoSteps {
+    param([Object[]] $Content)
+    $ValueList = @{}
+    $CurrentStep = 0
+    foreach($Line in $Content) {
+        if($Line -match "PS\.step\(\)\s+(\d+)") {
+            [int]$CurrentStep = $Matches[1]
+            $ValueList[$CurrentStep] = $(New-Object -TypeName System.Collections.ArrayList)
+        } elseif($Line -match "pop\/push\(\d+\,\d+\)\: (.+)") {
+            $ValueList[$CurrentStep].Add($Matches[1].Trim().Trim('(').Trim(')').Replace(' ', '')) | Out-Null
+        }
+    }
+    return $ValueList
+}
+
+function Compare-Results {
+    param(
+        [string]$First,
+        [string]$Second
+    )
+    $FirstChars = $First.Trim().ToUpper().ToCharArray() | Sort
+    $SecondChars = $Second.Trim().ToUpper().ToCharArray() | Sort
+
+    [System.Collections.ArrayList]$LeftChars = $SecondChars.Clone()
+    $FirstCharNr = 0
+    foreach($FirstChar in $FirstChars) {
+        $SecondChar = $SecondChars[$FirstCharNr]
+        if($FirstChar -eq $SecondChar) {
+            $LeftChars.Remove($FirstChar)
+        } else {
+            return $false
+        }
+        $FirstCharNr++
+    }
+    return [bool]($LeftChars.Count -eq 0)
+}
+
+$CContent = Get-Content -Path $CLog
+$GoContent = Get-Content -Path $GoLog
+
+$ParseC = Get-CSteps -Content $CContent
+$ParseGo = Get-GoSteps -Content $GoContent
+
+foreach($StepNr in $($ParseGo.Keys | Sort)) {
+    $GoResult = $ParseGo[$StepNr]
+    [System.Collections.ArrayList]$CResult = $ParseC[$StepNr + 1]
+
+    if($CResult -eq $null -or $CResult.Count -lt 1) {
+        Write-Information "Missing CStep nr. $StepNr"
+        continue
+    }
+    if($GoResult -eq $null -or $GoResult.Count -lt 1) {
+        Write-Information "Missing GoStep nr. $StepNr"
+        continue
+    }
+
+    $StepResult = $true
+    foreach($GoRes in $GoResult) {            # Step Results
+        $State = $false
+        foreach($CRes in $CResult.Clone()) {  # Compare every Result with every Step Result
+            Write-Debug "$($GoRes) with $($CRes)"
+            if(Compare-Results -First $GoRes -Second $CRes) {
+                $State = $true
+                $CResult.Remove($CRes)
+                break
+            }
+        }
+        if(-not $State) {
+            $StepResult = $false
+        }
+    }
+
+    if($StepResult) {
+        Write-Host "$StepNr OK"
+    } else {
+        Write-Warning "$StepNr failed!"
+    }
+}
Index: /branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/testinit.c
===================================================================
--- /branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/testinit.c	(revision 16533)
+++ /branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/testinit.c	(revision 16533)
@@ -0,0 +1,333 @@
+#include "pge.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+void readTainData(char *path) {
+	
+}
+
+int main() {
+	
+	putenv("GOGC=off");
+	putenv("GODEBUG=cgocheck=0");
+	putenv("CGO_ENABLED=1");
+	
+		
+	/****** TrainData ******/
+		
+	GoInt indepLen = 1; //2 exists too		//culms
+	GoInt depLen = 2;							//culms
+	GoInt nEntries = 25;						//lines
+	int nCulm = indepLen + depLen;
+			
+	GoFloat64 *trainMatrix = (GoFloat64 *)malloc(nEntries * (indepLen + depLen) * sizeof(GoFloat64));
+	
+	printf("AddTrainData\n");
+	
+	/****** TestData ******/
+	
+	GoInt TindepLen = indepLen; //2 exists too		//culms
+	GoInt TdepLen = depLen;							//culms
+	GoInt TnEntries = 25;						//lines
+	nCulm = TindepLen + TdepLen;
+	
+	GoFloat64 *testMatrix = (GoFloat64 *)malloc(TnEntries * (TindepLen + TdepLen) * sizeof(GoFloat64)); 
+	
+	printf("AddTestData\n");
+	//AddTrainData(TindepNames, TdepndNames, TtrainMatrix, TnEntries);
+	
+trainMatrix[0 * nCulm + 0] = (GoFloat64) -5.000000;
+trainMatrix[0 * nCulm + 1] = (GoFloat64) -5.000000;
+trainMatrix[0 * nCulm + 2] = (GoFloat64) 1.996805 ;
+trainMatrix[1 * nCulm + 0] = (GoFloat64) -4.600000 ;
+trainMatrix[1 * nCulm + 1] = (GoFloat64) -5.000000; 
+trainMatrix[1 * nCulm + 2] = (GoFloat64)1.996174 ;
+trainMatrix[2 * nCulm + 0] = (GoFloat64)-4.200000 ;
+trainMatrix[2 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[2 * nCulm + 2] = (GoFloat64)1.995199 ;
+trainMatrix[3 * nCulm + 0] = (GoFloat64)-3.800000 ;
+trainMatrix[3 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[3 * nCulm + 2] = (GoFloat64)1.993630 ;
+trainMatrix[4 * nCulm + 0] = (GoFloat64)-3.400000 ;
+trainMatrix[4 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[4 * nCulm + 2] = (GoFloat64)1.990975 ;
+trainMatrix[5 * nCulm + 0] = (GoFloat64)-3.000000 ;
+trainMatrix[5 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[5 * nCulm + 2] = (GoFloat64)1.986207 ;
+trainMatrix[6 * nCulm + 0] = (GoFloat64)-2.600000 ;
+trainMatrix[6 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[6 * nCulm + 2] = (GoFloat64)1.976988 ;
+trainMatrix[7 * nCulm + 0] = (GoFloat64)-2.200000 ;
+trainMatrix[7 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[7 * nCulm + 2] = (GoFloat64)1.957462 ;
+trainMatrix[8 * nCulm + 0] = (GoFloat64)-1.800000 ;
+trainMatrix[8 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[8 * nCulm + 2] = (GoFloat64)1.911428 ;
+trainMatrix[9 * nCulm + 0] = (GoFloat64)-1.400000 ;
+trainMatrix[9 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[9 * nCulm + 2] = (GoFloat64)1.791859 ;
+trainMatrix[10 * nCulm + 0] = (GoFloat64)-1.000000 ;
+trainMatrix[10 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[10 * nCulm + 2] = (GoFloat64)1.498403 ;
+trainMatrix[11 * nCulm + 0] = (GoFloat64)-0.600000 ;
+trainMatrix[11 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[11 * nCulm + 2] = (GoFloat64)1.113133 ;
+trainMatrix[12 * nCulm + 0] = (GoFloat64)-0.200000 ;
+trainMatrix[12 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[12 * nCulm + 2] = (GoFloat64)1.000000 ;
+trainMatrix[13 * nCulm + 0] = (GoFloat64)0.200000 ;
+trainMatrix[13 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[13 * nCulm + 2] = (GoFloat64)1.000000 ;
+trainMatrix[14 * nCulm + 0] = (GoFloat64)0.600000 ;
+trainMatrix[14 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[14 * nCulm + 2] = (GoFloat64)1.113133 ;
+trainMatrix[15 * nCulm + 0] = (GoFloat64)1.000000 ;
+trainMatrix[15 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[15 * nCulm + 2] = (GoFloat64)1.498403 ;
+trainMatrix[16 * nCulm + 0] = (GoFloat64)1.400000 ;
+trainMatrix[16 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[16 * nCulm + 2] = (GoFloat64)1.791859 ;
+trainMatrix[17 * nCulm + 0] = (GoFloat64)1.800000 ;
+trainMatrix[17 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[17 * nCulm + 2] = (GoFloat64)1.911428 ;
+trainMatrix[18 * nCulm + 0] = (GoFloat64)2.200000 ;
+trainMatrix[18 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[18 * nCulm + 2] = (GoFloat64)1.957462 ;
+trainMatrix[19 * nCulm + 0] = (GoFloat64)2.600000 ;
+trainMatrix[19 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[19 * nCulm + 2] = (GoFloat64)1.976988 ;
+trainMatrix[20 * nCulm + 0] = (GoFloat64)3.000000 ;
+trainMatrix[20 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[20 * nCulm + 2] = (GoFloat64)1.986207 ;
+trainMatrix[21 * nCulm + 0] = (GoFloat64)3.400000 ;
+trainMatrix[21 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[21 * nCulm + 2] = (GoFloat64)1.990975 ;
+trainMatrix[22 * nCulm + 0] = (GoFloat64)3.800000 ;
+trainMatrix[22 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[22 * nCulm + 2] = (GoFloat64)1.993630 ;
+trainMatrix[23 * nCulm + 0] = (GoFloat64)4.200000 ;
+trainMatrix[23 * nCulm + 1] = (GoFloat64)-5.000000 ;
+trainMatrix[23 * nCulm + 2] = (GoFloat64)1.995199 ;
+trainMatrix[24 * nCulm + 0] = (GoFloat64)4.600000 ;
+trainMatrix[24 * nCulm + 1] = (GoFloat64)-5.000000; 
+trainMatrix[24 * nCulm + 2] = (GoFloat64)1.996174;
+	
+testMatrix[0 * nCulm + 0] = (GoFloat64) -5.000000;
+testMatrix[0 * nCulm + 1] = (GoFloat64) -5.000000;
+testMatrix[0 * nCulm + 2] = (GoFloat64) 1.996805 ;
+testMatrix[1 * nCulm + 0] = (GoFloat64) -4.600000 ;
+testMatrix[1 * nCulm + 1] = (GoFloat64) -5.000000; 
+testMatrix[1 * nCulm + 2] = (GoFloat64)1.996174 ;
+testMatrix[2 * nCulm + 0] = (GoFloat64)-4.200000 ;
+testMatrix[2 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[2 * nCulm + 2] = (GoFloat64)1.995199 ;
+testMatrix[3 * nCulm + 0] = (GoFloat64)-3.800000 ;
+testMatrix[3 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[3 * nCulm + 2] = (GoFloat64)1.993630 ;
+testMatrix[4 * nCulm + 0] = (GoFloat64)-3.400000 ;
+testMatrix[4 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[4 * nCulm + 2] = (GoFloat64)1.990975 ;
+testMatrix[5 * nCulm + 0] = (GoFloat64)-3.000000 ;
+testMatrix[5 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[5 * nCulm + 2] = (GoFloat64)1.986207 ;
+testMatrix[6 * nCulm + 0] = (GoFloat64)-2.600000 ;
+testMatrix[6 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[6 * nCulm + 2] = (GoFloat64)1.976988 ;
+testMatrix[7 * nCulm + 0] = (GoFloat64)-2.200000 ;
+testMatrix[7 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[7 * nCulm + 2] = (GoFloat64)1.957462 ;
+testMatrix[8 * nCulm + 0] = (GoFloat64)-1.800000 ;
+testMatrix[8 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[8 * nCulm + 2] = (GoFloat64)1.911428 ;
+testMatrix[9 * nCulm + 0] = (GoFloat64)-1.400000 ;
+testMatrix[9 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[9 * nCulm + 2] = (GoFloat64)1.791859 ;
+testMatrix[10 * nCulm + 0] = (GoFloat64)-1.000000 ;
+testMatrix[10 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[10 * nCulm + 2] = (GoFloat64)1.498403 ;
+testMatrix[11 * nCulm + 0] = (GoFloat64)-0.600000 ;
+testMatrix[11 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[11 * nCulm + 2] = (GoFloat64)1.113133 ;
+testMatrix[12 * nCulm + 0] = (GoFloat64)-0.200000 ;
+testMatrix[12 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[12 * nCulm + 2] = (GoFloat64)1.000000 ;
+testMatrix[13 * nCulm + 0] = (GoFloat64)0.200000 ;
+testMatrix[13 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[13 * nCulm + 2] = (GoFloat64)1.000000 ;
+testMatrix[14 * nCulm + 0] = (GoFloat64)0.600000 ;
+testMatrix[14 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[14 * nCulm + 2] = (GoFloat64)1.113133 ;
+testMatrix[15 * nCulm + 0] = (GoFloat64)1.000000 ;
+testMatrix[15 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[15 * nCulm + 2] = (GoFloat64)1.498403 ;
+testMatrix[16 * nCulm + 0] = (GoFloat64)1.400000 ;
+testMatrix[16 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[16 * nCulm + 2] = (GoFloat64)1.791859 ;
+testMatrix[17 * nCulm + 0] = (GoFloat64)1.800000 ;
+testMatrix[17 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[17 * nCulm + 2] = (GoFloat64)1.911428 ;
+testMatrix[18 * nCulm + 0] = (GoFloat64)2.200000 ;
+testMatrix[18 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[18 * nCulm + 2] = (GoFloat64)1.957462 ;
+testMatrix[19 * nCulm + 0] = (GoFloat64)2.600000 ;
+testMatrix[19 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[19 * nCulm + 2] = (GoFloat64)1.976988 ;
+testMatrix[20 * nCulm + 0] = (GoFloat64)3.000000 ;
+testMatrix[20 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[20 * nCulm + 2] = (GoFloat64)1.986207 ;
+	testMatrix[21 * nCulm + 0] = (GoFloat64)3.400000 ;
+			testMatrix[21 * nCulm + 1] = (GoFloat64)-5.000000 ;
+				testMatrix[21 * nCulm + 2] = (GoFloat64)1.990975 ;
+	testMatrix[22 * nCulm + 0] = (GoFloat64)3.800000 ;
+		testMatrix[22 * nCulm + 1] = (GoFloat64)-5.000000 ;
+			testMatrix[22 * nCulm + 2] = (GoFloat64)1.993630 ;
+	testMatrix[23 * nCulm + 0] = (GoFloat64)4.200000 ;
+		testMatrix[23 * nCulm + 1] = (GoFloat64)-5.000000 ;
+testMatrix[23 * nCulm + 2] = (GoFloat64)1.995199 ;
+testMatrix[24 * nCulm + 0] = (GoFloat64)4.600000 ;
+testMatrix[24 * nCulm + 1] = (GoFloat64)-5.000000; 
+testMatrix[24 * nCulm + 2] = (GoFloat64)1.996174;
+	
+	
+	
+	AddTestData("X Y", "F", testMatrix, TnEntries);
+	AddTrainData("X Y", "F", trainMatrix, nEntries);
+	/****** InitSearch ******/
+	
+		GoInt UsableVarsLen = 2;
+		GoInt *UsableVarsData = malloc(sizeof(GoInt) * UsableVarsLen);
+		UsableVarsData[0] = 0;
+		UsableVarsData[1] = 1;
+		//UsableVarsData[2] = 2;
+		//UsableVarsData[3] = 3;
+		//UsableVarsData[4] = 4;
+	
+	//TestSlice(UsableVarsData, UsableVarsLen);
+	
+	GoInt *UsableVars = UsableVarsData; //{ .data = UsableVarsData, .len = UsableVarsLen, .cap = UsableVarsLen };   //GoSlice was type
+
+
+	//func InitSearch(maxGen int, pgeRptEpoch int, pgeRptCount int, pgeArchiveCap int, peelCnt int, evalrCount int, zeroEpsilon float64, initMethod string, growMethod string, sortType int)
+	
+	GoInt MaxGen = 2000;
+	GoInt PgeRptEpoch = 1;
+	GoInt PgeRptCount = 1;
+	GoInt PgeArchiveCap = 256;
+	
+	GoInt PeelCnt = 3;
+
+	GoFloat64 ZeroEpsilon = 0.00001;
+	GoInt EvalrCount = 2; //vorhernull?!
+	
+	char *InitMethod = "method1"; //{ .p = "method1", .n = strlen("method1") };
+	char *GrowMethod = "method1"; //{ .p = "method1", .n = strlen("method1") };
+	
+	int SortType = 0;
+	
+	InitSearch(MaxGen, PgeRptEpoch, PgeRptCount, PgeArchiveCap, PeelCnt, EvalrCount, ZeroEpsilon, InitMethod, GrowMethod, SortType);
+	printf("InitSearch\n");
+	
+	
+	/****** InitTreeParams ******/
+
+	//func InitTreeParams(Roots string, Nodes string, NonTrig string, Leafs string, UsableVars []int, MaxSize int, MinSize int, MaxDepth int, MinDepth int)
+	char *Roots = "Add"; //{ .p = "Add", .n = strlen("Add") };
+	char *Nodes = "Add Mul Div Sin Cos Exp Log Sqrt"; //{ .p = "Add Mul", .n = strlen("Add Mul") };
+	//char *Nodes = "Add Mul";
+	char *NonTrig = "Add Mul Div Exp Log"; //{ .p = "Add Mul", .n = strlen("Add Mul") };
+	//char *NonTrig = "Add Mul";
+	char *Leafs = "Var ConstantF"; //{ .p = "Var ConstantF", .n = strlen("Var ConstantF") }; 
+	GoInt MaxSize = 50;
+	GoInt MinSize = 4; 
+	GoInt MaxDepth = 6;
+	GoInt MinDepth = 1;
+	
+	InitTreeParams(Roots, Nodes, NonTrig, Leafs, UsableVars, UsableVarsLen, MaxSize, MinSize, MaxDepth, MinDepth);
+	printf("InitTreeParams\n");
+	
+	/****** InitProblem ******/
+
+	//func InitProblem(Name string, MaxIter int, HitRatio float64, SearchVar int, UsableVars []int, ProblemTypeString string, numProcs int)
+	char *Name = "Korns_02"; //{ .p = "Korns_02", .n = strlen("Korns_02") };
+	GoInt MaxIter = 5000;
+	GoFloat64 HitRatio = 0.01;
+	GoInt SearchVar = 0;
+
+	char *ProblemTypeString = "benchmark"; //{ .p = "benchmark", .n = strlen("benchmark") }; //real not working/implementated | diffeq is implementated
+	GoInt numProcs = 12;
+	
+	printf("InitProblem\n");
+	fflush(stdout);
+	InitProblem(Name, MaxIter, HitRatio, SearchVar, ProblemTypeString, numProcs);
+	
+	printf("******************************** Finished Init **********************************\n");
+	
+	/****** Run ******/
+
+	//GoInt maxi = GetMaxIterW();
+	//printf("GetMaxIter: %d\n", maxi);
+	//fflush(stdout);
+
+	//EvaluateW();
+	//printf("EvaluateW\n");
+	
+    //LoopW();
+	//printf("LoopW\n");
+	
+
+	//MaxIter = 5;
+	for (int fs1 = 1; fs1 <= MaxIter; fs1++) {		
+		printf("******************************** StepW: %d **********************************\n", fs1);
+		GoInt nresults = StepW();
+		
+		for (int ires = 0; ires < nresults; ires++) {
+			
+			GoInt nobestpush = 0;
+			GoInt bestnewminerr = 0; 
+			GoInt bestlen1 = 0; 
+			GoInt bestlen2 = 0;
+			GoInt testscore = 0;
+			GoInt ncoeff = 0;
+			
+			char* stepRes = GetStepResult(&nobestpush, &bestnewminerr, &bestlen1, &bestlen2, &testscore, &ncoeff);			
+		
+			GoFloat64 *coeff = (GoFloat64 *)malloc(UsableVarsLen * sizeof(GoFloat64));
+			
+			for(int icoeff = 0; icoeff < UsableVarsLen; icoeff++) {
+				coeff[icoeff] = 0;
+			}
+			
+			//printf("C: No best push\n");
+			printf("C: push/pop (%d,%d) %s\n", bestlen1, bestlen2, stepRes);
+			for(int icoeff = 0; icoeff < ncoeff; icoeff++){
+				GoFloat64 coeffVal = GetCoeffResult();
+				printf("C: coeff vals: %f\n", coeffVal);
+			}
+			if (bestnewminerr) {
+				//printf("C: Best New Min Error\n");
+			}
+			printf("C: TestScore %f\n", testscore);
+	
+		}
+		fflush(stdout);
+	}
+	
+	return 0;
+	
+	fflush(stdout);
+	
+	//CleanW();
+	//printf("CleanW\n");
+	fflush(stdout);
+	
+	printf("Run Start\n");
+	fflush(stdout);
+	//RunW();
+	fflush(stdout);
+	printf("Run Ende\n");
+	
+	// !!!!!!!!!!!!!! FREE DATA !!!!!!!!!!!!!!!!!!!!!
+	
+	return 0;
+}
