// Genesaver: copyright 2003 Sam Stafford. #include <stdio.h> struct IChromo { char ax0[4]; char wgt[4][4]; char ax1[4]; char colr; char size; }; struct HChromo { char iden[12]; char iwgt[12]; char owgt[4][24]; char colr[4]; char size[4]; }; class DNA { public: DNA( void ); //empty DNA( DNA* ); //clone DNA( DNA*, DNA* ); //crossover ~DNA(void); void Dump( FILE* ); char* Load( char* ); char* LoadChar( char*, char* ); void Mutate(); void PutChar( FILE*, char ); void Randomize(); char Squish( char, char ); void Clear(); void CreatePainter( char color ); HChromo hchr; IChromo ichr[6]; };
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 4465 | Sam Stafford |
Genetically engineered organisms - there's now an option to seed the initial population with these relentlessly efficient creatures rather than random mutants. Kinda neat-looking, but not as organic-looking as pure evolved creatures. |
||
#2 | 4447 | Sam Stafford | Cleanup size-heredity code. | ||
#1 | 4430 | Sam Stafford |
Start importing alife/AI code from Genesaver. Much tweaking will need to be done. |
||
//guest/sam_stafford/genesaver/src/DNA.h | |||||
#1 | 3052 | Sam Stafford |
Add Genesaver to the Public Depot. It's not in any way Perforce-related, but it does share a bit of code with Jamgraph, and it feels strange to have an open-source project that's not in the PD. |