Tracking Genealogy in a Genealogy Tree
Learn what role genealogy plays and how it can be tracked in a genealogy tree.
What is genealogy?
Sometimes, especially in evolutionary simulations, it’s useful to track the genealogy of evolution. Genealogy is the study of families and family histories. In the context of genetic algorithms, genealogy is the history of a chromosome’s lineage. It allows us to trace the ancestry of a specific chromosome all the way back to the initial population.
To track genealogy, we’ll take advantage of the libgraph package, which is an Elixir package for creating graph structures and offers a ton of convenient features for creating, manipulating, and querying graphs.
Role of genealogy tree in tracking genealogy
We’ll use libgraph to implement a genealogy tree. A genealogy tree is a directed graph that points from the parent chromosome to the child chromosome and shows the transition of the evolution from the first population to the last population. A directed graph is a graph whose edges have a direction; the edges start on one node (the parent) and point to another (the child).
We can use the genealogy tree to trace the origins of the strongest chromosome or to see how traits evolved over time. We can even export your genealogy tree and visualize the genealogy of the evolution with third-party tools. To track the geneology, we will first need to implement the genealogy tree.
However, before we begin, start by adding libgraph to the dependencies:
Get hands-on with 1400+ tech skills courses.