Skip to content

Lifespark Genetics Library is a biomimetic genetic encoder capable of encoding English or Latin text in to genetic code. Great for Games, AI, Security, & more

License

Notifications You must be signed in to change notification settings

Bifrost-Technologies/Lifespark.Genetics

Repository files navigation

Lifespark Genetics Library

Lifespark Genetics Library is a biomimetic genetic encoder capable of encoding English or Latin text in to genetic code.

Utilizing four letters and classifying them as nucleotide bases allows us to simulate the hydrogen bond found in the nucleotide pairs of DNA. Using a rolling window against the gene code we can form codons by iterating every three char slots. There are only 24 permutation codons, but a total of 64 possible codons. For example: including AAA, GGG, TTT, and CCC as valid codons.

Ironically the classical Latin alphabet contains 23 letters, and the 24th one is a break codon enabling the ability to encode Latin or English text

Example

using Lifespark.Genetics;

//Encode text to mDNA
string genetic_code = LifeSparkClient.WriteDNA("hello");
Console.WriteLine("Genecode: "+genetic_code);

//Form a molecule with the mDNA and retrieve the DNA strand from it
DNA_Molecule dna = new DNA_Molecule(genetic_code);
string mDNA = "";
dna.ForEach(molecule => DNA += molecule.Item1);
Console.WriteLine("Molecule: "+ DNA);

//mDNA to mRNA conversion
string rna_genetic_code = LifeSparkClient.DNAtoRNA(genetic_code);

//Decode genetic code back to english/latin
string decoded_message = LifeSparkClient.ReadDNA(dna);
string decoded_message2 = LifeSparkClient.ReadRNA(rna_genetic_code);

Console.WriteLine("Encoded Message: " + genetic_code);
Console.WriteLine("Decoded DNA Message: " + decoded_message);
Console.WriteLine("Decoded RNA Message: " + decoded_message2);

//Construct a genome which contains an array of unique molecules
Genome genome = new Genome(genetic_code);
//View the genomes genecode
Console.WriteLine("Encoded Genome: " + LifeSparkClient.ExportGenomeData(genome));

About

Lifespark Genetics Library is a biomimetic genetic encoder capable of encoding English or Latin text in to genetic code. Great for Games, AI, Security, & more

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages