Time Nick Message 07:29 Norkle :0 07:40 MTDiscord Ö 15:03 wallabra Hi! 15:03 wallabra I was thinking about writing a mod where trees and other kinds of organisms have "genetic fields", e.g. one contains a list of intsructions for how to grow wood and in which directions, another contains what kinds of fruit to spawn and at which season, etc 15:03 wallabra Ans then you'd be able to breed trees 17:07 sfan5 sounds interesting 17:09 sfan5 I wonder how you'd properly model that so the results are actual unique, new things 19:23 schwarzwald[m] You could have a single base "tree" that contains genes for a whole bunch of predefined stuff with some relation of which genes are dominant, and then break it into just a couple subtrees that make sense for the default game. 19:24 schwarzwald[m] No new information is ever created, and in fact if you ever use up all of a tree that has a particular gene you can never get that tree back. 19:24 schwarzwald[m] However, you can create "unique, new things". 19:26 schwarzwald[m] wallabra, how true to the real world were you thinking this mod might be as far as how you breed trees? 19:26 wallabra Not to the point of being absurd to implement 19:26 wallabra I mean, real genetic code is nothing like what I've mentioned 19:27 wallabra Mutation could be feasible to do at some point 19:27 wallabra And would introduce variation and genuinely new things, which is what sfan5 was concerned about 19:28 schwarzwald[m] I was more thinking about the mechanics of how you do the breeding. 19:28 schwarzwald[m] Like, would you take an apple log and just place a cherry log on top of it and call that a "graft" and have it grow a new tree? That would be kind of weird. 19:31 hedae[m] Grafting trees logwise seems weird, maybe "grafting" (planting) a sapling on a log? 19:31 schwarzwald[m] That's an interesting idea! 19:33 schwarzwald[m] Hmm, how would you identify the result for naming? 19:34 schwarzwald[m] You might be able to grow a tree that has no useful properties and is hardly distinguishable from a similar tree. 19:34 schwarzwald[m] You'd have to name each one somehow. 19:35 schwarzwald[m] I guess you could call a bunch of them just "tree" and switch out specific names for predefined useful trees. 19:36 hedae[m] Why not just not label trees, and have keeping records be part of the tree breeding process? 19:37 wallabra I don't think we need to go to the point of implementing actual Mendelian "dominant" and "recessive" genes. 19:37 schwarzwald[m] Just a couple predefined "x + y = z" tree combinations? 19:37 wallabra As to the breeding part, I say either have a bird kind of thing (and maybe detecting what qualifies as a bird, from other mods, and when it touches leaf blocks?) 19:38 wallabra Not predefined, but also not actual species 19:38 wallabra It would scrap "tree types" and in place there would be "gene fields" 19:39 wallabra A gene field is a list of values that determine an aspect (phenotype) of the tree. 19:40 wallabra There are three types of gene fields: Enums (such as the kind of fruit that a tree produces), Numbers (such as how well it retains water in exchange for metabolic efficiency), and Instructions (such as in which directions it should spawn its blocks, including logs and leaves, modeled as a probabilistic 3D cellular automata). 19:41 schwarzwald[m] How will you decide which phenotype to keep when you create a new tree? Randomly pick one? 19:41 wallabra Every gene field has two properties: it has a Mutation operator (which allows it to be changed randomly, to a small but variable degree), which is applied n% of the times one is created; and a Breeding operator, which is associative (ab = ba), which creates (including mutation chance) a new gene field that randomly picks 'genes' (values) from its parents. 19:42 schwarzwald[m] Ah. 19:42 wallabra Of course the "operators" aren't implemented as operators, but it makes sense to explain them as such, and could be useful at some point when discussing more complicated example scenarios. 19:42 wallabra For example, (a mut(a b)) c. 19:43 wallabra Much nicer on the eyes than, "breed A and B, have this breed be mutated, then breed it with A, and then with C." 19:44 Oblomov nodecore does something like that with flowers 19:44 Oblomov combining shapes and colors 19:45 schwarzwald[m] Isn't a simple implementation of dominant/recessive genes both simpler to implement and more educational? 19:50 wallabra schwarzwald[m], it's more educational, but not simpler, because many aspects are very hard to encode with real life codons, since they relate to proteins in a cell whose intricate mechanisms are very hard to understand, let alone simulate accurately. I mean, even folding the damn thing is an open problem in computer science! 19:50 wallabra Maybe not an open problem, just a very hard one. 19:51 schwarzwald[m] Ah, no, I meant something really contrived like "A is always dominant over B" 19:51 schwarzwald[m] for no particular reason other than just a table specifying which ones are dominant. 19:52 schwarzwald[m] Actually, a better way might be to rank all possible phenotypes by numeric value. 19:53 schwarzwald[m] "Every gene field has two..." <- I guess this could be more more interetsing than that to the user, because the system isn't so straightforward. 19:54 schwarzwald[m] s/interetsing/interesting/ 19:54 wallabra The different types of gene fields are technical/implementation details. The operators, too. But it surely would be way simpler than it sounds. 19:56 wallabra For example, a list of 3 numbers could define the leaf colour, or at least some variation from a "base" green (from chlorophyll). Mutation here simply means shifting each number by a random number (normally distributed) about 0. And breeding could be picking each value/codon randomly from parent corresponding ones, or even just interpolation. 22:25 runs hi guyz 22:26 schwarzwald[m] Hello. 22:27 k327[m] runs: o/ 23:44 ball Hello