User login

You are here

A 'roo and 25 cents gets you a cup of coffee :)

Tad Carlucci's picture

This pseudo-code presents a possible implementation of the Meeroos genetic system. While this model is believed to be generally correct, in concept, it is simplistic and skips (unknown) details.


// Types

SPECIES is in range [ 0 .. 4 ]
COAT is in range [ 0 .. 7 ]
GENE is a set of { SPECIES Species, COAT Coat }
CHROMOSOME is a set of
{ GENE Maternal, GENE Fraternal }
EFFECT is a type of GENE

// Variables

// What is really there, but hidden from view

Me is an instance of CHROMOSOME

// What is seen, but probably masks the truth

Costume is an instance of EFFECT

// An attempt to model environmental effects on
// genetics
Regard is an integer

// Helper Functions

function Combine
takes ( GENE A, GENE B )
returns EFFECT
___ return new EFFECT (
_______ max ( A.Species, B.Species ),
_______ max ( A.Coat, B.Coat ) )

// Event handlers

// In the real world, Mom and Dad Regard would
// be applied to the Egg and Sperm prior to
// emission from their Copulation event. That
// would be the "Once ducked, always ducked"
// model. As implemented here, and in Second
// Life, it's the "You only think you're ducked,
// but don't give up hope; with hard work, you
// can eventually recover" model.

event Conception
takes ( GENE Egg, GENE Sperm,
integer MomRegard, integer DadRegard )

Mask is an instance of EFFECT
Factor is an integer

Me = new CHROMOSOME ( Egg, Sperm )
Regard = 250
// Allow 2 species, 3 coats each
Mask = new EFFECT ( 3, 5 )
Factor = max( Regard,
______________ min( MomRegard, DadRegard))
while ( Factor > 0 )
___ if (Factor >= 500)
_______ Mask.Coat = max ( 0, Mask.Coat – 1 )
___ if (Factor >= 1000)
_______ Mask.Coat = max ( 0, Mask.Coat – 1 )
_______ Mask.Species = max( 0, Mask.Species – 1)
___ Factor = Factor – 1000
Costume = Combine ( Mask, Me )

event Copulation emits GENE
return oneof ( Me.Maternal, Me.Fraternal )

// Luckily, we kindly provide a means to get
// un-ducked. As shown here: best case you need
// 50 hours to un-duck each coat, and 100 hours
// to un-duck each species. In other words,
// since you gotta sleep, it could take a month
// or so to completely un-duck the offspring
// from your pair of highly recessive, yet well
// ducked 'roos !!!

event Petted
Regard = Regard + 10

// This mutation implementation is really,
// obscenely, and utterly, overly simplistic.
// It only makes things 'worse', never 'better'.
// The probability of mutation increases for more
// recessive gene factors. Arg! This sucks,
// but the concept is generally correct.

event CosmicRay // Sometimes causes random mutation
Me = new CHROMOSOME (
___ Combine(Me.Maternal,
_______ new GENE(oneof(SPECIES),oneof(COAT))) as GENE,
___ Combine(Me.fraternal,
______ new GENE(oneof(SPECIES),oneof(COAT))) as GENE)

Taxonomy upgrade extras: