r/GeneticProgramming • u/jast • Mar 05 '21
The Genetic Programming Videos
r/GeneticProgramming • u/jast • Mar 05 '21
r/GeneticProgramming • u/_aicumen • Mar 29 '21
Hi,
Does anyone have the following books in their full PDF versions?
- Koza, 1992 : Genetic Programming: On the Programming of Computers by Means of Natural Selection
- Koza, 1994 : Genetic Programming II: Automatic Discovery of Reusable Programs
I would really appreciate any links to download these books or the PDF files themselves! :)
r/GeneticProgramming • u/jmmcd • Mar 10 '20
r/GeneticProgramming • u/chocolategirl • Aug 13 '18
r/GeneticProgramming • u/[deleted] • Mar 03 '25
Hi, hello, I stumbled on this area of CS while researching techniques for commodity trading. Do you have advice for what I should study in school to use this tool?Say, an applied math major? I'd love for someone(s) to give me some tips! School is CU Boulder, top 15 program.
r/GeneticProgramming • u/jmmcd • Jan 19 '24
PhD opportunity in University of Galway, Ireland, to study with Dr James McDermott (ie, me. 2x chair EuroGP, EvoMUSART; GECCO 10-year impact award). To study GP symbolic regression with applications in sustainability - wastewater treatment. New proprietary datasets provided by industry partner.
Fully funded at EU or non-EU level. Stipend EUR25k tax-free. (Galway accommodation is difficult/expensive, NB.)
r/GeneticProgramming • u/jmmcd • Mar 23 '21
r/GeneticProgramming • u/chocolategirl • Jul 22 '18
r/GeneticProgramming • u/ppsn_conference • Dec 02 '25
Hey everyone! The 19th edition of PPSN is happening in Trento, Italy from August 29 to September 2, 2026 🇮🇹
If you're working on evolutionary computation, genetic programming, swarm intel, EDAs, or any other iterative optimization heuristic — this one’s for you. We’re also especially interested in work connecting search heuristics with machine learning or other AI methods.
Both theoretical work (proofs, analysis, models) and solid experimental studies are welcome.
🗓️ Important Dates (AoE)
📍 Conference: Aug 29 – Sep 2, 2026
Workshops & Tutorials
Proposal deadline: Feb 8, 2026
Notification: Feb 22, 2026
Papers
Submission deadline: Mar 28, 2026
Notification: May 22, 2026
🔗 Website: ppsn2026.disi.unitn.it
If you’re planning your 2026 conference calendar, consider joining us — Trento is beautiful, and PPSN is always a great community to discuss evolutionary computation and GP research.
Hope to see many of you there!
r/GeneticProgramming • u/rdreisinger • Aug 23 '25
I am engineer who works on creating evolutionary algorithms and I've been taught by a student of Koza. So fair to say, I have a soft spot for genetic programming and it fascinates me a lot. I always had the idea at the back of my head that the evolutionary algorithm I work on would probably do very well with genetic programming.
That said, I’ve struggled to find concrete, practical use cases where I could try it out as a proof-of-concept situation. This is also something that I never quite figured out: how confined is genetic programming to research? It's fascinating, but also it's been hard for me to think of viable commercial use-cases. Does GP have any potential to have an edge over other approaches today or in the near future?
r/GeneticProgramming • u/jmmcd • Mar 10 '21
r/GeneticProgramming • u/victor_sfl • Jan 24 '20
r/GeneticProgramming • u/navya_boyapati • Dec 12 '19
r/GeneticProgramming • u/sigma_noise • Feb 26 '19
GP is endlessly fascinating to me. It seems so powerful that I'm surprised why its not discussed more often like nueral nets are these days. I know one downside of GP is the high computational requirements, but computing power is getting cheaper by the day on services like AWS and Azure.
Where is a good place I can learn about the state of the art in GP, and the current strengths and weaknesses? Is development 'stuck' in some area that is preventing wider adoption?
r/GeneticProgramming • u/chocolategirl • Dec 25 '18
r/GeneticProgramming • u/[deleted] • Aug 10 '25
Let's be logical here:
- Genetic programming is about generating computer code
- Therefore if enough complex software can be reliably generated this software can basically replicate the code used to generate it and improve upon it
Closing this loop means we have meta GP where the system modifies itself.
If I am correct isn't that the true definition of a Singularity... based on gravity or logic like here i.e convergence to infinite perfection or gravity in a massive feedback loop.
r/GeneticProgramming • u/[deleted] • May 29 '24
As a hobby project, I currently play around applying AI/ML to finding formulas that one can calculate in ones head. One of the most well-known examples likely is the Doomsday algorithm.
For day of the week calulation: "Re-discover" formulas like in this section. Ideally, discover new such formulas.
Sunrise calculation: For this one, I would like to find an (approximation) algorithm that is suitable for mental calculation, while being of by some margin, say, 20 minutes.
I would like to do both by generating a bunch of data and throwing cpu/gpu cycles at it.
Symbolic Regression
Tried: FeynmannAI, PySR
I like the generated formulas, but unfortunately they are contain float coefficients, while I need integer coefficients (calculations involving floats are hard to do mentally)
Genetic Programming
Tried: DEAP
I like that I can constrain the generated formulas much more (i.e. by only including integer terminals), but I find it quite hard to get good formulas by playing around with the genetic parameters (population, kind of mutation, kind of crossover etc.)
A) Are there symbolic regression programs that do not produce formulas with floats in them?
B) Regarding Genetic Programming: Is this the right approach for 1) and 2)? Should I just try harder and learn more about parameter tweaking?
C) Are there other approaches I can try?
Thank you for your time!
r/GeneticProgramming • u/Bit-Kind • Jun 17 '21
Hey there,
im working on a project for university where Pacman should learnt to nagivate through the Level by using a genetic program. Im using Python and Deap, but i lack the understanding of how to implement it. The Pacman class can handles the movement and the input it gets from the envirnment (it sees, what block is above, below, right and left).
My Program looks like this:
import pygame_functions as pgf
import pygame, sys
from Colors import *
import random as rdm
import time
import operator
from deap import base
from deap import creator
from deap import tools
from deap import gp
from deap import algorithms
import numpy
import statistics
directions = {0: (1, 0), 1: (-1, 0), 2: (0, -1), 3: (0, 1)}
blockSize = 24 # amount of pixels one grid has on the tilemap
WINDOW_HEIGHT = 36 * blockSize
WINDOW_WIDTH = 28 * blockSize
pygame.init()
cols, rows = 28, 36
points = {}
steps = 600
pygame.display.set_mode()
pgf.screenSize(WINDOW_WIDTH, WINDOW_HEIGHT)
pgf.setAutoUpdate(False)
SCREEN = pgf.screen # pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT))
class Pacman():
def __init__(self):
self.name = "pacman"
self.x = 336
self.y = 636
self.richtung = 0
self.rx, self.ry = 1, 0
self.modus = 'jagd'
self.picNr = 0
self.onGrid = False
self.i = 1
self.sprites = {'jagd': [pgf.makeSprite("Teil_17_Pacman_Tileset.png", 12), 3, True]}
#'tot': [pgf.makeSprite("Teil_17_pacman_die.png", 12), 12, False]}
self.sprite = self.sprites[self.modus][0]
self.keylock = 0
self.moves = [1, 2, 3, 4]
self.pointsEaten = 0
self.steps = 300
self.shouldMove = True
self.site = [False, False] #Rechts True, Unten True
self.up, self.right, self.down, self.left = "|", "|","|","|"
def getSite(self):
if self.i % 28 >= 14:
self.site[0] = True
else:
self.site[0] = False
if self.i >= 504:
self.site[1] = True
else:
self.site[1] = False
def lookAround(self, tilemap):
if not self.onGrid: return
self.right = str(tilemap[self.i + 1])
self.down = str(tilemap[self.i + 28])
self.left = str(tilemap[self.i - 1])
self.up = str(tilemap[self.i - 28])
#self.getSite()
def directionValid(self, richtung, tilemap):
rx, ry = directions[richtung]
i = self.i + rx + ry * cols # Spalten
return tilemap[i] != "|"
def moveUp(self):
self.keylock = 2
def moveRight(self):
self.keylock = 0
def moveDown(self):
self.keylock = 3
def moveLeft(self):
self.keylock = 1
def show(self):
pgf.moveSprite(self.sprite, self.x, self.y, centre=True)
pgf.showSprite(self.sprite)
def move(self):
if self.shouldMove:
self.x += self.rx
self.y += self.ry
self.i = xy2i(self.x, self.y)
x2, y2 = i2xy(self.i)
self.onGrid = self.x == x2 and self.y == y2
def changeDir(self, richtung, map):
if self.directionValid(richtung, map):
self.richtung = richtung
self.rx, self.ry = directions[richtung]
return True
def animate(self):
sprite, animationsbilder, dirDependent = self.sprites[self.modus]
self.picNr = (self.picNr + 1) % animationsbilder
if dirDependent:
self.picNr += animationsbilder * self.richtung
pgf.changeSpriteImage(sprite, self.picNr)
def movement(self, points, tilemap):
if not self.onGrid:
return
#self.shouldMove = False
self.steps -= 1
#self.keylock = move
self.eatPoints(points, tilemap)
self.changeDir(self.keylock, tilemap)
if not self.directionValid(self.richtung, tilemap):
self.rx, self.ry = 0, 0
def eatPoints(self, points, tilemap):
if tilemap[self.i] not in (".", "x", "o", " "):
return
self.pointsEaten += 1
tilemap[self.i] = "0"
pgf.killSprite(points[self.i].sprite)
del points[self.i]
class Point():
def __init__(self, pos, bilddatei):
super().__init__()
self.x, self.y = pos
self.sprite = pgf.makeSprite(bilddatei)
pgf.moveSprite(self.sprite, self.x - 12, self.y - 12)
def i2xy(i):
sp, ze = i % cols, i // cols
return sp * blockSize + blockSize // 2, ze * blockSize + blockSize // 2
def xy2i(x, y):
sp, ze = (x - blockSize // 2) // blockSize, (y - blockSize // 2) // blockSize
return ze * cols + sp
pointSprites = pygame.sprite.Group()
def placePoints(tilemap):
for i, char in enumerate(tilemap):
if char not in (".", " ", "o", "x"):
continue
points[i] = Point(i2xy(i), 'Teil_17_Punkt.png')
pointSprites.add(points[i].sprite)
pgf.showSprite(points[i].sprite)
return points
def drawGrid(tilemap, SCREEN):
num = 0
i = 0
#text = font.render(num.__str__(), True, WHITE)
cells = []
for x in range(0, WINDOW_HEIGHT, blockSize):
for y in range(0, WINDOW_WIDTH, blockSize):
rect = Cell(y, x, blockSize, 0)
cells.append(rect)
pygame.draw.rect(SCREEN, GREY, rect.draw(), 1)
#SCREEN.blit(text, (rect.x, rect.y))
# text = font.render(stri, True, WHITE)
for tile in tilemap:
if tile == "_":
pygame.draw.rect(SCREEN, RED, cells[i].draw())
i = i + 1
elif tile == "|":
pygame.draw.rect(SCREEN, GREEN, cells[i].draw())
i = i + 1
elif tile == "-":
pygame.draw.rect(SCREEN, BLACK, cells[i].draw())
i = i + 1
elif tile == "." or tile == " " or tile == "o" or tile == "x":
pygame.draw.rect(SCREEN, BLUE, cells[i].draw(), 0)
i = i + 1
else:
pygame.draw.rect(SCREEN, GOLD, cells[i].draw(), 0)
i = i + 1
def playAGame(individual: Pacman):#, tilemap):
for sprite in pointSprites:
pgf.killSprite(sprite)
print("start a game!")
running = True
tilemap = rdm.choice(maps)[:]
drawGrid(tilemap, SCREEN)
pygame.image.save(SCREEN, "screenshot.png")
pgf.setBackgroundImage("screenshot.png")
points = placePoints(tilemap)
#numPoints = len(points)
characters = [individual]
nächsteAnimation = pgf.clock() + 100
start_time = time.time()
tick = 0
tickrate = 100
while running:
tick = tick + 1
pgf.tick(tickrate)
# print("--- %s seconds ---" % (round(time.time() - start_time)))
tick += 1
#if individual.steps <= 0:
# break
#if len(points) <= 0:
# running = False
# break
if pgf.keyPressed('right'):
individual.moveRight()
if pgf.keyPressed('left'):
individual.moveLeft()
if pgf.keyPressed('up'):
individual.moveUp()
if pgf.keyPressed('down'):
individual.moveDown()
if pgf.keyPressed("p"): pgf.pause(100000)
for character in characters:
if pgf.clock() > nächsteAnimation:
pass
character.animate()
character.movement(points, tilemap)
character.lookAround(tilemap)
character.move()
character.show()
if pgf.clock() > nächsteAnimation:
nächsteAnimation += 100
pgf.updateDisplay()
if pgf.keyPressed('ESC'):
break
pgf.killSprite(individual.sprite)
#del individual
print("game is over")
print(individual.pointsEaten)
return individual.pointsEaten,
tilemap_str1 = ("____________________________"
"____________________________"
"____________________________"
"||||||||||||||||||||||||||||"
"|..........................|"
"|.||||.||.||||||||.||.||||.|"
"|.||||.||.||||||||.||.||||.|"
"|.||...||....||....||...||.|"
"|o||.||||.||.||.||.||||.||o|"
"|.||.||||.||.||.||.||||.||.|"
"|......||.||.||.||.||......|"
"|.||||.||.||....||.||.||||.|"
"|.||||.||.||||||||.||.||||.|"
"|...||.||.||||||||.||.||...|"
"|||.||................||.|||"
"__|.||.||.||||||||.||.||.|__"
"__|....||.|______|.||....|__"
"__||||.||.|______|.||.||||__"
"_____|.||.|______|.||.|_____"
"_____|.||.||||||||.||.|_____"
"_____|.||..........||.|_____"
"_____|.||||| ||.|||||.|_____"
"||||||.||||| ||.|||||.||||||"
".............||............."
"|||.|||||.||||||||.|||||.|||"
"|||.|||||.||||||||.|||||.|||"
"|.............x............|"
"|o||||.||.||||||||.||.||||o|"
"|.||||.||.||||||||.||.||||.|"
"|.||...||.||....||.||...||.|"
"|.||.||||.||.||.||.||||.||.|"
"|.||.||||.||.||.||.||||.||.|"
"|............||............|"
"||||||||||||||||||||||||||||"
"____________________________"
"____________________________")
tilemap_str2=( "____________________________"
"____________________________"
"____________________________"
"||||||||||||||||||||||||||||"
"|............||............|"
"|.||||.|||||.||.|||||.||||.|"
"|.||||.|||||.||.|||||.||||.|"
"|.||||.|||||.||.|||||.||||.|"
"|..........................|"
"|.||||.||.||||||||.||.||||.|"
"|.||||.||.||||||||.||.||||.|"
"|......||....||....||......|"
"||||||.|||||.||.|||||.||||||"
"||||||.|||||.||.|||||.||||||"
"||||||.||..........||.||||||"
"||||||.||.||||||||.||.||||||"
"||||||.||.|______|.||.||||||"
"..........|______|.........."
"||||||.||.|______|.||.||||||"
"||||||.||.||||||||.||.||||||"
"||||||.||..........||.||||||"
"||||||.||.||||||||.||.||||||"
"||||||.||.||||||||.||.||||||"
"|............||............|"
"|.||||.|||||.||.|||||.||||.|"
"|.||||.|||||.||.|||||.||||.|"
"|...||................||...|"
"|||.||.||.||||||||.||.||.|||"
"|||.||.||.||||||||.||.||.|||"
"|......||....||....||......|"
"|.||||||||||.||.||||||||||.|"
"|.||||||||||.||.||||||||||.|"
"|..........................|"
"||||||||||||||||||||||||||||"
"____________________________"
"____________________________")
tilemap1 = list(tilemap_str1)
tilemap2 = list(tilemap_str2)
maps = [tilemap1[:], tilemap2[:]]
class Cell:
x: int
y: int
blockSize: int
id: int
def __init__(self, x, y, blockSize, id):
self.x = x
self.y = y
self.blockSize = blockSize
self.id = id
def draw(self):
return pygame.Rect(self.x, self.y, self.blockSize, self.blockSize)
# CLOCK = pygame.time.Clock()
# SCREEN.fill(BLACK)
pacman1 = Pacman()
# HERE SHOULD THE GENETIC PROGRAM START
##### DEAP #####
pset = gp.PrimitiveSet("MAIN", 4)
pset.addPrimitive(Pacman.movement,1)
pset.addPrimitive(Pacman.moveUp,1)
pset.addPrimitive(Pacman.moveRight,1)
pset.addPrimitive(Pacman.moveDown,1)
pset.addPrimitive(Pacman.moveLeft,1)
pset.addTerminal(Pacman.animate,1)
creator.create("FitnessMin", base.Fitness, weights=(-1.0,))
creator.create("Individual", gp.PrimitiveTree, fitness=creator.FitnessMin)
toolbox = base.Toolbox()
toolbox.register("expr", gp.genHalfAndHalf, pset=pset, min_=1, max_=2)
toolbox.register("individual", tools.initIterate, creator.Individual, toolbox.expr)
toolbox.register("population", tools.initRepeat, list, toolbox.individual)
toolbox.register("compile", gp.compile, pset=pset)
def eval(individual):
# Transform the tree expression in a callable function
func = toolbox.compile(expr=individual)
# Evaluate the mean squared error between the expression
# and the real function : x**4 + x**3 + x**2 + x
#sqerrors = ((func(x) - x**4 - x**3 - x**2 - x)**2 for x in points)
return playAGame(individual),
toolbox.register("evaluate", eval)
toolbox.register("select", tools.selTournament, tournsize=3)
toolbox.register("mate", gp.cxOnePoint)
toolbox.register("expr_mut", gp.genFull, min_=0, max_=2)
toolbox.register("mutate", gp.mutUniform, expr=toolbox.expr_mut, pset=pset)
toolbox.decorate("mate", gp.staticLimit(key=operator.attrgetter("height"), max_value=17))
toolbox.decorate("mutate", gp.staticLimit(key=operator.attrgetter("height"), max_value=17))
stats_fit = tools.Statistics(lambda ind: ind.fitness.values)
stats_size = tools.Statistics(len)
mstats = tools.MultiStatistics(fitness=stats_fit, size=stats_size)
mstats.register("avg", numpy.mean)
mstats.register("std", numpy.std)
mstats.register("min", numpy.min)
mstats.register("max", numpy.max)
pop = toolbox.population(n=300)
hof = tools.HallOfFame(1)
pop, log = algorithms.eaSimple(pop, toolbox, 0.5, 0.1, 40, stats=mstats,
halloffame=hof, verbose=True)
##### END DEAP #####
##### PYGAME #####
font = pygame.font.SysFont("Times New Roman, Arial", 10)
#pgf.screenSize(WINDOW_WIDTH, WINDOW_HEIGHT)
#pgf.setAutoUpdate(False)
#SCREEN = pgf.screen # pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT))
playAGame(Pacman())
So I can run the game and play, but im unable to understand how to use a syntax tree to implement the GP. Can I use methods from the Pacman class as Primitives in the first place?!
Honestly, im really really thankful for every input. <3
r/GeneticProgramming • u/dei-uc • Nov 02 '20
r/GeneticProgramming • u/chocolategirl • Sep 19 '19
r/GeneticProgramming • u/tafukt • Feb 28 '19
Hei guys!
I made a genome network that takes genetic programming to behave like neural network! very fast than traditional genetic programming ! I used only one Genome (tree) instead of traditional thousands. and gives good results for any given problem either classification or regression ! check it out at :
https://github.com/DanShai/Genome
any feedback are welcome!
r/GeneticProgramming • u/chocolategirl • Dec 27 '18
r/GeneticProgramming • u/chocolategirl • Nov 29 '18
r/GeneticProgramming • u/ufukty • Apr 04 '25
I've pushed my codebase to GitHub today, which I was working on it until last year the time I finished my thesis.
The goal is here using ASTGP (i don't know if there is many people using this term) to produce programs in a language with imperative paradigm; which makes it more difficult for GP to navigate compared to most of the applications of GP which are on functional languages because of 'side effects' create too many worm wholes (?) in the search space. Anyway my last direction was using layers of nested (?) evolutions to reduce the impact of errors in finer 'levels' on 'higher' levels. By levels, i mean the different (but inclusive) evolution processes that searches for eliminating one syntax error, or one semantical error, or one candidate algorithm. Separating the search into layers is important because each layer has different constraints. Eliminating a syntax error enables us to actually run the candidate and calculate the score against the given unit test. Without that, the evolution controller is blindly shooting in search space, even without the survived candidates creating a guide for the right direction. Evolution in higher layers can benefit from the survived candidates on picking the direction (unlike the syntax level evolution); although it is almost guaranteed that recombining of one or two syntactically correct candidates will result with a candidate that doesn't even compile due to a syntax errors, even the candidate is closer to the solution than its parents. So, spanning smaller scoped, short living "sub-searches" is inevitable to eliminating syntax errors.
I am not sure if this text is enough to explain everything. There is an actual thesis about this online. It is in Turkish though.
I believe that EAs complements to LLMs. One provide general knowledge at scale and the other produce innovation in the most budget-aware way. They are perfect for each other. Well, I was planning to keep this project closed source in case if I find time later to make it work. The project actually contains good utilities to perform genetic operations on Go AST. So, it doesn't produce anything [meaningful](https://github.com/ufukty/tde/blob/main/docs/thesis/appendix/code%20candidates%20of%20non-ca%2C%20non-st-astgp%20stg.md) at the moment but can be beneficial for couple people, if there is anyone working on applying GP on imperative languages.