nowfound

Life & fun · June 24, 2015

MF

My first Genetic Algorithm program

Wrote a program in FreeBASIC to try and find out how Genetic Algorithms work. It's a quick hack that I wrote to try some theories with because the Wikipedia Article on GAs reads like greek to me. So I built it from the general principles i knew at the time. The "genome" per individual is an array of 9000 integers but I used only monochrome pictures with either black or white; An individual also has a fitness score. There are 1000 individuals in the population and only two are selected to reproduce. So that makes 9 million (yes, MEELION as El Reg would write) data points and the scoring…

My first Genetic Algorithm program launched on June 24, 2015 with 19 votes, #1,364 of 3,954 launches that month and more than 75% of that year's launches.

In plain words

This is a FreeBASIC program that demonstrates how genetic algorithms work through practical experimentation. It evolves a population of 1,000 individuals, each representing a 9,000-integer genome that encodes monochrome images, by selecting the two fittest candidates to reproduce each generation. The program tracks fitness scores across millions of data points and applies a 0.002% mutation rate to prevent stalling. Built as an educational exploration rather than an optimized tool, it's designed for people trying to understand genetic algorithms through hands-on implementation.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

Wrote a program in FreeBASIC to try and find out how Genetic Algorithms work. It's a quick hack that I wrote to try some theories with because the Wikipedia Article on GAs reads like greek to me. So I built it from the general principles i knew at the time. The "genome" per individual is an array of 9000 integers but…

Does a similar job

all alternatives →
  • AG
  • Swarm – Program a colony of 200 ants using a custom assembly languageMar 2026 · dev.moment.com · ▲190

    We built an ant colony simulation as an internal hiring challenge at Moment and decided to open it up publicly. You write a program in a custom assembly-like (we call it ant-ssembly) instruction set that controls 200 ants. Each ant can sense nearby cells (food, pheromones, home, other ants) but has no global view. The only coordination mechanism is pheromone trails, which ants can emit and sense them, but that's it. Your program runs identically on every ant. The goal is to collect the highest percentage of food across a set of maps. Different map layouts (clustered food, scattered,…

  • MB
    My Book on Evolutionary Algorithms, Written in Python Notebooks2020 · shahinrostami.com · ▲63

    Beautiful Data Science

  • Genetic Hello World2017 · github.com · ▲76

    Contribute to sacert/Genetic-Hello-World development by creating an account on GitHub.

  • OS
    Open-Source AlphaEvolve Clone Using GPT-4.1 and Genetic Programming2025 · ▲20

    Everyone saw the AlphaEvolve hype. I got obsessed with how it might work under the hood and decided to just build it myself. My setup uses GPT-4.1 to mutate matrix multiplication code, guided by a bunch of hand-crafted mutation strategies (loop reordering, tiling, Strassen, etc.). Each candidate is evaluated on both speed and accuracy. Then I apply Pareto selection with crowding distance to evolve better ones over generations. I ran into all the usual LLM reward hacks-returning the input, calling np.dot, etc. So I forced primitive-only implementations and tightly constrained the mutation…

  • I started a repo for sharing algorithm implementations2013 · github.com · ▲52

    Everything that would be here is in the README. I hope this gets big, it has tons of potential.

More life & fun this month

the category →

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, June 2015

the whole month →
  • A​rticles you need to read before launching a startup.

    Growth · 2015 · startuplaunchlist.com

  • Get any site's company logo with just a URL

    Dev tools · 2015 · clearbit.com

  • The best new games, every day

    Life & fun · 2015

  • Coverr▲584

    Beautiful, free videos for your homepage background.

    Work · 2015 · coverr.co

  • SLIDE▲563

    A hoverboard by Lexus (no joke)

    Life & fun · 2015

  • The Best Landing Page Inspiration

    Work · 2015 · lapa.ninja