Skip to content
Snippets Groups Projects
Commit af738858 authored by fjn1g13's avatar fjn1g13
Browse files

M4M stuff

parent 971e99b9
No related branches found
No related tags found
No related merge requests found
......@@ -15,10 +15,10 @@ namespace IVMCTrim
{
static void Main(string[] args)
{
Run("Z075", Standard(0.75), 1642);
Run("FixedHigh", FixedHigh, 42);
Run("Z000", Standard(0.0), 42);
Run("FixedHigh", FixedHigh, 42);
Run("Z050", Standard(0.5), 1142);
Run("Z075", Standard(0.75), 1642);
Run("Z095", Standard(0.95), 2042);
Run("Z000PerfectG", PerfectG(0.0), 42);
}
......@@ -35,11 +35,12 @@ namespace IVMCTrim
var individual = Individual.ZeroGenome(N);
var target = new IvmcTarget(4, 4);
var recorders = new Recorders();
var recorders = new Recorders(target.ModuleCount, target.ModuleSize);
// doesn't make a lot of sense
recorders.Sample(null, individual, default(Judgement), 0);
// run the simulation
for (int epoch = 1; epoch <= parameters.TotalEpochs; epoch++)
{
var judgement = Model.RunEpoch(epoch, ctx, parameters, target, ref individual);
......@@ -47,6 +48,7 @@ namespace IVMCTrim
if (epoch % 1000 == 0)
{
// reporting
Console.WriteLine($"{epoch}\t{judgement.Fitness}");
var matPlot = PlotHelpers.IntegralCartesianAxes($"Epoch {epoch}", "row", "col");
......@@ -56,6 +58,7 @@ namespace IVMCTrim
}
}
// data export and mindless plotting
var rcsData = recorders.GetRcsDataFlat();
TrajectoryHelpers.SaveTrajectories(path("rcs_t.dat"), rcsData, recorders.Grns.SamplePeriod);
......@@ -63,12 +66,46 @@ namespace IVMCTrim
rcsPlot.Series.AddRange(PlotHelpers.PlotTrajectoryLines2D(recorders.GetRcsData(), recorders.Grns.SamplePeriod, OxyColors.DarkCyan, OxyColors.LightCyan, OxyColors.DarkGreen, OxyColors.LightGreen));
rcsPlot.ExportPdf(path("rcs_t.pdf"), 0.5, false);
var huskyPlot = PlotHelpers.LinearAxes("Evolution of Hierarchy", "Epoch", "Degree of Hierarchy");
huskyPlot.Series.AddRange(
PlotHelpers.PlotTrajectoryLines1D(
recorders.Grns.Samples.Select(grn => Analysis.ComputeBlockModuleHuskynesses(grn, target.ModuleSize).ToList()).ToArray().Transpose(),
recorders.Grns.SamplePeriod,
OxyColors.DarkSlateGray, OxyColors.SlateGray));
huskyPlot.ExportPdf(path("hierarchy_t.pdf"), 0.5, false);
var moduleIndependencePlot = PlotHelpers.LinearAxes("Evolution of ModuleIndependence", "Epoch", "Degree of Hierarchy");
moduleIndependencePlot.Series.AddRange(
PlotHelpers.PlotTrajectoryLines1D(
recorders.Grns.Samples.Select(grn => Analysis.ComputeBlockModuleIndependence(grn, target.ModuleSize).ToList()).ToArray().Transpose(),
recorders.Grns.SamplePeriod,
OxyColors.Teal, OxyColors.DarkTurquoise));
moduleIndependencePlot.ExportPdf(path("moduleIndpednence_t.pdf"), 0.5, false);
var fitnessData = recorders.GetFitnessData();
TrajectoryHelpers.SaveTrajectories(path("fitness_t.dat"), fitnessData, recorders.Judgements.SamplePeriod);
var fitnessPlot = PlotHelpers.LinearAxes("Fitness", "Epoch", "Connection Strength");
fitnessPlot.Series.AddRange(PlotHelpers.PlotTrajectoryScatters1D(recorders.GetFitnessData().Take(1).ToArray().DownsampleTrajectories(500), recorders.Judgements.SamplePeriod * 500, OxyColors.Red, OxyColors.DarkOrange));
var fitnessPlot = PlotHelpers.LinearAxes("Fitness", "Epoch", "Fitness");
fitnessPlot.Series.AddRange(PlotHelpers.PlotTrajectoryScatters1D(fitnessData.Take(1).ToArray().DownsampleTrajectories(100), recorders.Judgements.SamplePeriod * 100, OxyColors.Red, OxyColors.DarkOrange));
fitnessPlot.ExportPdf(path("fitness_t.pdf"), 0.5, false);
var meanFitnessPlot = PlotHelpers.LinearAxes("Mean Fitness", "Epoch", "Mean Fitness");
fitnessPlot.Series.AddRange(PlotHelpers.PlotTrajectoryScatters1D(fitnessData.Take(1).ToArray().MeanDownsampleTrajectories(100), recorders.Judgements.SamplePeriod * 100, OxyColors.Red, OxyColors.DarkOrange));
fitnessPlot.ExportPdf(path("meanfitness_t.pdf"), 0.5, false);
var solveData = recorders.GetSolveData().Map2D(x => (double)x);
TrajectoryHelpers.SaveTrajectories(path("ivmcsolves_t.dat"), solveData, recorders.Solves.SamplePeriod);
var solvePlot = PlotHelpers.LinearAxes("Solves", "Epoch", "Solve Frequency");
solvePlot.Series.AddRange(PlotHelpers.PlotTrajectoryScatters1D(solveData.Map2D(x => x / recorders.Solves.SamplePeriod).TakeLast(1).ToArray(), recorders.Solves.SamplePeriod, OxyColors.IndianRed, OxyColors.DarkRed));
solvePlot.ExportPdf(path("solves_t.pdf"), 0.5, false);
var switchData = recorders.GetSwitchData().Map2D(x => (double)x);
TrajectoryHelpers.SaveTrajectories(path("ivmcswitches_t.dat"), switchData, recorders.Switches.SamplePeriod);
var switchPlot = PlotHelpers.LinearAxes("Switches", "Epoch", "Switch Frequency");
switchPlot.Series.AddRange(PlotHelpers.PlotTrajectoryScatters1D(switchData.Map2D(x => x / recorders.Switches.SamplePeriod).TakeLast(1).ToArray(), recorders.Switches.SamplePeriod, OxyColors.DeepPink, OxyColors.HotPink));
switchPlot.ExportPdf(path("switches_t.pdf"), 0.5, false);
}
public static Parameters Standard(double z)
......@@ -138,7 +175,7 @@ namespace IVMCTrim
public int GenerationsPerEpoch { get; set; } = 1000;
public int K => GenerationsPerEpoch;
public int TotalEpochs { get; set; } = 1_000;
public int TotalEpochs { get; set; } = 25_000;
public EpochStartOperation EpochStartOperation { get; set; } = null;
}
......@@ -289,6 +326,7 @@ namespace IVMCTrim
public int ModuleSize { get; }
public int ModuleCount { get; }
public int Size => ModuleCount * ModuleSize;
public double[] PlusCoefs { get; }
public double[] MinusCoefs { get; }
......@@ -359,17 +397,9 @@ namespace IVMCTrim
{
VaryEnvironment(ctx, parameters, individual, target);
for (int i = 0; i < target.ModuleCount; i++)
{
var val = target.PlusCoefs[i] > target.MinusCoefs[i] ? 1 : -1;
for (int j = 0; j < target.ModuleSize; j++)
{
individual.G[i * target.ModuleSize + j] = val;
}
var perfectP = target.PerfectP();
perfectP.CopyTo(individual.G);
individual.DevelopInplace(ctx, parameters);
}
};
public static double JudgeCost(Matrix<double> grn)
......@@ -426,7 +456,107 @@ namespace IVMCTrim
}
}
// recording stuff
public static class Analysis
{
public static Vector<double> PerfectP(this IvmcTarget target)
{
var p = CreateVector.Dense<double>(target.Size);
for (int i = 0; i < target.ModuleCount; i++)
{
var val = target.PlusCoefs[i] > target.MinusCoefs[i] ? 1 : -1;
for (int j = 0; j < target.ModuleSize; j++)
{
p[i * target.ModuleSize + j] = val;
}
}
return p;
}
/// <summary>
/// Computes the huskyness of sequencial block modules of the given size
/// </summary>
public static IEnumerable<double> ComputeBlockModuleHuskynesses(Matrix<double> dtm, int moduleSize)
{
for (int i = 0; i < dtm.ColumnCount; i += moduleSize)
{
yield return ComputeModuleHuskyness(dtm, Enumerable.Range(i, moduleSize).ToList());
}
}
/// <summary>
/// Computes the huskyness of sequencial block modules of the given size
/// </summary>
public static IEnumerable<double> ComputeBlockModuleIndependence(Matrix<double> dtm, int moduleSize)
{
for (int i = 0; i < dtm.ColumnCount; i += moduleSize)
{
yield return ComputeModuleIndependence(dtm, Enumerable.Range(i, moduleSize).ToList());
}
}
/// <summary>
/// Computes the huskyness of a module containing 2 or more traits
/// huskyness = (max_col_weight / total_weight), scaled between 0 (dense/nothing) and 1 (ideal husky)
/// Returns 0 if there are no weights
/// </summary>
public static double ComputeModuleHuskyness(Matrix<double> dtm, IReadOnlyList<int> moduleTraits)
{
double[] columnSums = moduleTraits.Select(j => moduleTraits.Sum(i => Math.Abs(dtm[i, j]))).ToArray();
int count = columnSums.Length;
if (count < 2)
throw new ArgumentException(nameof(moduleTraits), "A module must comprise 2 or more traits");
double max = columnSums.Max();
if (max == 0) // avoid div0: this is not a husky
return 0.0;
double total = columnSums.Sum();
double hratio = max / total;
if (double.IsNaN(hratio) || double.IsInfinity(hratio))
return double.NaN; // probably ought throw...
// re-scale hratio from [1/n, 1] to [0, 1]
int n = count;
return (hratio - (1.0 / n)) / (1.0 - (1.0 / n));
}
/// <summary>
/// Computes the independence of a module
/// module_independence = (weight_within_module / weight_in_module_row), on scale between 0 (no control) and 1 (total independence)
/// Returns NaN if there are no weights
/// </summary>
public static double ComputeModuleIndependence(Matrix<double> dtm, IReadOnlyList<int> moduleTraits)
{
double withinSum = 0.0;
double rowSum = 0.0;
foreach (var i in moduleTraits)
{
foreach (var j in moduleTraits)
{
withinSum += Math.Abs(dtm[i, j]);
}
for (int j = 0; j < dtm.ColumnCount; j++)
{
rowSum += Math.Abs(dtm[i, j]);
}
}
var iratio = withinSum / rowSum;
if (double.IsNaN(iratio) || double.IsInfinity(iratio))
return double.NaN;
return iratio;
}
}
public class Recorder<T>
{
public Recorder(Func<IvmcTarget, Individual, Judgement, T> sampler, int samplePeriod)
......@@ -447,36 +577,137 @@ namespace IVMCTrim
}
}
public class IvmcRecorder<T>
public class CountRecorder
{
public IvmcRecorder(Func<IvmcTarget, Individual, Judgement, T> sampler, int samplePeriod)
public CountRecorder(int sampleSize, Action<IvmcTarget, Individual, Judgement, int[]> counter, int samplePeriod)
{
Sampler = sampler ?? throw new ArgumentNullException(nameof(sampler));
Counter = counter;
SamplePeriod = samplePeriod;
SampleSize = sampleSize;
}
public Func<IvmcTarget, Individual, Judgement, T> Sampler { get; }
public Action<IvmcTarget, Individual, Judgement, int[]> Counter { get; }
public int SampleSize { get; }
public int SamplePeriod { get; }
public List<T> Samples { get; } = new List<T>();
private int[] CurrentCount = null;
public List<int[]> Samples { get; } = new List<int[]>();
public void Sample(IvmcTarget target, Individual individual, Judgement judgement, int epoch)
{
if (CurrentCount == null)
{
CurrentCount = new int[SampleSize];
}
Counter(target, individual, judgement, CurrentCount);
if (epoch % SamplePeriod == 0)
Samples.Add(Sampler(target, individual, judgement));
{
Samples.Add(CurrentCount);
CurrentCount = new int[SampleSize];
}
}
}
public class Recorders
{
public Recorder<Judgement> Judgements { get; } = new Recorder<Judgement>((t, i, j) => j, 1);
public Recorder<Matrix<double>> Grns { get; } = new Recorder<Matrix<double>>((t, i, j) => i.B.Clone(), 100);
//public Recorder<Judgement> Optimals { get; } = new Recorder<Judgement>((t, i, j) => j.Benefit == 1, 1);
public Recorders(int moduleCount, int moduleSize)
{
Solves = new CountRecorder(moduleCount + 1, CountSolves, OtherSamplePeriod);
Switches = new CountRecorder(moduleCount + 1, CountSwitches(), OtherSamplePeriod);
}
private static Action<IvmcTarget, Individual, Judgement, int[]> CountSwitches()
{
Vector<double> last = null;
void count(IvmcTarget target, Individual individual, Judgement judgement, int[] switches)
{
if (last == null)
{
last = individual.P.Clone();
return;
}
for (int i = 0; i < target.ModuleCount; i++)
{
var val = target.PlusCoefs[i] > target.MinusCoefs[i] ? 1 : -1;
bool isHard = target.PlusCoefs[i] >= 0 && target.MinusCoefs[i] >= 0;
bool allOk = true;
for (int j = 0; j < target.ModuleSize; j++)
{
bool isSwitch = Math.Sign(individual.P[j]) == -Math.Sign(last[j]);
// NOTE: this doesn't check if we were correct (per M4M)
if (!isHard || !isSwitch)
{
allOk = false;
break;
}
}
if (allOk)
{
switches[i]++;
switches[target.ModuleCount]++;
}
}
individual.P.CopyTo(last);
}
return count;
}
private static void CountSolves(IvmcTarget target, Individual individual, Judgement judgement, int[] wins)
{
if (target == null)
return; // pre-start
bool allAllOk = true;
for (int i = 0; i < target.ModuleCount; i++)
{
var val = target.PlusCoefs[i] > target.MinusCoefs[i] ? 1 : -1;
bool allOk = true;
for (int j = 0; j < target.ModuleSize; j++)
{
if (Math.Sign(individual.P[j]) != val)
{
allOk = false;
break;
}
}
if (allOk)
wins[i]++;
else
allAllOk = false;
}
if (allAllOk)
wins[target.ModuleCount]++;
}
private const int GrnSamplePeriod = 100;
private const int JudgementSamplePeriod = 1;
private const int OtherSamplePeriod = 100;
public Recorder<Judgement> Judgements { get; } = new Recorder<Judgement>((t, i, j) => j, JudgementSamplePeriod);
public Recorder<Matrix<double>> Grns { get; } = new Recorder<Matrix<double>>((t, i, j) => i.B.Clone(), GrnSamplePeriod);
public Recorder<Vector<double>> Ps { get; } = new Recorder<Vector<double>>((t, i, j) => i.P.Clone(), OtherSamplePeriod);
public CountRecorder Solves { get; }
public CountRecorder Switches { get; }
public void Sample(IvmcTarget target, Individual individual, Judgement judgement, int epoch)
{
Judgements.Sample(target, individual, judgement, epoch);
Grns.Sample(target, individual, judgement, epoch);
Ps.Sample(target, individual, judgement, epoch);
Solves.Sample(target, individual, judgement, epoch);
Switches.Sample(target, individual, judgement, epoch);
}
public double[][] GetFitnessData()
......@@ -488,6 +719,16 @@ namespace IVMCTrim
};
}
public int[][] GetSolveData()
{
return Solves.Samples.Transpose();
}
public int[][] GetSwitchData()
{
return Switches.Samples.Transpose();
}
public double[][] GetRcsDataFlat()
{
var N = Grns.Samples[0].RowCount;
......@@ -501,10 +742,31 @@ namespace IVMCTrim
}
}
// C&P'd from M4M
public static class TrajectoryHelpers
{
public static TOut[][] Map2D<TIn, TOut>(this TIn[][] arr, Func<TIn, TOut> map)
{
return arr.Select(a => a.Select(map).ToArray()).ToArray();
}
public static T[][] Transpose<T>(this IReadOnlyList<IReadOnlyList<T>> samples)
{
var l = samples.Count;
var n = samples[0].Count;
var res = new T[n][];
for (int i = 0; i < n; i++)
res[i] = new T[l];
for (int i = 0; i < l; i++)
for (int j = 0; j < n; j++)
res[j][i] = samples[i][j];
return res;
}
public static void SaveTrajectories(String filename, double[][] trajectories, int samplePeriod)
{
using (System.IO.FileStream fs = System.IO.File.Open(filename, System.IO.FileMode.Create))
......@@ -726,7 +988,6 @@ namespace IVMCTrim
}
}
// non-model utility stuff
public static class SamplingExtentions
{
public static double[][] DownsampleTrajectories(this IReadOnlyList<IReadOnlyList<double>> trajectories, int samplePeriod)
......
bprob=0.5 BEx=true lambda=0.1 regfunc=l1 ch=1.0 cl=0.7 c0=-1.0 mb=1E-3 judgemode=Split K=1000 targetpackage=ivmc:4 transmatmutator=singlecell
\ No newline at end of file
param(
$topDir,
$name,
$epochs,
$xtitle,
$ytitle,
$xprefix,
$yprefix,
$xs,
$ys,
$paramStrFunc,
$runName = "One",
$wsperiod = 100,
$paramFile,
$nogen=$false
)
mkdir -f $topDir
# saves a file as utf8 with no BOM
function save($fname)
{
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($False);
$fname = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($fname);
[System.IO.File]::WriteAllText($fname, $input -join "`n", $Utf8NoBomEncoding);
}
function clip($s)
{
return $s.Substring(0, $s.Length - 1)
}
$grpName = "grp$($name).sh";
$postName = "post$($name).sh";
$psGrpName = "psGrp$($name).ps1";
$psPostName = "psPost$($name).ps1";
$setname = $name;
mkdir -f "$topDir/logs"
mkdir -f "$topDir/logs/$name"
$starter = "";
$psStarter = "";
$postFitnesses = ""
$postSatFitnesses = ""
$postSubGroups = ""
$expFileName = "epoch0savestarter.dat"
$seed = 42;
$xAliases = "";
foreach ($xxa in $xs) { # x
$x = $xxa[0]
$xa = $xxa[1]
$lepochs = $epochs;
$lplotperiod = $epochs # [math]::Round($lepochs / 10);
$groupName = "$($name)$($xprefix)"
$dirname = "$($groupName)$($xa)"
$dirstarter = "sbatch $grpName $dirname $runName $seed $expFileName $setname $lplotperiod $lepochs";
$starter += $dirstarter + "`n"
$dirpsstarter = ". ./$psGrpName $name/$dirname $runName";
$psStarter += $dirpsstarter + "`r`n"
$xAliases += "$($dirname)runs$($runName) $x`r`n";
$postFitnesses += "trajTracesFitness$($xa).dat;"
$postSatFitnesses += "trajTracesSatFitness$($xa).dat;"
$postSubGroups += "$($xa);"
$yAliases = "";
foreach ($yya in $ys) { # y
$y = $yya[0]
$ya = $yya[1]
$paramStr = $paramStrFunc.invoke($x, $y)
Write-Output "$xtitle = $x ($xprefix = $xa); $ytitle = $y ($yprefix = $ya)"
Write-Output " $paramStr"
$subRunName = "$($yprefix)$($ya)";
$subRunDir = "$($dirname)/$($subRunName)";
$yAliases += "$($subRunName) $ya`r`n"
if (!$nogen) {
# TODO: check that paramStrs with spaces work
m4m gen=composedense topdir="$topDir/$name" name=$($subRunDir) epochs=$epochs paramfile="$paramFile" params="$paramStr"
}
}
$seed += 100;
}
# aliases
$xAliases | save "$topDir/xAliases.txt"
$yAliases | save "$topDir/yAliases.txt"
# IRIDIS (batch) starter
$starter | save "$topDir/starter$name.sh"
# PS start (sequencer)
$psStarter | save "$topDir/psStarter$name.ps1"
# Posts
$postFitnesses = clip($postFitnesses)
$postSatFitnesses = clip($postSatFitnesses)
$postSubGroups = clip($postSubGroups)
$post = @"
m4m bestiary dir=$($name) min=-3 max=3 out=bg_tl.png gname=genome_t.dat font="DejaVu Sans"
m4m bestiary dir=$($name) min=-3 max=3 out=bg_tl2.png gname=genome_t.dat font="DejaVu Sans" axes=true cw=2 ch=2 xTitle=$($xtitle) yTitle=$($ytitle)
m4m bestiary dir=$($name) min=-3 max=3 out=bg_t.png gname=genome_t.dat labels=false
m4m -stackgroup . groupname=$($groupName) TrajFilename="fitness_t(best).dat" prefix=trajTracesFitness
m4m -stackgroup . groupname=$($groupName) TrajFilename="fitnessSat_t(best).dat" prefix=trajTracesSatFitness
~$~files="$postFitnesses"
~$~satfiles="$postSatFitnesses"
~$~labels="$postSubGroups"
m4m -plot trajtraces -files `$files -label `$labels out=trajs title=$($name) title:y=Fitness
m4m -plot trajtraces -files `$satfiles -label `$labels out=trajsSat title="$($name) SAT" title:y=Fitness
m4m -plot trajtraces -files `$files -label `$labels out=trajBoxplot_t epoch=$($epochs-1) color=black title=$($name) title:y=Fitness
m4m -plot trajtraces -files `$satfiles -label `$labels out=trajBoxplot_t epoch=$($epochs-1) color=black title="$($name) SAT" title:y=Fitness
"@
$post.Replace("~$~", "").Replace("`r", "") | save "$topDir/$postName"
$post.Replace("~$~", "$") | save "$topDir/$psPostName"
$nodeCount = [Math]::Min(40, ($ys | Measure-Object).Count)
# IRIDIS group runner
$grp = "`#!/bin/bash`n`nSBATCH --ntasks-per-node=$($nodeCount) `# Tasks per node" + @"
#SBATCH --nodes=1 # Number of nodes requested
#SBATCH --time=48:00:00 # walltime
# mail alert at start, end and abortion of execution
#SBATCH --mail-type=ALL
# send mail to this address
#SBATCH --mail-user=fjn1g13@soton.ac.uk
# usage: . ./ivmcgrp.sh directory postfix seed expfilename setname plotperiod totalepochs wholesampleperiod
setname=`$5
plotperiod=`$6
epochs=`$7
wsperiod=10
~/tools/dotnet/dotnet ~/raw/Code/Other/M4M_MkI/M4M.CoreRunner/bin/Release/netcoreapp2.1/M4M.CoreRunner.dll run=/mainfs/scratch/fjn1g13/M4MExperiments/`$setname/`$setname/`$1 postfix=`$2 traceperiod=0 wholesampleperiod=`$wsperiod wholesamplewriteperiod=`$epochs plotperiod=`$plotperiod saveperiod=`$plotperiod saveperiodepochs=100000 saveperiodseconds=7200 seed=`$3 expfilename=`$4 configurators=SatFitnessFeedback ivmcswitchplotperiod=`$epochs ivmcswitchresolution=100 ivmcrecordpropers=false > /mainfs/scratch/fjn1g13/M4MExperiments/`$setname/logs/`$setname/`$1runs`$2log.txt
"@.Replace("`r", "")
$grp | save "$topDir/$grpName"
# PS quick and dirty group runner
$psGrp = @"
param(`$setDir, `$postfix)
`$plotperiod=$([Int]($epochs/10))
`$epochs=$epochs
`$wsperiod=10
`$seed=1
m4m run=`$setDir postfix=`$postfix traceperiod=0 wholesampleperiod=`$wsperiod wholesamplewriteperiod=`$epochs plotperiod=`$plotperiod saveperiod=`$plotperiod saveperiodepochs=`$plotperiod saveperiodseconds=7200 seed=$seed expfilename=$expFileName configurators=SatFitnessFeedback ivmcswitchplotperiod=`$epochs ivmcswitchresolution=100 ivmcrecordpropers=false
m4m -stackgroup . groupname=$($groupName) TrajFilename="fitness_t(best).dat" prefix=trajTracesFitness
m4m -stackgroup . groupname=$($groupName) TrajFilename="fitnessSat_t(best).dat" prefix=trajTracesSatFitness
"@.Replace("`r", "")
$psGrp | save "$topDir/$psGrpName"
\ No newline at end of file
param($noGen = $false)
# ranges
$forty = (("0", "0"), ("1", "1"), ("2", "2"), ("3", "3"), ("4", "4"), ("5", "5"), ("6", "6"), ("7", "7"), ("8", "8"), ("9", "9"), ("10", "10"), ("11", "11"), ("12", "12"), ("13", "13"), ("14", "14"), ("15", "15"), ("16", "16"), ("17", "17"), ("18", "18"), ("19", "19"), ("20", "20"), ("21", "21"), ("22", "22"), ("23", "23"), ("24", "24"), ("25", "25"), ("26", "26"), ("27", "27"), ("28", "28"), ("29", "29"), ("30", "30"), ("31", "31"), ("32", "32"), ("33", "33"), ("34", "34"), ("35", "35"), ("36", "36"), ("37", "37"), ("38", "38"), ("39", "39"))
$twentyHalf = (("0.00", "000"), ("0.05", "005"), ("0.10", "010"), ("0.15", "015"), ("0.20", "020"), ("0.25", "025"), ("0.30", "030"), ("0.35", "035"), ("0.40", "040"), ("0.45", "045"), ("0.50", "050"), ("0.55", "055"), ("0.60", "060"), ("0.65", "065"), ("0.70", "070"), ("0.75", "075"), ("0.80", "080"), ("0.85", "085"), ("0.90", "090"), ("0.95", "095"), ("1.00", "100"))
# standard Z
. .\genSpread.ps1 "Standard" "Standard" 120000 Z r Z r $twentyHalf $forty {param($x, $y) "Z=$x"} $runName 100 "commonparams.txt" $noGen
# perfect G
. .\genSpread.ps1 "PerfectG" "PerfectG" 120000 Z r Z r $twentyHalf $forty {param($x, $y) "Z=$x gresetprob=1 gresetoperation=perfect"} $runName 100 "commonparams.txt" $noGen
# fixed high
. .\genSpread.ps1 "FixHigh" "FixHigh" 120000 Z r Z r $twentyHalf $forty {param($x, $y) "Z=$x gresetprob=1 gresetoperation=perfect"} $runName 100 "commonparams.txt" $noGen
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment