An Intro to Genetic Algorithms and ZED

By Ryan Trost


Wen Breed? WeN Drop?? If you’re an active participant in the official ZED discord, you’ve no doubt noticed the frustration, confusion and uncertainty surrounding the early stages of this exciting new world. If you’re a new member or innocent bystander, you may be wondering; “How do I get involved?”, “Should I get involved?”. Even relatively seasoned ZED veterans may be questioning their next move, and the future. In an attempt to bring perspective and light to future decision making for all ZED members past, present and future, I offer here an exploration into the key use case dominating the ZED ecosystem: breeding winning racers.

For some completely unsolicited and shameless background, I am a biomedical engineering graduate turned professional US equities trader. I deal in risk-reward as a profession. Fundamentally I am drawn to the idea of coupling genetic algorithms with odds-based income generation. It’s almost an extension of my professional career. But enough about that, let’s explore the layman's terms building blocks of the ZED ecosystem.

For your consideration, I present here a flow-chart highly conserved amongst genetic algorithms:

 
To assist in grasping each ladder of this flow, I will postulate the analog for each step within ZED’s universe.

Generate Initial Population
- All genesis horses, Naka, Szabo, Finney, Buterin, Z1-Z10
- Generated with random, unknown (to the user/player) DNA characteristics

Calculate Fitness of Individual
- Currently this is presented in two ways, short term and long term.
- Short term: initial odds through Griffin races and early races (let’s say sub 20 races)
- Long term: Win rate, place rate, placing distribution over 100-200+ races

Satisfy Stop Criterion

Here the water gets muddy. You can perceive this step in multiple ways, but the stop criterion boils down to simply: when to NOT breed, and end the chain.

There are multiple factors determining how users are coming to this conclusion at the moment:

  • Horse is a proven winner, showing win rates >10% with positive ROI statistics through races across distance/classes and quantity of races (you can find that data here on our site)
  • Horse is a genesis, unbred with the potential to unlock an entire new bloodline
  • Horse is glue, lacks win rate, poor odds (>20-25 for example)
  • Horse is a low Z#, unraced and unbred, purely a collectors item
Each of the above factors into the risk versus reward decision regarding whether to breed any given horse. It really can just be lack of funds or lack of motivation by the stable owner. But end of the day, Stop Criterion is: DO NOT BREED.

Selection of Individuals (for mating)

- This step revolves entirely around choosing a breeding pair. Every decision that comes into play here has been outlined above, and surely there are some I’ve missed.
- Stables will breed their own duds, winners, or mid-tier horses for experimentation, income generation, or genetic selectivity. They will attempt to mix with others for a wide variety of motivations.
- Stud farm. P2P mating, all come into play here.

Selection of Genetic Operator

Here we are. ZED’s secret sauce. The “genes” of each and every individual horse. We can spend hours and hours postulating, theorizing the genetic makeup of our digital horses. It can be as simple as one chromosome with N factors (where N is any number), or multiple chromosomes each contributing to one factor making up the larger racing fitness of the horse.

Ok. Listen. I get that for someone who has come into this with some extra money, looking to make a quick buck and have some fun, this is a lot to unwrap. Let me make it simple with a one chromosome explanation, while attempting to produce a ZED analog. Remember, this is in no way representative of the actual ZED horse code/algorithm, but it will serve to better explain the bigger picture purpose here.


The quickest google search produces the above example of a simple, 1 chromosome individual. This individual is described by:
 
Where each individual box is a Gene. In a single chromosome ZED universe, each of these boxes may be an individual contributor to the overall fitness of the horse. The first box could be speed, the second; fatigue. The third acceleration, the fourth traction (for weather purposes down the road), the fifth could be fear, or any characteristic that may lead to gate preference. For example a more scared horse may not like being middle of the pack in what feels like a crowded lane... you get the point.

The numerical value inside of each gene determines the Phenotype, or the way said horse expresses its version of that gene. For our novel example, let’s say we have a winning horse, who prefers short distances. Take The Crimson Chin for example.

An absolute star in sprint races (1000m-1400m), The Crimson Chin may have very high acceleration with decent overall speed. This makes him a killer in sprints, but slightly worse in longer distances. Again, this is all postulation and there absolutely are hidden genes we don’t yet understand.

When a horse breeds with another, the chromosome is the genetic operator. How that chromosome is conserved into the offspring, the rate of mutations, the cost/benefit of any outcome, is determined by ZED’s algorithm. We don’t know, and likely never will completely know, the exact genetic makeup of each individual horse.

In our novel example, horse A1 and horse A2 are chosen to breed, for whatever predetermined reason its owners have chosen to conclude neither has met Stop Criterion.

 
We now enter the next phase…

Crossover Operator

