Skip to content

Instantly share code, notes, and snippets.

ITS GONE!
I generalized the code and created examples for use in GA and GP:
https://github.com/DMTSource/deap_ray
@DMTSource
DMTSource / deap_ray_np_symbreg.py
Last active April 19, 2023 10:00
Example of deap symbreg(GP) via Ray for cluster and local machine scaling with efficient memory objects
# This file is part of EAP.
#
# EAP is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# EAP is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@DMTSource
DMTSource / deap_diversity_plot.py
Last active December 7, 2019 18:08
Example on how to extract and plot fitness diversity for a population, hall of fame, or frontier using histogram and probability curves. From question https://groups.google.com/forum/#!topic/deap-users/Y8JX4AKwzhk
# Examples on how to extract and plot fitness diversity for a population, hall of fame, or
# frontier using histogram and probability curves. Mostly working with multi objective fitness as per
# question from https://groups.google.com/forum/#!topic/deap-users/Y8JX4AKwzhk
# Derek M Tishler - 2019
import array
import random
@DMTSource
DMTSource / deap_ga_array_constrained.py
Last active January 21, 2020 10:36
GA example of an array of constrained value items with crossover and mutation, from question https://groups.google.com/forum/#!topic/deap-users/bu3v9Ozez8E
# GA example of an array of constrained value items with crossover and mutation,
# from question https://groups.google.com/forum/#!topic/deap-users/bu3v9Ozez8E
# Derek M Tishler - 2019
# Started with example and modified to keep as simple as possible:
# https://raw.githubusercontent.com/DEAP/deap/454b4f65a9c944ea2c90b38a75d384cddf524220/examples/ga/onemax_np.py
import random
@DMTSource
DMTSource / deap_multi_objective_pyplot_example.py
Last active January 6, 2021 13:58
DEAP multi objective plotting example
# Example of multi objective plotting in Deap
# Derek M Tishler - 2018
import numpy as np
import matplotlib.pyplot as plt
plt.rc('xtick', labelsize=8)
plt.rc('ytick', labelsize=8)