Skip to content
A royal road function in support of the generative fixation hypothesis and hypomixability theory
Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
License.txt
Readme.md
royalroads.py

Readme.md

Experiments with a new royal road function (Contingent Parities) that support the Generative Fixation theory of adaptation and the Hypomixability theory of recombination.

A companion blog post (When will evolution outperform local search?) introduces Contingent Parities Functions and compares the behavior of recombinative evolution and simulated annealing on a member of this class of fitness function.

Usage

Simulated annealing and a genetic algorithm can be run on a contingent parities function of order 2 and height 100 as follows:

Simulated Annealing:

import royalroads as rr
rr.SA(rngSeed=1, numPeriods=1000)

Genetic Algorithm:

import royalroads as rr
rr.GA(rngSeed=1, numGenerations=1000, useClamping=False)

To compare the performance of the two algorithms on the contingent parities function:

import royalroads as rr
rr.compareAlgorithms(numRuns=40)

Dependencies

mmh3, matplotlib, joblib
You can’t perform that action at this time.