Jevo is a high-performance, distributed, and modular (co-)evolutionary algorithm framework written in Julia. It is designed to be flexible and easy to use, with a focus on deep neuroevolutionary applications using Flux.jl. Jevo is designed to be easy to use, with a simple API that allows users to quickly define custom evolutionary algorithms and run them on distributed systems.
Jevo powers the paper Low Rank Factorizations are Indirect Encodings for Deep Neuroevolution. See experiments/
for the configuration files.
Warning
Jevo is currently alpha software and is under active development.
Jevo's source contains ~5k lines of code, ~50% of which is in src/environments
and src/organisms
.
This package requires modified versions of Transformers.jl and NeuralAttentionlib.jl, and a library for Phylogenies (PhylogeneticTrees.jl) which are unregistered. To install all dependencies, run the following command in the environment of your choice:
julia ./install.jl
using Jevo
using Logging
using StableRNGs
STATS_FILE = "statistics.h5"
isfile(STATS_FILE) && rm(STATS_FILE)
global_logger(JevoLogger())
rng = StableRNG(1)
k = 1
n_dims = 2
n_inds = 2
n_species = 2
n_gens = 10
counters = default_counters()
ng_gc = ng_genotype_creator = Creator(VectorGenotype, (n=n_dims,rng=rng))
ng_developer = Creator(VectorPhenotype)
comp_pop_creator = Creator(CompositePopulation, ("species", [("p$i", n_inds, ng_gc, ng_developer) for i in 1:n_species], counters))
env_creator = Creator(CompareOnOne)
state = State("ng_phylogeny", rng,[comp_pop_creator, env_creator],
[InitializeAllPopulations(),
InitializePhylogeny(),
AllVsAllMatchMaker(),
Performer(),
ScalarFitnessEvaluator(),
TruncationSelector(k),
CloneUniformReproducer(n_inds),
Mutator(),
UpdatePhylogeny(),
LogPhylogeny(),
PurgePhylogeny(),
PopSizeAssertor(n_inds),
ClearInteractionsAndRecords(),
create_op("Reporter",
retriever=Jevo.get_individuals,
operator=(s,is)-> foreach(i->println(i.genotype), is)
),
Reporter(GenotypeSum, console=true)], counters=counters)
run!(state, n_gens)