In the flow of genetic algorithm logic, this is how each individual's chromosomes interact in the breeding process with each other. We have to theorize this, but I believe it is safe to conclude that there is a level, predetermined by ZED, of conservation of genetic information and chance of mutation (see next section). This way, over a long term, proven racers should have some type of advantage in producing “fit” offspring over lesser racers. In our above example, the progeny of individuals A1 and A2 is determined by a random crossover point. For the example above the middle was chosen.

Let’s continue with our novel approach and say that out of six genes, genes 1-3 determine innate racing ability, while genes 4-6 control gate preference, fatigue, distance preferences, etc. In this random crossover, individual A5 conserved the innate racing ability of its parent A2, while individual A6 conserved the innate racing ability of its parent A1. Further, individual A5 conserved the preferences of its parent A1 while individual A6 kept the preferences of its parent A2. This is how we get new offspring with new, but conserved characteristics.

Key point to remember: ZEDs algorithm is likely orders of magnitude more complicated than this, but truly based on the fact that there are horses who share similar characteristics and racing distributions, we can follow the logic here in this novel example to better understand the bigger picture.

Mutation Operator

Finally we come to the last point on the flow, Mutation Operator. In our novel example, this would be the rate of prevalence (again, likely predetermined within ZEDs algorithm) of point mutations within the chromosomes of the new offspring. So at some random rate, the probability of an individual to mutate and present a new overall fitness can produce the following scenario:
 
So our horse that maintained the innate racing ability of its parent A2, now has undergone mutation and shares traits randomly with both parents, creating an entirely new “fitness”, and a new, unique individual.

We complete the breeding process, and the cycle begins anew.

Defining the Bull Case

Using our extremely novel case outlined above, we have come to the conclusion that there is a logical progression as Z1 -> Z268 to new levels of fitness. Some attributes are conserved, some are mutated, and some are lost. The overall racing ability of any one horse is a random combination of its parents characteristics, as a function of random crossovers and mutations. So what does any of these mean for the average player?

There are three different methods of making money within the ZED ecosystem.

  1. Collecting Low Z# genesis horses
    • Rarity, potential, scarcity of bloodlines (lower overall supply of genetic makeups)
  2. Selling offspring through Stud Farm or P2P sale of new horses
  3. Racing
 
While it is incredibly important to have multiple use cases and methods of income generation (user retention), the purpose of the underlying “tech” driving the ecosystem is the necessity for the algorithm to continue to approach peak fitness levels. That is, finding the best racers in the game. The “staying power” and longevity of ZED as a whole fundamentally depends on breeding AND racing.
Proven racers will be more desirable to procreate. Their bloodlines will be conserved and mixed with other proven racers. Selective breeding will move the ecosystem towards high Z#s in the search for the champion, perennial winners.
So again, where do you, the average ZED Run participant fit into this movement?

Every Horse Has Value

Let’s get this straight. These are early days. There will be speculation, preposterous valuations, bugs, hotfixes and contention. But underneath it all, is some truly fascinating technology. Artificial simulation of genetics, and a real, FUN use case to boot. But still, nothing comes for free. You will have to put up some money to get started here. But the reality of the situation is that there is a literal TREASURE trove of information still to be uncovered.

According to our data there are 6700+ unraced horses in the ZED universe. That is 6700+ number of times where we have NO idea what the fitness level of those horses are. No idea what type of racers they are, or can produce. This unknown creates a perception of value, and long term holders will keep many of these unraced. But my argument, take it or leave it, is that the lack of information (race data), keeps us from better understanding how the algorithm works, and what truly defines the fitness level of any individual.

I understand, it costs money to race. No one likes to lose. But if you make an investment in this space, and want to better your long term potential in terms of both breeding AND racing, understanding the way genetic algorithms produce new levels of fitness and new RACERS is key. If you are a new user, buy a horse. Use our site to better understand its history. Make calculated decisions. Understand risk.

Those who are here for a “get-rich-quick”, lotto-style environment, enjoy your time. You may even make a quick buck! But it is foolish to look past the long term possibilities, the possibility that ANY horse can be a winner, or produce a winner. Hunting down genetically favorable individuals, making relationships with other stables to progress together, and fostering a community where we understand the higher timeframe purpose of the ZED ecosystem, taking risks. Engaging in these endeavors together pushes us forward, drives the ZED developers to produce better fixes and foster more engaging debate. It simply is too early to give up on a horse, to give up looking, or to give up on ZED. Your next offspring may very well be the next Breathless Edge, Rendezvous Peak, or our own Vanilla Bean. Stay the course, understand the purpose and use case, and we can all continue to enjoy and succeed together!

For more informative content, strategy and engagement, keep a look out for more blog posts! We can always be reached on Twitter or find us in the ZED Discord server.

We hope you continue to enjoy and make great use of our site.





Back