Esempio n. 1
0
               'logParetoFront': 'yes', 'logBestIndividual': 'yes', 'logParetoFrontKeepAllGenerations': 'yes', 'logParetoFrontPeriod': 5, 'logParetoSize': 'yes',
               'backup': 'no', 'trackAncestry': 'no',
               'randomSeed': 0}
arrowbotsDefaults = {'segments': segments, 'sensorAttachmentType': 'variable',
                     'simulationTime': 10., 'timeStep': 0.1,
                     'integrateError': 'false', 'writeTrajectories': 'false'}
arrowbotInitialConditions = [[0]*segments]*segments # segmentsXsegments null matrix
arrowbotTargetOrientations = [ [1 if i==j else 0 for i in range(segments)] for j in range(segments) ] # segmentsXsegments identity matrix
# Optional definitions for pbsGridWalker that are constant
involvedGitRepositories = mmr.involvedGitRepositories
# dryRun = False

### Required pbsGridWalker definitions
computationName = 'rateSizeSwipe_N' + str(segments)

nonRSGrid = gr.LinGrid('probabilityOfMutatingClass0', 0.0, 0.2, 0, 5) * \
            gr.Grid1d('initialPopulationType', ['sparse', 'random']) * \
            gr.Grid1d('populationSize', [15, 25, 40, 60])
parametricGrid = nonRSGrid*numTrials + gr.Grid1dFromFile('randomSeed', mmr.randSeedFile, size=len(nonRSGrid)*numTrials)

for par in parametricGrid.paramNames():
	evsDefaults.pop(par)

def prepareEnvironment(experiment):
	gccommons.prepareEnvironment(experiment)

def runComputationAtPoint(worker, params):
	return gccommons.runComputationAtPoint(worker, params,
		evsDefaults, arrowbotsDefaults,
		arrowbotInitialConditions,
		arrowbotTargetOrientations)
Esempio n. 2
0
    'integrateError': 'false',
    'writeTrajectories': 'false'
}
arrowbotInitialConditions = [[0] * segments
                             ] * segments  # segmentsXsegments null matrix
arrowbotTargetOrientations = [[1 if i == j else 0 for i in range(segments)]
                              for j in range(segments)
                              ]  # segmentsXsegments identity matrix
# Optional definitions for pbsGridWalker that are constant
involvedGitRepositories = mmr.involvedGitRepositories
# dryRun = False

### Required pbsGridWalker definitions
computationName = 'ccSwipe_N' + str(segments)

nonRSGrid = gr.LinGrid('secondObjectiveProbability', 0.0, 0.05, 0, 20) * \
            gr.Grid1d('initialPopulationType', ['sparse', 'random'])
parametricGrid = nonRSGrid * numTrials + gr.Grid1dFromFile(
    'randomSeed', mmr.randSeedFile, size=len(nonRSGrid) * numTrials)

for par in parametricGrid.paramNames():
    evsDefaults.pop(par)


def prepareEnvironment(experiment):
    gccommons.prepareEnvironment(experiment)


def runComputationAtPoint(worker, params):
    return gccommons.runComputationAtPoint(worker, params, evsDefaults,
                                           arrowbotsDefaults,
Esempio n. 3
0
    'governingNumHiddenNeurons': 12, 'governingMutModifyNeuron': 0.3, 'governingMutModifyConnection': 0.4, 'governingMutAddRemRatio': 1.,
    'behavioralNumHiddenNeurons': 6, 'behavioralMutModifyNeuron': 0.3, 'behavioralMutModifyConnection': 0.4, 'behavioralMutAddRemRatio': 1.,
    'weightScale': 1.,
    'populationSize': 100,
    'genStopAfter': 5000,
    'initialPopulationType': 'sparse', 'secondObjectiveProbability': 1.0,
    'backup': 'yes', 'backupPeriod': 100, 'trackAncestry': 'no',
    'logBestIndividual': 'yes', 'logPopulation': 'no',
    'printGeneration': 'yes', 'printPopulation': 'no', 'printParetoFront': 'yes',
    'logParetoFront': 'yes', 'logParetoFrontKeepAllGenerations': 'yes', 'logParetoFrontPeriod': 10,
    'randomSeed': 42}

### Required pbsGridWalker definitions
computationName = 'afpo_with_mutGoverning'

nonRSGrid = gr.LinGrid('mutGoverning', 0.1, 0.2, 0, 4)
parametricGrid = nonRSGrid * numTrials + gr.Grid1dFromFile(
    'randomSeed', cr.randSeedFile, size=len(nonRSGrid) * numTrials)

for par in parametricGrid.paramNames():
    evsDefaults.pop(par)


def prepareEnvironment(experiment):
    ce.prepareEnvironment(experiment)


def runComputationAtPoint(worker, params):
    return ce.runComputationAtPoint(worker,
                                    params,
                                    evsDefaults,