|
Noble Ape
The Central Directories of the Noble Ape Simulation.
|
Go to the source code of this file.
Data Structures | |
| struct | noble_feature |
| struct | noble_social |
| struct | noble_episodic |
| struct | noble_place |
| struct | noble_brain_probe |
| struct | noble_immune_system |
| struct | dead_body |
| struct | noble_remains |
| struct | noble_being |
| struct | noble_simulation |
Macros | |
| #define | EPISODIC_ON /* currently has to be included - naming doesn't work without it */ |
| #define | TERRITORY_ON /* entity */ |
| #define | BRAINCODE_ON /* entity */ |
| #define | IMMUNE_ON /* entity */ |
| #define | BRAIN_ON |
| #define | TERRITORY_DIMENSION (MAP_DIMENSION>>6) |
| #define | TERRITORY_AREA (TERRITORY_DIMENSION*TERRITORY_DIMENSION) |
| #define | APESPACE_TO_TERRITORY(num) (APESPACE_TO_MAPSPACE(num)>>6) |
| #define | SINGLE_BRAIN (32768) |
| #define | DOUBLE_BRAIN (SINGLE_BRAIN*2) |
| #define | AGE_IN_DAYS(sim, bei) (sim->land->date - being_dob(bei)) |
| #define | AGE_IN_YEARS(sim, bei) (AGE_IN_DAYS(sim,bei)/TIME_YEAR_DAYS) |
| #define | AGE_OF_MATURITY (30) |
| #define | IMMUNE_FIT 5 |
| #define | MIN_ANTIBODIES 16 |
| #define | MIN_ANTIGENS 8 |
| #define | IMMUNE_ANTIGENS 8 |
| #define | IMMUNE_POPULATION 16 |
| #define | PATHOGEN_TRANSMISSION_PROB 1000 |
| #define | PATHOGEN_ENVIRONMENT_PROB 100 |
| #define | PATHOGEN_MUTATION_PROB 100 |
| #define | ANTIBODY_DEPLETION_PROB 100 |
| #define | ANTIBODY_GENERATION_PROB(bei) (being_energy(bei)) |
| #define | RANDOM_PATHOGEN(seed, pathogen_type) (((seed%(255/PATHOGEN_TRANSMISSION_TOTAL))*PATHOGEN_TRANSMISSION_TOTAL)+pathogen_type) |
| #define | PATHOGEN_SEVERITY(pathogen) (((pathogen)*(pathogen))>>11) |
| #define | PATHOGEN_TRANSMISSION(pathogen) ((pathogen)&7) |
| #define | NATURE_NURTURE(nature, nurture) (((nature) + ((nurture)>>4))>>1) |
| #define | VALUABLE_OBJECT (INVENTORY_NUT & INVENTORY_SHELL) |
| #define | FISHING_PROB (1<<8) |
| #define | METRES_TO_APESPACE(m) (m*m*80000) |
| #define | SHOUT_RANGE METRES_TO_APESPACE(50) |
| #define | SHOUT_REFRACTORY 10 |
| #define | THRESHOLD_SEEK_MATE 100 |
| #define | GESTATION_SEX_DRIVE_DECREMENT 16 |
| #define | FATIGUE_SPEED_THRESHOLD 8 |
| #define | ANECDOTE_EVENT_MUTATION_RATE 5000 |
| #define | ANECDOTE_AFFECT_MUTATION_RATE 5000 |
| #define | SOCIAL_FORGET_DAYS 10 |
| #define | SOCIAL_RANGE METRES_TO_APESPACE(10) |
| #define | SQUABBLE_RANGE METRES_TO_APESPACE(5) |
| #define | MATING_RANGE METRES_TO_APESPACE(5) |
| #define | SOCIAL_TOLLERANCE 0 |
| #define | MIN_CROWDING 1 |
| #define | MAX_CROWDING 3 |
| #define | BEING_MAX_MASS_G 7000 |
| #define | BEING_MAX_MASS_FAT_G (BEING_MAX_MASS_G>>2) |
| #define | MIN(a, b) (((a) < (b)) ? (a) : (b)) |
| #define | FAT_MASS(frame, energy) (MIN( ((BEING_MAX_MASS_FAT_G*energy*frame)>>(4+12)),BEING_MAX_MASS_FAT_G)) |
| #define | GET_BODY_FAT(bei) (FAT_MASS(GENE_FRAME(being_genetics(bei)),being_energy(bei))) |
| #define | BEING_MAX_HEIGHT_MM 2000 |
| #define | BEING_MAX_HEIGHT 65535 |
| #define | GET_BEING_HEIGHT(bei) (GET_H(bei)*BEING_MAX_HEIGHT_MM/BEING_MAX_HEIGHT) |
| #define | ENERGY_TO_GROWTH(b, e) ((e>>3)*3) |
| #define | BIRTH_HEIGHT 2000 |
| #define | BIRTH_MASS 100 |
| #define | SOCIAL_GRAPH_ENTRY_EMPTY(graph, index) ((graph[index].first_name[BEING_MET]==0) && (graph[index].family_name[BEING_MET]==0) && (graph[index].relationship<=RELATIONSHIP_SELF)) |
| #define | SOCIAL_GRAPH_ENTRY_LOCATION_EXISTS(graph, index) (graph[index].location[0] + graph[index].location[1] > 0) |
| #define | IS_FAMILY_MEMBER(graph, index) ((graph[index].relationship > RELATIONSHIP_SELF) && (graph[index].relationship < OTHER_MOTHER)) |
| #define | EVENT_INTENTION (128) |
| #define | THROW_ACCURACY (1<<15) |
| #define | WHACK_ACCURACY (1<<15) |
| #define | PAIR_BOND_THRESHOLD 2 /* minimum level of attraction for mating */ |
| #define | SOCIAL_SIZE 12 /* maximum size of the social network */ |
| #define | SOCIAL_SIZE_BEINGS (SOCIAL_SIZE>>1) /* max number of specific beings within the social graph */ |
| #define | EPISODIC_SIZE 12 /* maximum number of episodic memories */ |
| #define | OVERRIDE_GOAL 1 |
| #define | GOAL_TIMEOUT (60*24) |
| #define | GOAL_RADIUS 40000 |
| #define | DRIVES_MAX 255 /* maximum value of each drive */ |
| #define | MATING_PROB 12 |
| #define | GESTATION_DAYS 1 |
| #define | WEANING_DAYS 14 |
| #define | CARRYING_DAYS 3 |
| #define | CONCEPTION_INHIBITION_DAYS 5 |
| #define | SUCKLING_ENERGY 2 |
| #define | SUCKLING_MAX_SEPARATION METRES_TO_APESPACE(2) |
| #define | MAX_PARASITES(bei) ((GENE_HAIR(being_genetics(bei))*255)>>4) |
| #define | PARASITE_HOP_MAX_DISTANCE METRES_TO_APESPACE(2) |
| #define | PARASITE_ENERGY_COST 1 |
| #define | PARASITE_ENVIRONMENT 5000 |
| #define | PARASITE_BREED 10 |
| #define | GROOMING_MAX_SEPARATION METRES_TO_APESPACE(2) |
| #define | MAX_SPEED_WHILST_GROOMING 30 |
| #define | GROOMING_PROB 10000 |
| #define | GROOMING_PROB_HONOR 10 |
| #define | PARASITES_REMOVED 2 |
| #define | SQUABBLE_FLEE_SPEED 20 |
| #define | SQUABBLE_ENERGY_SHOWFORCE 200 |
| #define | SQUABBLE_ENERGY_ATTACK 500 |
| #define | SQUABBLE_ENERGY_ROCK_HURL 100 |
| #define | SQUABBLE_ENERGY_BRANCH_WHACK 50 |
| #define | SQUABBLE_DISRESPECT 20 |
| #define | SQUABBLE_HONOR_ADJUST 10 |
| #define | SQUABBLE_SHOW_FORCE_DISTANCE 10 |
| #define | MINIMUM_GENETIC_VARIATION 32 |
| #define | COMPOSITE_AFFECT(enjoyment, interest, surprise, anger, disgust, dissmell, distress, fear, shame) ((enjoyment)+(interest)-(anger)-(disgust)-(dissmell)-(distress)-(fear)-(shame)) |
| #define | DIPLOID(parent1, parent2) ((parent1)|((parent2)<<16)) |
| #define | CHROMOSOME_FROM_MOTHER(ch) (((ch)>>16)&65535) |
| #define | CHROMOSOME_FROM_FATHER(ch) ((ch)&65535) |
| #define | GET_NUCLEOTIDE(gene, num) ((gene[((num)>>3) & 3]>>((num&7)*2))&3) |
| #define | GENE_VAL(gene, num0, num1) ((GET_NUCLEOTIDE(gene,num0) << 2) | GET_NUCLEOTIDE(gene,num1)) |
| #define | CHROMOSOMES 4 |
| #define | CHROMOSOME_Y 0 |
| #define | MUTATION_CROSSOVER_PROB 500 |
| #define | MUTATION_DELETION_PROB 200 |
| #define | MUTATION_TRANSPOSE_PROB 200 |
| #define | GENE_REGULATOR(gene, a, b) (1+GENE_VAL(gene,(15+(a)),(15+(b)))) |
| #define | GENE_VAL_REG(gene, a, b, c, d) GENE_VAL(gene,GENE_REGULATOR(gene,a,b),GENE_REGULATOR(gene,c,d)) |
| #define | GENE_HOX(gene, bodyseg) GENE_VAL_REG(gene, 2+(bodyseg), 4+(bodyseg), 18-(bodyseg), 21-(bodyseg)) |
| #define | GENE_FRAME(gene) GENE_VAL_REG(gene, 10, 11, 1, 6) |
| #define | GENE_HAIR(gene) GENE_VAL_REG(gene, 12, 5, 12, 11) |
| #define | GENE_VISION_INITIAL(gene) GENE_VAL_REG(gene, 2, 12, 3, 9) |
| #define | GENE_VISION_DELTA(gene) GENE_VAL_REG(gene, 11, 7, 2, 9) |
| #define | GENE_EYE_SHAPE(gene) GENE_VAL_REG(gene, 9, 12, 1, 5) |
| #define | GENE_EYE_COLOR(gene) GENE_VAL_REG(gene, 9, 7, 3, 7) |
| #define | GENE_EYE_SEPARATION(gene) GENE_VAL_REG(gene, 3, 2, 0, 14) |
| #define | GENE_NOSE_SHAPE(gene) GENE_VAL_REG(gene, 4, 5, 6, 8) |
| #define | GENE_EAR_SHAPE(gene) GENE_VAL_REG(gene, 12, 4, 14, 1) |
| #define | GENE_EYEBROW_SHAPE(gene) GENE_VAL_REG(gene, 9, 10, 8, 4) |
| #define | GENE_MOUTH_SHAPE(gene) GENE_VAL_REG(gene, 9, 5, 8, 15) |
| #define | GENE_PIGMENTATION(gene) GENE_VAL_REG(gene, 8, 9, 8, 3) |
| #define | GENE_BRAINCODE_SENSORS(gene) GENE_VAL_REG(gene, 11, 14, 4, 7) |
| #define | GENE_BRAINCODE_ACTUATORS(gene) GENE_VAL_REG(gene, 15, 10, 10, 0) |
| #define | GENE_BRAINCODE_CONDITIONALS(gene) GENE_VAL_REG(gene, 4, 9, 0, 2) |
| #define | GENE_BRAINCODE_OPERATORS(gene) GENE_VAL_REG(gene, 12, 1, 6, 12) |
| #define | GENE_BRAINCODE_DATA(gene) GENE_VAL_REG(gene, 8, 15, 7, 12) |
| #define | GENE_NEGATIVE_AFFECT_FADE(gene) GENE_VAL_REG(gene, 9, 15, 13, 2) |
| #define | GENE_POSITIVE_AFFECT_FADE(gene) GENE_VAL_REG(gene, 11, 4, 3, 12) |
| #define | GENE_SOCIAL(gene) GENE_VAL_REG(gene, 22, 2, 13, 9) |
| #define | GENE_GLUCOSE_THRESHOLD_MAX(gene) GENE_VAL_REG(gene, 6, 15, 19, 18) |
| #define | GENE_GLUCOSE_THRESHOLD_MIN(gene) GENE_VAL_REG(gene, 16, 14, 10, 7) |
| #define | GENE_GLUCOGEN_RATE(gene) GENE_VAL_REG(gene, 17, 11, 20, 2) |
| #define | GENE_INSULIN_RATE(gene) GENE_VAL_REG(gene, 13, 7, 9, 11) |
| #define | GENE_ADRENALIN_RATE(gene) GENE_VAL_REG(gene, 16, 19, 13, 3) |
| #define | GENE_BLADDER_CAPACITY(gene) GENE_VAL_REG(gene, 5, 15, 2, 7) |
| #define | GENE_WASTE_CAPACITY(gene) GENE_VAL_REG(gene, 12, 11, 19, 1) |
| #define | GENE_SUCKLING_RATE(gene) GENE_VAL_REG(gene, 4, 14, 10, 15) |
| #define | SOCIAL_THRESHOLD(bei) ((NATURE_NURTURE(GENE_SOCIAL(being_genetics(bei)),bei->learned_preference[PREFERENCE_SOCIAL]))>>1) |
| #define | NUMBER_OF_BODIES (256) |
| #define | GET_A(bei, index) ((bei)->attention[index]) |
| #define | GET_H(bei) ((bei)->height) |
| #define | GET_M(bei) ((bei)->mass) |
| #define | GET_I(bei) (being_genetics(bei)[CHROMOSOME_Y]) |
| #define | FIND_SEX(array) (array&3) |
| #define | SEX_FEMALE 3 |
| #define | BRAIN_OFFSET(num) (num) |
Typedefs | |
| typedef n_byte4 | n_genetics |
| typedef void( | being_birth_event )(noble_being *born, noble_being *mother, void *sim) |
| typedef void( | being_death_event )(noble_being *deceased, void *sim) |
| typedef void( | console_generic )(void *ptr, n_string ape_name, noble_being *local_being, n_string result) |
| typedef void( | line_braincode )(n_string pointer, n_int line) |
| #define AGE_IN_DAYS | ( | sim, | |
| bei | |||
| ) | (sim->land->date - being_dob(bei)) |
Definition at line 92 of file universe.h.
| #define AGE_IN_YEARS | ( | sim, | |
| bei | |||
| ) | (AGE_IN_DAYS(sim,bei)/TIME_YEAR_DAYS) |
Definition at line 93 of file universe.h.
| #define AGE_OF_MATURITY (30) |
Definition at line 96 of file universe.h.
| #define ANECDOTE_AFFECT_MUTATION_RATE 5000 |
Definition at line 511 of file universe.h.
| #define ANECDOTE_EVENT_MUTATION_RATE 5000 |
Definition at line 510 of file universe.h.
| #define ANTIBODY_DEPLETION_PROB 100 |
Definition at line 306 of file universe.h.
| #define ANTIBODY_GENERATION_PROB | ( | bei | ) | (being_energy(bei)) |
Definition at line 307 of file universe.h.
| #define APESPACE_TO_TERRITORY | ( | num | ) | (APESPACE_TO_MAPSPACE(num)>>6) |
Definition at line 54 of file universe.h.
| #define BEING_MAX_HEIGHT 65535 |
Definition at line 563 of file universe.h.
| #define BEING_MAX_HEIGHT_MM 2000 |
Definition at line 560 of file universe.h.
| #define BEING_MAX_MASS_FAT_G (BEING_MAX_MASS_G>>2) |
Definition at line 547 of file universe.h.
| #define BEING_MAX_MASS_G 7000 |
Definition at line 544 of file universe.h.
| #define BIRTH_HEIGHT 2000 |
Definition at line 574 of file universe.h.
| #define BIRTH_MASS 100 |
Definition at line 575 of file universe.h.
| #define BRAIN_OFFSET | ( | num | ) | (num) |
Definition at line 1229 of file universe.h.
| #define BRAIN_ON |
Definition at line 47 of file universe.h.
| #define BRAINCODE_ON /* entity */ |
Definition at line 44 of file universe.h.
| #define CARRYING_DAYS 3 |
Definition at line 652 of file universe.h.
| #define CHROMOSOME_FROM_FATHER | ( | ch | ) | ((ch)&65535) |
Definition at line 810 of file universe.h.
| #define CHROMOSOME_FROM_MOTHER | ( | ch | ) | (((ch)>>16)&65535) |
Definition at line 809 of file universe.h.
| #define CHROMOSOME_Y 0 |
Definition at line 818 of file universe.h.
| #define CHROMOSOMES 4 |
Definition at line 817 of file universe.h.
| #define COMPOSITE_AFFECT | ( | enjoyment, | |
| interest, | |||
| surprise, | |||
| anger, | |||
| disgust, | |||
| dissmell, | |||
| distress, | |||
| fear, | |||
| shame | |||
| ) | ((enjoyment)+(interest)-(anger)-(disgust)-(dissmell)-(distress)-(fear)-(shame)) |
Definition at line 768 of file universe.h.
| #define CONCEPTION_INHIBITION_DAYS 5 |
Definition at line 655 of file universe.h.
| #define DIPLOID | ( | parent1, | |
| parent2 | |||
| ) | ((parent1)|((parent2)<<16)) |
Definition at line 808 of file universe.h.
| #define DOUBLE_BRAIN (SINGLE_BRAIN*2) |
Definition at line 57 of file universe.h.
| #define DRIVES_MAX 255 /* maximum value of each drive */ |
Definition at line 628 of file universe.h.
| #define ENERGY_TO_GROWTH | ( | b, | |
| e | |||
| ) | ((e>>3)*3) |
Definition at line 571 of file universe.h.
| #define EPISODIC_ON /* currently has to be included - naming doesn't work without it */ |
Definition at line 41 of file universe.h.
| #define EPISODIC_SIZE 12 /* maximum number of episodic memories */ |
Definition at line 608 of file universe.h.
| #define EVENT_INTENTION (128) |
Definition at line 586 of file universe.h.
| #define FAT_MASS | ( | frame, | |
| energy | |||
| ) | (MIN( ((BEING_MAX_MASS_FAT_G*energy*frame)>>(4+12)),BEING_MAX_MASS_FAT_G)) |
Definition at line 554 of file universe.h.
| #define FATIGUE_SPEED_THRESHOLD 8 |
Definition at line 507 of file universe.h.
| #define FIND_SEX | ( | array | ) | (array&3) |
Definition at line 1226 of file universe.h.
| #define FISHING_PROB (1<<8) |
Definition at line 480 of file universe.h.
| #define GENE_ADRENALIN_RATE | ( | gene | ) | GENE_VAL_REG(gene, 16, 19, 13, 3) |
Definition at line 918 of file universe.h.
| #define GENE_BLADDER_CAPACITY | ( | gene | ) | GENE_VAL_REG(gene, 5, 15, 2, 7) |
Definition at line 921 of file universe.h.
| #define GENE_BRAINCODE_ACTUATORS | ( | gene | ) | GENE_VAL_REG(gene, 15, 10, 10, 0) |
Definition at line 889 of file universe.h.
| #define GENE_BRAINCODE_CONDITIONALS | ( | gene | ) | GENE_VAL_REG(gene, 4, 9, 0, 2) |
Definition at line 890 of file universe.h.
| #define GENE_BRAINCODE_DATA | ( | gene | ) | GENE_VAL_REG(gene, 8, 15, 7, 12) |
Definition at line 892 of file universe.h.
| #define GENE_BRAINCODE_OPERATORS | ( | gene | ) | GENE_VAL_REG(gene, 12, 1, 6, 12) |
Definition at line 891 of file universe.h.
| #define GENE_BRAINCODE_SENSORS | ( | gene | ) | GENE_VAL_REG(gene, 11, 14, 4, 7) |
Definition at line 888 of file universe.h.
| #define GENE_EAR_SHAPE | ( | gene | ) | GENE_VAL_REG(gene, 12, 4, 14, 1) |
Definition at line 873 of file universe.h.
| #define GENE_EYE_COLOR | ( | gene | ) | GENE_VAL_REG(gene, 9, 7, 3, 7) |
Definition at line 861 of file universe.h.
| #define GENE_EYE_SEPARATION | ( | gene | ) | GENE_VAL_REG(gene, 3, 2, 0, 14) |
Definition at line 865 of file universe.h.
| #define GENE_EYE_SHAPE | ( | gene | ) | GENE_VAL_REG(gene, 9, 12, 1, 5) |
Definition at line 857 of file universe.h.
| #define GENE_EYEBROW_SHAPE | ( | gene | ) | GENE_VAL_REG(gene, 9, 10, 8, 4) |
Definition at line 877 of file universe.h.
| #define GENE_FRAME | ( | gene | ) | GENE_VAL_REG(gene, 10, 11, 1, 6) |
Definition at line 844 of file universe.h.
| #define GENE_GLUCOGEN_RATE | ( | gene | ) | GENE_VAL_REG(gene, 17, 11, 20, 2) |
Definition at line 912 of file universe.h.
| #define GENE_GLUCOSE_THRESHOLD_MAX | ( | gene | ) | GENE_VAL_REG(gene, 6, 15, 19, 18) |
Definition at line 905 of file universe.h.
| #define GENE_GLUCOSE_THRESHOLD_MIN | ( | gene | ) | GENE_VAL_REG(gene, 16, 14, 10, 7) |
Definition at line 909 of file universe.h.
| #define GENE_HAIR | ( | gene | ) | GENE_VAL_REG(gene, 12, 5, 12, 11) |
Definition at line 848 of file universe.h.
| #define GENE_HOX | ( | gene, | |
| bodyseg | |||
| ) | GENE_VAL_REG(gene, 2+(bodyseg), 4+(bodyseg), 18-(bodyseg), 21-(bodyseg)) |
Definition at line 840 of file universe.h.
| #define GENE_INSULIN_RATE | ( | gene | ) | GENE_VAL_REG(gene, 13, 7, 9, 11) |
Definition at line 915 of file universe.h.
| #define GENE_MOUTH_SHAPE | ( | gene | ) | GENE_VAL_REG(gene, 9, 5, 8, 15) |
Definition at line 881 of file universe.h.
| #define GENE_NEGATIVE_AFFECT_FADE | ( | gene | ) | GENE_VAL_REG(gene, 9, 15, 13, 2) |
Definition at line 897 of file universe.h.
| #define GENE_NOSE_SHAPE | ( | gene | ) | GENE_VAL_REG(gene, 4, 5, 6, 8) |
Definition at line 869 of file universe.h.
| #define GENE_PIGMENTATION | ( | gene | ) | GENE_VAL_REG(gene, 8, 9, 8, 3) |
Definition at line 885 of file universe.h.
| #define GENE_POSITIVE_AFFECT_FADE | ( | gene | ) | GENE_VAL_REG(gene, 11, 4, 3, 12) |
Definition at line 898 of file universe.h.
| #define GENE_REGULATOR | ( | gene, | |
| a, | |||
| b | |||
| ) | (1+GENE_VAL(gene,(15+(a)),(15+(b)))) |
Definition at line 829 of file universe.h.
| #define GENE_SOCIAL | ( | gene | ) | GENE_VAL_REG(gene, 22, 2, 13, 9) |
Definition at line 901 of file universe.h.
| #define GENE_SUCKLING_RATE | ( | gene | ) | GENE_VAL_REG(gene, 4, 14, 10, 15) |
Definition at line 926 of file universe.h.
| #define GENE_VAL | ( | gene, | |
| num0, | |||
| num1 | |||
| ) | ((GET_NUCLEOTIDE(gene,num0) << 2) | GET_NUCLEOTIDE(gene,num1)) |
Definition at line 815 of file universe.h.
| #define GENE_VAL_REG | ( | gene, | |
| a, | |||
| b, | |||
| c, | |||
| d | |||
| ) | GENE_VAL(gene,GENE_REGULATOR(gene,a,b),GENE_REGULATOR(gene,c,d)) |
Definition at line 831 of file universe.h.
| #define GENE_VISION_DELTA | ( | gene | ) | GENE_VAL_REG(gene, 11, 7, 2, 9) |
Definition at line 853 of file universe.h.
| #define GENE_VISION_INITIAL | ( | gene | ) | GENE_VAL_REG(gene, 2, 12, 3, 9) |
Definition at line 852 of file universe.h.
| #define GENE_WASTE_CAPACITY | ( | gene | ) | GENE_VAL_REG(gene, 12, 11, 19, 1) |
Definition at line 923 of file universe.h.
| #define GESTATION_DAYS 1 |
Definition at line 646 of file universe.h.
| #define GESTATION_SEX_DRIVE_DECREMENT 16 |
Definition at line 504 of file universe.h.
| #define GET_A | ( | bei, | |
| index | |||
| ) | ((bei)->attention[index]) |
Definition at line 1220 of file universe.h.
| #define GET_BEING_HEIGHT | ( | bei | ) | (GET_H(bei)*BEING_MAX_HEIGHT_MM/BEING_MAX_HEIGHT) |
Definition at line 566 of file universe.h.
| #define GET_BODY_FAT | ( | bei | ) | (FAT_MASS(GENE_FRAME(being_genetics(bei)),being_energy(bei))) |
Definition at line 557 of file universe.h.
| #define GET_H | ( | bei | ) | ((bei)->height) |
Definition at line 1221 of file universe.h.
| #define GET_I | ( | bei | ) | (being_genetics(bei)[CHROMOSOME_Y]) |
Definition at line 1224 of file universe.h.
| #define GET_M | ( | bei | ) | ((bei)->mass) |
Definition at line 1222 of file universe.h.
| #define GET_NUCLEOTIDE | ( | gene, | |
| num | |||
| ) | ((gene[((num)>>3) & 3]>>((num&7)*2))&3) |
Definition at line 812 of file universe.h.
| #define GOAL_RADIUS 40000 |
Definition at line 617 of file universe.h.
| #define GOAL_TIMEOUT (60*24) |
Definition at line 614 of file universe.h.
| #define GROOMING_MAX_SEPARATION METRES_TO_APESPACE(2) |
Definition at line 680 of file universe.h.
| #define GROOMING_PROB 10000 |
Definition at line 686 of file universe.h.
| #define GROOMING_PROB_HONOR 10 |
Definition at line 690 of file universe.h.
| #define IMMUNE_ANTIGENS 8 |
Definition at line 301 of file universe.h.
| #define IMMUNE_FIT 5 |
Definition at line 298 of file universe.h.
| #define IMMUNE_ON /* entity */ |
Definition at line 45 of file universe.h.
| #define IMMUNE_POPULATION 16 |
Definition at line 302 of file universe.h.
| #define IS_FAMILY_MEMBER | ( | graph, | |
| index | |||
| ) | ((graph[index].relationship > RELATIONSHIP_SELF) && (graph[index].relationship < OTHER_MOTHER)) |
Definition at line 584 of file universe.h.
| #define MATING_PROB 12 |
Definition at line 640 of file universe.h.
| #define MATING_RANGE METRES_TO_APESPACE(5) |
Definition at line 531 of file universe.h.
| #define MAX_CROWDING 3 |
Definition at line 541 of file universe.h.
| #define MAX_PARASITES | ( | bei | ) | ((GENE_HAIR(being_genetics(bei))*255)>>4) |
Definition at line 664 of file universe.h.
| #define MAX_SPEED_WHILST_GROOMING 30 |
Definition at line 683 of file universe.h.
| #define METRES_TO_APESPACE | ( | m | ) | (m*m*80000) |
Definition at line 483 of file universe.h.
| #define MIN | ( | a, | |
| b | |||
| ) | (((a) < (b)) ? (a) : (b)) |
Definition at line 550 of file universe.h.
| #define MIN_ANTIBODIES 16 |
Definition at line 299 of file universe.h.
| #define MIN_ANTIGENS 8 |
Definition at line 300 of file universe.h.
| #define MIN_CROWDING 1 |
Definition at line 537 of file universe.h.
| #define MINIMUM_GENETIC_VARIATION 32 |
Definition at line 764 of file universe.h.
| #define MUTATION_CROSSOVER_PROB 500 |
Definition at line 821 of file universe.h.
| #define MUTATION_DELETION_PROB 200 |
Definition at line 822 of file universe.h.
| #define MUTATION_TRANSPOSE_PROB 200 |
Definition at line 823 of file universe.h.
| #define NATURE_NURTURE | ( | nature, | |
| nurture | |||
| ) | (((nature) + ((nurture)>>4))>>1) |
Definition at line 397 of file universe.h.
| #define NUMBER_OF_BODIES (256) |
Definition at line 1115 of file universe.h.
| #define OVERRIDE_GOAL 1 |
Definition at line 611 of file universe.h.
| #define PAIR_BOND_THRESHOLD 2 /* minimum level of attraction for mating */ |
Definition at line 592 of file universe.h.
| #define PARASITE_BREED 10 |
Definition at line 677 of file universe.h.
| #define PARASITE_ENERGY_COST 1 |
Definition at line 670 of file universe.h.
| #define PARASITE_ENVIRONMENT 5000 |
Definition at line 673 of file universe.h.
| #define PARASITE_HOP_MAX_DISTANCE METRES_TO_APESPACE(2) |
Definition at line 667 of file universe.h.
| #define PARASITES_REMOVED 2 |
Definition at line 693 of file universe.h.
| #define PATHOGEN_ENVIRONMENT_PROB 100 |
Definition at line 304 of file universe.h.
| #define PATHOGEN_MUTATION_PROB 100 |
Definition at line 305 of file universe.h.
| #define PATHOGEN_SEVERITY | ( | pathogen | ) | (((pathogen)*(pathogen))>>11) |
Definition at line 310 of file universe.h.
| #define PATHOGEN_TRANSMISSION | ( | pathogen | ) | ((pathogen)&7) |
Definition at line 311 of file universe.h.
| #define PATHOGEN_TRANSMISSION_PROB 1000 |
Definition at line 303 of file universe.h.
| #define RANDOM_PATHOGEN | ( | seed, | |
| pathogen_type | |||
| ) | (((seed%(255/PATHOGEN_TRANSMISSION_TOTAL))*PATHOGEN_TRANSMISSION_TOTAL)+pathogen_type) |
Definition at line 309 of file universe.h.
| #define SEX_FEMALE 3 |
Definition at line 1227 of file universe.h.
| #define SHOUT_RANGE METRES_TO_APESPACE(50) |
Definition at line 486 of file universe.h.
| #define SHOUT_REFRACTORY 10 |
Definition at line 487 of file universe.h.
| #define SINGLE_BRAIN (32768) |
Definition at line 56 of file universe.h.
| #define SOCIAL_FORGET_DAYS 10 |
Definition at line 521 of file universe.h.
| #define SOCIAL_GRAPH_ENTRY_EMPTY | ( | graph, | |
| index | |||
| ) | ((graph[index].first_name[BEING_MET]==0) && (graph[index].family_name[BEING_MET]==0) && (graph[index].relationship<=RELATIONSHIP_SELF)) |
Definition at line 578 of file universe.h.
| #define SOCIAL_GRAPH_ENTRY_LOCATION_EXISTS | ( | graph, | |
| index | |||
| ) | (graph[index].location[0] + graph[index].location[1] > 0) |
Definition at line 581 of file universe.h.
| #define SOCIAL_RANGE METRES_TO_APESPACE(10) |
Definition at line 525 of file universe.h.
| #define SOCIAL_SIZE 12 /* maximum size of the social network */ |
Definition at line 606 of file universe.h.
| #define SOCIAL_SIZE_BEINGS (SOCIAL_SIZE>>1) /* max number of specific beings within the social graph */ |
Definition at line 607 of file universe.h.
| #define SOCIAL_THRESHOLD | ( | bei | ) | ((NATURE_NURTURE(GENE_SOCIAL(being_genetics(bei)),bei->learned_preference[PREFERENCE_SOCIAL]))>>1) |
Definition at line 929 of file universe.h.
| #define SOCIAL_TOLLERANCE 0 |
Definition at line 534 of file universe.h.
| #define SQUABBLE_DISRESPECT 20 |
Definition at line 754 of file universe.h.
| #define SQUABBLE_ENERGY_ATTACK 500 |
Definition at line 745 of file universe.h.
| #define SQUABBLE_ENERGY_BRANCH_WHACK 50 |
Definition at line 751 of file universe.h.
| #define SQUABBLE_ENERGY_ROCK_HURL 100 |
Definition at line 748 of file universe.h.
| #define SQUABBLE_ENERGY_SHOWFORCE 200 |
Definition at line 742 of file universe.h.
| #define SQUABBLE_FLEE_SPEED 20 |
Definition at line 739 of file universe.h.
| #define SQUABBLE_HONOR_ADJUST 10 |
Definition at line 757 of file universe.h.
| #define SQUABBLE_RANGE METRES_TO_APESPACE(5) |
Definition at line 528 of file universe.h.
| #define SQUABBLE_SHOW_FORCE_DISTANCE 10 |
Definition at line 760 of file universe.h.
| #define SUCKLING_ENERGY 2 |
Definition at line 658 of file universe.h.
| #define SUCKLING_MAX_SEPARATION METRES_TO_APESPACE(2) |
Definition at line 661 of file universe.h.
| #define TERRITORY_AREA (TERRITORY_DIMENSION*TERRITORY_DIMENSION) |
Definition at line 53 of file universe.h.
| #define TERRITORY_DIMENSION (MAP_DIMENSION>>6) |
Definition at line 52 of file universe.h.
| #define TERRITORY_ON /* entity */ |
Definition at line 43 of file universe.h.
| #define THRESHOLD_SEEK_MATE 100 |
Definition at line 501 of file universe.h.
| #define THROW_ACCURACY (1<<15) |
Definition at line 589 of file universe.h.
| #define VALUABLE_OBJECT (INVENTORY_NUT & INVENTORY_SHELL) |
Definition at line 434 of file universe.h.
| #define WEANING_DAYS 14 |
Definition at line 649 of file universe.h.
| #define WHACK_ACCURACY (1<<15) |
Definition at line 590 of file universe.h.
| typedef void( being_birth_event)(noble_being *born, noble_being *mother, void *sim) |
Definition at line 1179 of file universe.h.
| typedef void( being_death_event)(noble_being *deceased, void *sim) |
Definition at line 1180 of file universe.h.
| typedef void( console_generic)(void *ptr, n_string ape_name, noble_being *local_being, n_string result) |
Definition at line 1237 of file universe.h.
Definition at line 1239 of file universe.h.
| typedef n_byte4 n_genetics |
Definition at line 798 of file universe.h.
| anonymous enum |
Definition at line 247 of file universe.h.
| anonymous enum |
Definition at line 326 of file universe.h.
| anonymous enum |
| ORGAN_STOMACH | |
| ORGAN_MUSCLES | |
| ORGAN_LIVER | |
| ORGAN_KIDNEYS | |
| ORGAN_LUNGS | |
| ORGAN_PANCREAS_A | |
| ORGAN_PANCREAS_B | |
| ORGAN_TISSUE | |
| ORGANS |
Definition at line 367 of file universe.h.
| anonymous enum |
Definition at line 380 of file universe.h.
| anonymous enum |
| WATCH_NONE | |
| WATCH_ALL | |
| WATCH_SOCIAL_GRAPH | |
| WATCH_EPISODIC | |
| WATCH_BRAINCODE | |
| WATCH_BRAINPROBES | |
| WATCH_APPEARANCE | |
| WATCH_SPEECH | |
| WATCH_STATES |
Definition at line 710 of file universe.h.
| anonymous enum |
Definition at line 939 of file universe.h.
| enum affect_type |
Definition at line 775 of file universe.h.
| enum attention_type |
| ATTENTION_ACTOR | |
| ATTENTION_EPISODE | |
| ATTENTION_BODY | |
| ATTENTION_RELATIONSHIP | |
| ATTENTION_TERRITORY | |
| ATTENTION_UNKNOWN | |
| ATTENTION_SIZE |
Definition at line 442 of file universe.h.
Definition at line 514 of file universe.h.
used with social_meet function to specify whether the location should be included within the social graph entry
Definition at line 933 of file universe.h.
| enum BODY_INVENTORY_TYPES |
| BODY_HEAD | |
| BODY_TEETH | |
| BODY_BACK | |
| BODY_FRONT | |
| BODY_LEFT_HAND | |
| BODY_RIGHT_HAND | |
| BODY_LEFT_FOOT | |
| BODY_RIGHT_FOOT | |
| INVENTORY_SIZE |
Definition at line 399 of file universe.h.
| enum drives_definition |
Definition at line 630 of file universe.h.
| enum energy_types |
| ENERGY_GRASS | |
| ENERGY_BUSH | |
| ENERGY_FRUIT | |
| ENERGY_SEAWEED | |
| ENERGY_SHELLFISH | |
| ENERGY_NUT | |
| ENERGY_FISH | |
| ENERGY_BIRD_EGGS | |
| ENERGY_LIZARD_EGGS |
Definition at line 725 of file universe.h.
| enum featureset_members |
Definition at line 947 of file universe.h.
| enum FOOD_KINDS |
| FOOD_VEGETABLE | |
| FOOD_FRUIT | |
| FOOD_SHELLFISH | |
| FOOD_SEAWEED | |
| FOOD_BIRD_EGGS | |
| FOOD_LIZARD_EGGS | |
| FOOD_TYPES |
Definition at line 699 of file universe.h.
| enum goal_types |
Definition at line 620 of file universe.h.
| ACTION_PICKUP | |
| ACTION_DRAG | |
| ACTION_DROP | |
| ACTION_SWAP_HANDS | |
| ACTION_BRANDISH | |
| ACTION_CHEW | |
| ACTION_BASH_OBJECTS | |
| ACTION_JAB | |
| INDIVIDUAL_ACTIONS |
Definition at line 453 of file universe.h.
| enum inventory_type |
Definition at line 415 of file universe.h.
| enum mutation_type |
| MUTATION_MATERNAL | |
| MUTATION_PATERNAL | |
| MUTATION_MATERNAL_DUPLICATE | |
| MUTATION_PATERNAL_DUPLICATE |
Definition at line 800 of file universe.h.
Definition at line 313 of file universe.h.
| enum posture_type |
Definition at line 436 of file universe.h.
| enum PREFERENCES_MATE |
Definition at line 279 of file universe.h.
| enum SECONDARY_APESCRIPT |
Definition at line 99 of file universe.h.
| enum shout_elements |
| SHOUT_CONTENT | |
| SHOUT_HEARD | |
| SHOUT_CTR | |
| SHOUT_VOLUME | |
| SHOUT_FAMILY0 | |
| SHOUT_FAMILY1 | |
| SHOUT_BYTES |
Definition at line 489 of file universe.h.
| enum social_action_type |
| ACTION_GIVE | |
| ACTION_BASH | |
| ACTION_HUG | |
| ACTION_PROD | |
| ACTION_POINT | |
| ACTION_TICKLE | |
| ACTION_SMILE | |
| ACTION_GLOWER | |
| ACTION_PAT | |
| SOCIAL_ACTIONS |
Definition at line 466 of file universe.h.
| n_int being_dob | ( | noble_being * | value | ) |
| n_int being_energy | ( | noble_being * | value | ) |
| n_genetics* being_genetics | ( | noble_being * | value | ) |
| n_int being_location_x | ( | noble_being * | value | ) |
| n_int being_location_y | ( | noble_being * | value | ) |
| n_int console_alphabet | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_appearance | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Show appearance values
| ptr | pointer to noble_simulation object |
| response | |
| output_function |
| n_int console_being | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| ptr | pointer to noble_simulation object |
| response | command parameters |
| output_function |
Definition at line 92 of file console.c.
| n_int console_braincode | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Show the braincode
| ptr | pointer to noble_simulation object |
| response | |
| output_function |
| void console_capture_death | ( | noble_being * | deceased, |
| void * | sim | ||
| ) |
| n_int console_death | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_debug | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_epic | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Lists the most talked about beings, based upon episodic memories
| ptr | pointer to noble_simulation object |
| response | command parameters |
| output_function | function used to display the output |
clear the list of beings and their hit scores
get the being
get the episodic memories for the being
skip is no memories were retrieved
for all memories
non-empty slot
j = 0 is the being having the memory j = 1 is the being who is the subject of the memory
name should be non-zero
Avoid memories about yourself, since we're interested in gossip about other beings
add this being to the list, or increment its hit score
< last entry in the list
being found in the list
increment the hit score for the being
top 10 most epic beings
search the rest of the list
< end of the list
if this being has more hits then swap list entries, so that the most popular beings are at the top of the list
swap
get the name of the being
free list memory
Definition at line 2006 of file console.c.
| n_int console_episodic | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Show the episodic memory
| ptr | pointer to noble_simulation object |
| response | |
| output_function |
| n_int console_event | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_file | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_genome | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| ptr | pointer to noble_simulation object |
| response | |
| output_function |
| n_int console_idea | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_interval | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Set the time interval for simulation
| ptr | pointer to noble_simulation object |
| response | command parameters |
| output_function | function used to display the output |
Definition at line 1439 of file console.c.
| n_int console_list | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_logging | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Enable or disable logging
| ptr | pointer to noble_simulation object |
| response | command parameters - off/on/0/1/yes/no |
| output_function | function to be used to display output |
| n_int console_next | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_open | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| void console_populate_braincode | ( | noble_simulation * | local_sim, |
| line_braincode | function | ||
| ) |
| n_int console_previous | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_probes | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| ptr | pointer to noble_simulation object |
| response | |
| output_function |
| n_int console_quit | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_reset | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Reset the simulation
| ptr | pointer to noble_simulation object |
| response | command parameters |
| output_function | function used to display the output |
Definition at line 1670 of file console.c.
| n_int console_run | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Run the simulation
| ptr | pointer to noble_simulation object |
| response | command parameters |
| output_function | function used to display the output |
Definition at line 1566 of file console.c.
| n_int console_save | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_script | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_simulation | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Show details of the overall simulation
| ptr | pointer to a noble_simulation object |
| response | parameters of the command |
| output_function | function to be used to display the result |
Definition at line 299 of file console.c.
| n_int console_social_graph | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Show the social graph
| ptr | pointer to noble_simulation object |
| response | |
| output_function |
| n_int console_speak | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_speech | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_stats | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| ptr | pointer to noble_simulation object |
| response | |
| output_function |
| n_int console_step | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Run the simulation for a single time interval
| ptr | pointer to noble_simulation object |
| response | command parameters |
| output_function | function used to display the output |
Definition at line 1514 of file console.c.
| n_int console_stop | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
| n_int console_top | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Displays beings in descending order of honor value
| ptr | pointer to noble_simulation object |
| response | command parameters |
| output_function | function used to display the output |
Definition at line 1874 of file console.c.
| n_int console_watch | ( | void * | ptr, |
| n_string | response, | ||
| n_console_output | output_function | ||
| ) |
Watch a particular being
| ptr | pointer to noble_simulation object |
| response | command parameters |
| output_function | function to be used to display output |
Definition at line 1316 of file console.c.
| void death_record_file_cleanup | ( | void | ) |
| n_file* death_record_file_ready | ( | void | ) |
| n_file* file_out | ( | void | ) |
| void sim_close | ( | void | ) |
| void sim_cycle | ( | void | ) |
| void sim_flood | ( | void | ) |
| void sim_healthy_carrier | ( | void | ) |
| void* sim_init | ( | KIND_OF_USE | kind, |
| n_uint | randomise, | ||
| n_uint | offscreen_size, | ||
| n_uint | landbuffer_size | ||
| ) |
| n_int sim_new | ( | void | ) |
| void sim_realtime | ( | n_uint | time | ) |
| void sim_set_select | ( | noble_being * | select | ) |
| noble_simulation* sim_sim | ( | void | ) |
| void sim_thread_console | ( | void | ) |
| void watch_ape | ( | void * | ptr, |
| n_console_output | output_function | ||
| ) |
1.8.1.1