Noble Ape
The Central Directories of the Noble Ape Simulation.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Macros | Typedefs | Enumerations | Functions
entity.h File Reference
#include "../noble/noble.h"
#include "../universe/universe.h"
Include dependency graph for entity.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  being_remove_loop2_struct

Macros

#define LAND_ON
#define WEATHER_ON
#define EPISODIC_AFFECT_ZERO   (16384)
#define SOCIAL_RESPECT_NORMAL   127
#define GENEALOGY_ON

Typedefs

typedef void( being_loop_fn )(noble_simulation *sim, noble_being *actual, void *data)

Enumerations

enum  being_energy { BEING_DEAD = 0, BEING_HUNGRY = (10 * 128), BEING_FULL = (BEING_HUNGRY * 3) }
enum  BRAINPROBE_TYPE { INPUT_SENSOR = 0, OUTPUT_ACTUATOR, NUMBER_BRAINPROBE_TYPES }
enum  GENEALOGY_FORMAT { GENEALOGY_NONE = 0, GENEALOGY_GENXML, GENEALOGY_GEDCOM, GENEALOGY_FORMATS }
enum  being_state_type {
  BEING_STATE_ASLEEP = 0, BEING_STATE_AWAKE = 1, BEING_STATE_HUNGRY = 2, BEING_STATE_SWIMMING = 4,
  BEING_STATE_EATING = 8, BEING_STATE_MOVING = 16, BEING_STATE_SPEAKING = 32, BEING_STATE_SHOUTING = 64,
  BEING_STATE_GROOMING = 128, BEING_STATE_SUCKLING = 256, BEING_STATE_SHOWFORCE = 512, BEING_STATE_ATTACK = 1024,
  BEING_STATES = 12
}
enum  being_episodic_event_type {
  EVENT_EAT = 1, EVENT_MATE, EVENT_HIT, EVENT_HIT_BY,
  EVENT_SWIM, EVENT_GROOM, EVENT_GROOMED, EVENT_CHAT,
  EVENT_SHOUT, EVENT_BIRTH, EVENT_CARRIED, EVENT_CARRIED_BY,
  EVENT_SUCKLED, EVENT_SUCKLED_BY, EVENT_SEEK_MATE, EVENT_WHACKED,
  EVENT_WHACKED_BY, EVENT_HURLED, EVENT_HURLED_BY, EVENT_HUGGED,
  EVENT_HUGGED_BY, EVENT_PRODDED, EVENT_PRODDED_BY, EVENT_DRAG,
  EVENT_BRANDISH, EVENT_DROP, EVENT_PICKUP, EVENT_GIVEN,
  EVENT_GIVEN_BY, EVENT_CHEW, EVENT_BASH_OBJECTS, EVENT_FISH,
  EVENT_SMILED, EVENT_SMILED_BY, EVENT_GLOWERED, EVENT_GLOWERED_BY,
  EVENT_PATTED, EVENT_PATTED_BY, EVENT_POINT, EVENT_POINTED,
  EVENT_TICKLED, EVENT_TICKLED_BY, EVENTS
}

Functions

void braincode_number_of_instructions (noble_simulation *sim, noble_being *local_being, n_int *no_of_sensors, n_int *no_of_actuators, n_int *no_of_operators, n_int *no_of_conditionals, n_int *no_of_data)
n_int being_memory (noble_simulation *local, n_byte *buffer, n_uint *location, n_int memory_available)
n_bytebeing_brain (noble_being *value)
noble_episodicbeing_episodic (noble_being *value)
noble_socialbeing_social (noble_being *value)
n_int being_brainstates (noble_being *value, n_int awake, n_byte2 *states)
n_byte being_honor (noble_being *value)
void being_honor_inc_dec (noble_being *inc, noble_being *dec)
void being_honor_swap (noble_being *victor, noble_being *vanquished)
n_int being_honor_compare (noble_being *first, noble_being *second)
void being_unpack_family (n_byte2 name, n_byte *values)
n_byte being_first_name (noble_being *value)
void being_set_family_name (noble_being *value, n_byte first, n_byte last)
n_byte being_family_first_name (noble_being *value)
n_byte being_family_second_name (noble_being *value)
n_byte2 being_gender_name (noble_being *value)
n_byte2 being_family_name (noble_being *value)
void being_name_simple (noble_being *value, n_string str)
n_byte being_posture (noble_being *value)
void being_set_posture (noble_being *value, n_byte post)
n_int being_posture_under (noble_being *value, enum posture_type post)
n_int being_location_x (noble_being *value)
n_int being_location_y (noble_being *value)
n_byte2being_location (noble_being *value)
void being_delta (noble_being *primary, noble_being *secondary, n_vect2 *delta)
void being_set_location (noble_being *value, n_byte2 *from)
n_int being_dob (noble_being *value)
n_byte being_speed (noble_being *value)
void being_set_speed (noble_being *value, n_byte sp)
void being_facing_towards (noble_being *value, n_vect2 *vector)
void being_facing_vector (noble_being *value, n_vect2 *vect, n_int divisor)
n_byte being_facing (noble_being *value)
void being_wander (noble_being *value, n_int wander)
n_geneticsbeing_genetics (noble_being *value)
n_int being_pregnant (noble_being *value)
n_geneticsbeing_fetal_genetics (noble_being *value)
n_int being_energy (noble_being *value)
n_int being_energy_less_than (noble_being *value, n_int less_than)
void being_dead (noble_being *value)
void being_living (noble_being *value)
void being_energy_delta (noble_being *value, n_int delta)
n_int being_drive (noble_being *value, enum drives_definition drive)
void being_inc_drive (noble_being *value, enum drives_definition drive)
void being_dec_drive (noble_being *value, enum drives_definition drive)
void being_reset_drive (noble_being *value, enum drives_definition drive)
n_int being_height (noble_being *value)
n_int being_mass (noble_being *value)
enum inventory_type being_carried (noble_being *value, enum BODY_INVENTORY_TYPES location)
void being_drop (noble_being *value, enum BODY_INVENTORY_TYPES location)
void being_take (noble_being *value, enum BODY_INVENTORY_TYPES location, enum inventory_type object)
void being_listen (noble_simulation *sim, noble_being *local, void *data)
n_bytebeing_braincode_external (noble_being *value)
n_bytebeing_braincode_internal (noble_being *value)
void being_loop_no_thread (noble_simulation *sim, noble_being *being_not, being_loop_fn bf_func, void *data)
void being_loop (noble_simulation *sim, being_loop_fn bf_func, n_int beings_per_thread)
void being_remove_external_set (n_int value)
n_int being_remove_internal (void)
void metabolism_vascular_description (n_int index, n_string description)
n_string metabolism_description (n_int index)
n_int metabolism_vascular_radius (noble_being *local_being, n_int vessel_index)
void being_name_byte2 (n_byte2 first, n_byte2 family, n_string name)
n_int being_init (n_land *land, noble_being *beings, n_int number, noble_being *local, noble_being *mother, n_byte2 *random_factor)
void being_erase (noble_being *value)
n_uint being_affect (noble_simulation *local_sim, noble_being *local, n_byte is_positive)
void episodic_cycle (noble_simulation *local_sim, noble_being *local, void *data)
 Update the episodic memories for a given ape. This is based upon a fading memory model in which older memories are replaced by newer ones. Each memory has an associated affect value indicating its emotional impact, and this fades over time.
void being_cycle_awake (noble_simulation *sim, noble_being *local)
void being_cycle_universal (noble_simulation *sim, noble_being *local, n_byte awake)
void drives_cycle (noble_simulation *local_sim, noble_being *local_being, void *data)
 Update biological drives.
void being_state_description (n_byte2 state, n_string result)
void being_set_state (noble_being *value, being_state_type state)
void being_add_state (noble_being *value, being_state_type state)
n_byte2 being_state (noble_being *value)
n_byte2 being_random (noble_being *value)
void being_set_select_name (noble_simulation *sim, n_string name)
n_string being_get_select_name (noble_simulation *sim)
n_int being_name_comparison (noble_being *value, n_byte2 gender_name, n_byte2 family_name)
void social_graph_link_name (noble_simulation *local_sim, noble_being *local_being, n_int social_graph_index, n_byte met, n_string name)
 Returns a string for the name of the ape in the given social graph array index.
n_int episodic_first_person_memories_percent (noble_simulation *local_sim, noble_being *local, n_byte intention)
 This returns the percentage of episodic memories or intentions which are first person. Some memories originate from the self and others are acquired from others via chatting.
void being_immune_transmit (noble_being *meeter_being, noble_being *met_being, n_byte transmission_type)
void body_genome (n_byte maternal, n_genetics *genome, n_byte *genome_str)
 Returns a string of letters representing the genome.
void being_relationship_description (n_int index, n_string description)
n_string being_body_inventory_description (n_int index)
void brain_dialogue (noble_simulation *sim, n_byte awake, noble_being *meeter_being, noble_being *met_being, n_byte *bc0, n_byte *bc1, n_int being_index)
 Two beings meet and chat, or a being engages in an internal dialogue.
void brain_cycle (n_byte *local, n_byte2 *constants)
 Updates the brain.
noble_beingbeing_from_name (noble_simulation *sim, n_string name)
 return the being array index with the given name
void being_remove (noble_simulation *local_sim)
void brain_three_byte_command (n_string string, n_byte *response)
 prints a three byte instruction in the appropriate format
void brain_sentence (n_string string, n_byte *response)
 A simple sort of sentence construction from three byte instructions.
n_int episode_description (noble_simulation *sim, noble_being *local_being, n_int index, n_string description)
void episodic_logging (n_console_output *output_function, n_int social)
n_uint social_respect_mean (noble_simulation *sim, noble_being *local_being)
 Returns the average friend or foe value.
noble_beingbeing_find_name (noble_simulation *sim, n_byte2 first_gender, n_byte2 family)
void being_move (noble_being *local, n_int vel, n_byte kind)
void being_change_selected (noble_simulation *sim, n_byte forwards)
n_byte being_awake (noble_simulation *sim, noble_being *local)
n_byte being_los (n_land *land, noble_being *local, n_byte2 lx, n_byte2 ly)
void speak_out (n_string filename, n_string paragraph)
void social_conception (noble_being *female, noble_being *male, noble_simulation *sim)
 Update for a conception event. This stores the date, details of the father and resets drives and goals.
void social_initial_loop (noble_simulation *local, noble_being *local_being, void *data)
void social_secondary_loop (noble_simulation *local, noble_being *local_being, void *data)
void being_tidy_loop (noble_simulation *local_sim, noble_being *local_being, void *data)
void being_recalibrate_honor_loop (noble_simulation *local, noble_being *value, void *data)
void being_remove_loop1 (noble_simulation *local_sim, noble_being *local_being, void *data)
void being_remove_loop2 (noble_simulation *local_sim, noble_being *local, void *data)
being_remove_loop2_structbeing_remove_initial (noble_simulation *local_sim)
void being_remove_final (noble_simulation *local_sim, being_remove_loop2_struct **brls)
void being_remains_init (noble_simulation *sim)
void being_remains (noble_simulation *sim, noble_being *dead)
n_int being_index (noble_simulation *sim, noble_being *local)

Macro Definition Documentation

#define EPISODIC_AFFECT_ZERO   (16384)

Definition at line 58 of file entity.h.

#define GENEALOGY_ON

Definition at line 76 of file entity.h.

#define LAND_ON

Definition at line 51 of file entity.h.

#define SOCIAL_RESPECT_NORMAL   127

Definition at line 67 of file entity.h.

#define WEATHER_ON

Definition at line 52 of file entity.h.


Typedef Documentation

typedef void( being_loop_fn)(noble_simulation *sim, noble_being *actual, void *data)

Definition at line 254 of file entity.h.


Enumeration Type Documentation

Enumerator:
BEING_DEAD 
BEING_HUNGRY 
BEING_FULL 

Definition at line 60 of file entity.h.

Enumerator:
EVENT_EAT 
EVENT_MATE 
EVENT_HIT 
EVENT_HIT_BY 
EVENT_SWIM 
EVENT_GROOM 
EVENT_GROOMED 
EVENT_CHAT 
EVENT_SHOUT 
EVENT_BIRTH 
EVENT_CARRIED 
EVENT_CARRIED_BY 
EVENT_SUCKLED 
EVENT_SUCKLED_BY 
EVENT_SEEK_MATE 
EVENT_WHACKED 
EVENT_WHACKED_BY 
EVENT_HURLED 
EVENT_HURLED_BY 
EVENT_HUGGED 
EVENT_HUGGED_BY 
EVENT_PRODDED 
EVENT_PRODDED_BY 
EVENT_DRAG 
EVENT_BRANDISH 
EVENT_DROP 
EVENT_PICKUP 
EVENT_GIVEN 
EVENT_GIVEN_BY 
EVENT_CHEW 
EVENT_BASH_OBJECTS 
EVENT_FISH 
EVENT_SMILED 
EVENT_SMILED_BY 
EVENT_GLOWERED 
EVENT_GLOWERED_BY 
EVENT_PATTED 
EVENT_PATTED_BY 
EVENT_POINT 
EVENT_POINTED 
EVENT_TICKLED 
EVENT_TICKLED_BY 
EVENTS 

Definition at line 104 of file entity.h.

Enumerator:
BEING_STATE_ASLEEP 
BEING_STATE_AWAKE 
BEING_STATE_HUNGRY 
BEING_STATE_SWIMMING 
BEING_STATE_EATING 
BEING_STATE_MOVING 
BEING_STATE_SPEAKING 
BEING_STATE_SHOUTING 
BEING_STATE_GROOMING 
BEING_STATE_SUCKLING 
BEING_STATE_SHOWFORCE 
BEING_STATE_ATTACK 
BEING_STATES 

Definition at line 87 of file entity.h.

Enumerator:
INPUT_SENSOR 
OUTPUT_ACTUATOR 
NUMBER_BRAINPROBE_TYPES 

Definition at line 69 of file entity.h.

Enumerator:
GENEALOGY_NONE 
GENEALOGY_GENXML 
GENEALOGY_GEDCOM 
GENEALOGY_FORMATS 

Definition at line 78 of file entity.h.


Function Documentation

void being_add_state ( noble_being value,
being_state_type  state 
)

Definition at line 113 of file being.c.

Here is the caller graph for this function:

n_uint being_affect ( noble_simulation local_sim,
noble_being local,
n_byte  is_positive 
)

returns the total positive and negative affect within memory

Definition at line 1278 of file being.c.

Here is the call graph for this function:

n_byte being_awake ( noble_simulation sim,
noble_being local 
)

This checks to see if the Noble Ape is awake

Parameters:
simThe simulation pointer
referenceThe specific Noble Ape checked for being awake
Returns:
2 is fully awake, 1 is slightly awake to eat, 0 is asleep

if it is not night, the being is fully awake

if it night the being is...

... fully awake to swim

... slightly awake to eat

... slightly awake to slow down

... asleep

Definition at line 2076 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_string being_body_inventory_description ( n_int  index)

Definition at line 1312 of file being.c.

Here is the caller graph for this function:

n_byte* being_brain ( noble_being value)

Definition at line 275 of file being.c.

Here is the caller graph for this function:

n_byte* being_braincode_external ( noble_being value)

Definition at line 94 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_byte* being_braincode_internal ( noble_being value)

Definition at line 100 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int being_brainstates ( noble_being value,
n_int  awake,
n_byte2 states 
)

Definition at line 196 of file being.c.

enum inventory_type being_carried ( noble_being value,
enum BODY_INVENTORY_TYPES  location 
)

Definition at line 487 of file being.c.

Here is the caller graph for this function:

void being_change_selected ( noble_simulation sim,
n_byte  forwards 
)

Definition at line 2040 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_cycle_awake ( noble_simulation sim,
noble_being local 
)

tmp_speed is the optimum speed based on the gradient

delta_energy is the energy required for movement

amount of body fat in kg

If it sees water in the distance then turn

horizontally oriented posture

When swimming drop everything except what's on your head or back. Note that the groomed flag is also cleared

swimming proficiency

bathing removes parasites

adjust speed using genetics

is the being to which we are paying attention within view?

Find the closest beings

eating when stopped

remember eating

grow

orient towards a goal

a certain time after giving birth females become receptive again

zero value indicates ready to conceive

A mother could have multiple children, so only find the youngest

Birth

mother carries the child

Compute the mass of the unborn child. This will be added to the mass of the mother

child follows the mother

orient towards the mother

suckling

child moves from back to front

sucking causes loss of grooming

hungry mothers stop producing milk

mother loses energy

child gains energy

set child state to suckling

child acquires immunity from mother

no longer carrying the child

rescale familiarity values

Definition at line 2698 of file being.c.

Here is the call graph for this function:

void being_cycle_universal ( noble_simulation sim,
noble_being local,
n_byte  awake 
)

stuff still goes on during sleep

may need to add external probe linking too

Definition at line 2215 of file being.c.

Here is the call graph for this function:

void being_dead ( noble_being value)

Definition at line 385 of file being.c.

Here is the caller graph for this function:

void being_dec_drive ( noble_being value,
enum drives_definition  drive 
)

Definition at line 420 of file being.c.

void being_delta ( noble_being primary,
noble_being secondary,
n_vect2 delta 
)

Definition at line 323 of file being.c.

Here is the caller graph for this function:

n_int being_dob ( noble_being value)

Definition at line 329 of file being.c.

n_int being_drive ( noble_being value,
enum drives_definition  drive 
)

Definition at line 407 of file being.c.

Here is the caller graph for this function:

void being_drop ( noble_being value,
enum BODY_INVENTORY_TYPES  location 
)

Definition at line 492 of file being.c.

Definition at line 375 of file being.c.

void being_energy_delta ( noble_being value,
n_int  delta 
)

Definition at line 395 of file being.c.

Here is the caller graph for this function:

n_int being_energy_less_than ( noble_being value,
n_int  less_than 
)

Definition at line 380 of file being.c.

Here is the caller graph for this function:

noble_episodic* being_episodic ( noble_being value)

Definition at line 281 of file being.c.

Here is the caller graph for this function:

void being_erase ( noble_being value)

Definition at line 207 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_byte being_facing ( noble_being value)

Definition at line 354 of file being.c.

Here is the caller graph for this function:

void being_facing_towards ( noble_being value,
n_vect2 vector 
)

Definition at line 334 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_facing_vector ( noble_being value,
n_vect2 vect,
n_int  divisor 
)

Definition at line 349 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_byte being_family_first_name ( noble_being value)

Definition at line 1905 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_byte2 being_family_name ( noble_being value)

Definition at line 1891 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_byte being_family_second_name ( noble_being value)

Definition at line 1917 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_genetics* being_fetal_genetics ( noble_being value)

Definition at line 369 of file being.c.

Here is the caller graph for this function:

noble_being* being_find_name ( noble_simulation sim,
n_byte2  first_gender,
n_byte2  family 
)

Definition at line 1267 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_byte being_first_name ( noble_being value)

Definition at line 1858 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

noble_being* being_from_name ( noble_simulation sim,
n_string  name 
)

return the being array index with the given name

Parameters:
simPointer to the simulation object
nameName of the being
Returns:
Array index of the being within the simulation object

Definition at line 738 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_byte2 being_gender_name ( noble_being value)

Definition at line 1882 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_genetics* being_genetics ( noble_being value)

Definition at line 359 of file being.c.

n_string being_get_select_name ( noble_simulation sim)

Definition at line 759 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int being_height ( noble_being value)

Definition at line 433 of file being.c.

n_byte being_honor ( noble_being value)

Definition at line 212 of file being.c.

Here is the caller graph for this function:

n_int being_honor_compare ( noble_being first,
noble_being second 
)

Definition at line 234 of file being.c.

Here is the caller graph for this function:

void being_honor_inc_dec ( noble_being inc,
noble_being dec 
)

Definition at line 217 of file being.c.

Here is the caller graph for this function:

void being_honor_swap ( noble_being victor,
noble_being vanquished 
)

swap social status

Definition at line 223 of file being.c.

Here is the caller graph for this function:

void being_immune_transmit ( noble_being meeter_being,
noble_being met_being,
n_byte  transmission_type 
)

pathogen obtained from environment

pathogen transmitted between beings

does the other being already carry this pathogen ?

spread pathogen

Definition at line 916 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_inc_drive ( noble_being value,
enum drives_definition  drive 
)

Definition at line 412 of file being.c.

n_int being_index ( noble_simulation sim,
noble_being local 
)

Definition at line 2686 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int being_init ( n_land land,
noble_being beings,
n_int  number,
noble_being local,
noble_being mother,
n_byte2 random_factor 
)

Initialise the ape's variables and clear its brain

Parameters:
simPointer to the simulation object
motherPointer to the mother
random_factorRandom seed
Returns:
0

this is the being to be born

Set learned preferences to 0.5 (no preference in either direction. This may seem like tabla rasa, but there are genetic biases

clear the generation numbers for mother and father

initially seed the brain with instructions which are genetically biased

has no social connections initially

default type of entity

friend_or_foe can be positive or negative, with SOCIAL_RESPECT_NORMAL as the zero point

randomly initialize registers

initialize brainprobes

this is the same as equals

ascribed social status

produce an initial distribution of heights and masses

These magic numbers were found in March 2001 - feel free to change them!

Definition at line 3287 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_listen ( noble_simulation local_sim,
noble_being local_being,
void *  data 
)

Listen for shouts

Parameters:
simPointer to the simulation
current_being_indexArray index of the current being

clear shout values

Definition at line 2500 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_living ( noble_being value)

Definition at line 390 of file being.c.

Here is the caller graph for this function:

n_byte2* being_location ( noble_being value)

Definition at line 302 of file being.c.

Here is the caller graph for this function:

n_int being_location_x ( noble_being value)

Definition at line 292 of file being.c.

n_int being_location_y ( noble_being value)

Definition at line 297 of file being.c.

void being_loop ( noble_simulation sim,
being_loop_fn  bf_func,
n_int  beings_per_thread 
)

Definition at line 537 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_loop_no_thread ( noble_simulation sim,
noble_being being_not,
being_loop_fn  bf_func,
void *  data 
)

Definition at line 504 of file being.c.

Here is the caller graph for this function:

n_byte being_los ( n_land land,
noble_being local,
n_byte2  lx,
n_byte2  ly 
)

This checks to see if a Noble Ape can see a particular point

Parameters:
simThe simulation pointer
referenceThe specific Noble Ape checked for being awake
lxThe x location of the point to be seen.
lyThe y location of the point to be seen.
Returns:
1 can see, 0 can not see

Definition at line 783 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int being_mass ( noble_being value)

Definition at line 438 of file being.c.

n_int being_memory ( noble_simulation local,
n_byte buffer,
n_uint location,
n_int  memory_available 
)

Definition at line 149 of file being.c.

Here is the call graph for this function:

void being_move ( noble_being local,
n_int  rel_vel,
n_byte  kind 
)

This moves the specified Noble Ape outside the core simulation movement interface - think mouse movement or keyboard movement.

Parameters:
localThe pointer to the noble_being being moved.
rel_velThe movement variable used - historically the velocity hence the variable name.
kindThe kind of movement used - 0 = turning around pivoting on the z-axis (ie a standing turn), 1 = move forwards or backwards based on the direction facing, 2 = cursor like movements along the X and Y axis useful when operating the arrow keys (but not much else).

Definition at line 2010 of file being.c.

Here is the call graph for this function:

void being_name_byte2 ( n_byte2  first,
n_byte2  family,
n_string  name 
)

Definition at line 1958 of file being.c.

Here is the caller graph for this function:

n_int being_name_comparison ( noble_being value,
n_byte2  gender_name,
n_byte2  family_name 
)

Definition at line 1900 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_name_simple ( noble_being value,
n_string  str 
)

Definition at line 1953 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_byte being_posture ( noble_being value)

Definition at line 259 of file being.c.

Here is the caller graph for this function:

n_int being_posture_under ( noble_being value,
enum posture_type  post 
)

Definition at line 269 of file being.c.

n_int being_pregnant ( noble_being value)

Definition at line 364 of file being.c.

Here is the caller graph for this function:

n_byte2 being_random ( noble_being value)

Definition at line 128 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_recalibrate_honor_loop ( noble_simulation local,
noble_being value,
void *  data 
)

Definition at line 3662 of file being.c.

Here is the caller graph for this function:

void being_relationship_description ( n_int  index,
n_string  description 
)

Definition at line 1327 of file being.c.

Here is the call graph for this function:

void being_remains ( noble_simulation sim,
noble_being dead 
)

Definition at line 1506 of file being.c.

Here is the caller graph for this function:

void being_remains_init ( noble_simulation sim)

Definition at line 1498 of file being.c.

Here is the caller graph for this function:

void being_remove ( noble_simulation local_sim)
void being_remove_external_set ( n_int  value)

Definition at line 3675 of file being.c.

void being_remove_final ( noble_simulation local_sim,
being_remove_loop2_struct **  brls 
)

Definition at line 3730 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

being_remove_loop2_struct* being_remove_initial ( noble_simulation local_sim)

Definition at line 3711 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int being_remove_internal ( void  )

Definition at line 3670 of file being.c.

void being_remove_loop1 ( noble_simulation local_sim,
noble_being local_being,
void *  data 
)

Definition at line 3680 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_remove_loop2 ( noble_simulation local_sim,
noble_being local,
void *  data 
)

Definition at line 3688 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_reset_drive ( noble_being value,
enum drives_definition  drive 
)

Definition at line 428 of file being.c.

Here is the caller graph for this function:

void being_set_family_name ( noble_being value,
n_byte  first,
n_byte  last 
)

Definition at line 1876 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_set_location ( noble_being value,
n_byte2 from 
)

Definition at line 307 of file being.c.

Here is the caller graph for this function:

void being_set_posture ( noble_being value,
n_byte  post 
)

Definition at line 264 of file being.c.

Here is the caller graph for this function:

void being_set_select_name ( noble_simulation sim,
n_string  name 
)

Definition at line 748 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_set_speed ( noble_being value,
n_byte  sp 
)

Definition at line 318 of file being.c.

Here is the caller graph for this function:

void being_set_state ( noble_being value,
being_state_type  state 
)

Definition at line 108 of file being.c.

Here is the caller graph for this function:

noble_social* being_social ( noble_being value)

Definition at line 287 of file being.c.

Here is the caller graph for this function:

n_byte being_speed ( noble_being value)

Definition at line 313 of file being.c.

Here is the caller graph for this function:

n_byte2 being_state ( noble_being value)

Definition at line 118 of file being.c.

Here is the caller graph for this function:

void being_state_description ( n_byte2  state,
n_string  result 
)

Definition at line 1967 of file being.c.

Here is the call graph for this function:

void being_take ( noble_being value,
enum BODY_INVENTORY_TYPES  location,
enum inventory_type  object 
)

Definition at line 498 of file being.c.

void being_tidy_loop ( noble_simulation local_sim,
noble_being local_being,
void *  data 
)

the more body fat, the less energy is lost whilst swimming

going uphill

hairy creatures are better insulated

this simulates natural death or at least some trauma the ape may or may not be able to recover from

Definition at line 3557 of file being.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void being_unpack_family ( n_byte2  name,
n_byte values 
)

Definition at line 1852 of file being.c.

void being_wander ( noble_being value,
n_int  wander 
)

Definition at line 339 of file being.c.

Here is the caller graph for this function:

void body_genome ( n_byte  maternal,
n_genetics genome,
n_byte genome_str 
)

Returns a string of letters representing the genome.

Parameters:
maternalShow either the maternal or paternal side of each chromosome
genomeThe genome to be shown
genome_strThe returned string

for every chromosome

for each 2 bit gene in the chromosome. Each chromosome is 16 bits long with the full 32 bit value containing the chromosome pair

the maternal part of the diplod

the paternal part of the diploid

Definition at line 954 of file body.c.

void brain_cycle ( n_byte local,
n_byte2 constants 
)

Updates the brain.

Parameters:
localPointer to the brain array
constantsArray containing brain constants

Definition at line 103 of file brain.c.

Here is the call graph for this function:

void brain_dialogue ( noble_simulation sim,
n_byte  awake,
noble_being meeter_being,
noble_being met_being,
n_byte bc0,
n_byte bc1,
n_int  being_index 
)

Two beings meet and chat, or a being engages in an internal dialogue.

Parameters:
simPointer to the simulation object
awakeWhether the being is awake
meeter_beingPointer to the being doing the meeting
met_beingPointer to the being which was met
bc0Braincode of the meeter
bc1Braincode of the met
being_indexSocial graph index of the being which is the current focus of attention

fixed number of itterations for internal dialogue

variable number of itterations for chat

clear episodes visited. This array helps to avoid repeatedly visiting the same memories

General sensor

Shift attention to a different actor

store the current focus of attention

Shift attention to a different episode

Shift attention to a different territory

Shift attention to a body region

Shift attention to a similar location

Shift attention to a similar time

Shift attention to a similar date

Shift attention to a similar name

Shift attention to a similar affect

atmosphere pressure

wind magnitude

attention to body

territory name

territory familiarity

territory familiarity

carrying object

shift attention to a given social graph entry based on relationship

store the current focus of attention

shift attention to a different relationship type

store the current relationship attention

If attention has shifted to a new episode

Shift attention to the being in this episode

store the change in attention

set territory attention to the location where the episode occurred

Action

individual or social action

Set location goal

alter friend or foe value

alter attraction

alter familiarity

The values 10 and 20 meetings were just found experimentally

brainprobe frequency

brainprobe address

shout out

volume of message

type of message

intention

brainprobe offset

posture

brainprobe position

alter learned preferences

spread anecdote

not internal dialogue

avoid repeated anecdotes in the same conversation

Definition at line 1152 of file brain.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void brain_sentence ( n_string  string,
n_byte response 
)

A simple sort of sentence construction from three byte instructions.

Parameters:
stringThe returned sentence
responseArray containing three byte instruction

Definition at line 442 of file brain.c.

Here is the call graph for this function:

void brain_three_byte_command ( n_string  string,
n_byte response 
)

prints a three byte instruction in the appropriate format

Parameters:
stringThe returned string
responseArray containing the three byte instruction

Definition at line 406 of file brain.c.

Here is the caller graph for this function:

void braincode_number_of_instructions ( noble_simulation sim,
noble_being local_being,
n_int no_of_sensors,
n_int no_of_actuators,
n_int no_of_operators,
n_int no_of_conditionals,
n_int no_of_data 
)

Definition at line 510 of file brain.c.

Here is the call graph for this function:

void drives_cycle ( noble_simulation local_sim,
noble_being local_being,
void *  data 
)

Update biological drives.

Parameters:
localPointer to the ape
beings_in_vicinityThe number of other apes within the vicinity
awakeWhether the ape is awake
simPointer to the simulation

Definition at line 287 of file drives.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int episode_description ( noble_simulation sim,
noble_being local_being,
n_int  index,
n_string  description 
)

Definition at line 1521 of file being.c.

Here is the call graph for this function:

void episodic_cycle ( noble_simulation local_sim,
noble_being local_being,
void *  data 
)

Update the episodic memories for a given ape. This is based upon a fading memory model in which older memories are replaced by newer ones. Each memory has an associated affect value indicating its emotional impact, and this fades over time.

The rate of fading is genetically regulated, with different rates for memories with positive and negative affect. This facilitates optimistic/pessimistic and forgetful/memorable type personalities.

The fading memory model may not be strictly realistic, and might be replaced by something else in future.

Parameters:
local_simpointer to the simulation
localpointer to the ape

remove intentions which are outdated

is this my intention, or someone else's?

fade towards EPISODIC_AFFECT_ZERO

negative memories fade

positive memories fade

Definition at line 134 of file episodic.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_int episodic_first_person_memories_percent ( noble_simulation local_sim,
noble_being local,
n_byte  intention 
)

This returns the percentage of episodic memories or intentions which are first person. Some memories originate from the self and others are acquired from others via chatting.

Parameters:
local_simpointer to the simulation
localpointer to the ape
intention,:0=episodic memories, 1=intentions
Returns:
percentage in the range 0-100

examine all memories

ratio of intentions to other memories

ratio of first person memories to other memories

Definition at line 265 of file episodic.c.

Here is the call graph for this function:

void episodic_logging ( n_console_output output_function,
n_int  social 
)

Definition at line 52 of file episodic.c.

Here is the caller graph for this function:

n_string metabolism_description ( n_int  index)
void metabolism_vascular_description ( n_int  index,
n_string  description 
)
n_int metabolism_vascular_radius ( noble_being local_being,
n_int  vessel_index 
)
void social_conception ( noble_being female,
noble_being male,
noble_simulation sim 
)

Update for a conception event. This stores the date, details of the father and resets drives and goals.

Parameters:
femalePointer to the mother
malePointer to the father
todayThe current date
simPointer to the simulation

store the date of conception

reset sex drive and goal

remember the event

Definition at line 1367 of file social.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void social_graph_link_name ( noble_simulation local_sim,
noble_being local_being,
n_int  social_graph_index,
n_byte  met,
n_string  name 
)

Returns a string for the name of the ape in the given social graph array index.

Parameters:
local_simPointer to the simulation
localbeingPinter to the ape
social_graph_indexArray index within the social graph
metBEING_MEETER=return name for the meeter, BEING_MET=return name for the met
nameReturned ape name

Get the social graph for the being

Definition at line 479 of file social.c.

Here is the call graph for this function:

void social_initial_loop ( noble_simulation local,
noble_being local_being,
void *  data 
)

< Bug fix for division by zero on the following line

Definition at line 1814 of file social.c.

Here is the call graph for this function:

Here is the caller graph for this function:

n_uint social_respect_mean ( noble_simulation sim,
noble_being local_being 
)

Returns the average friend or foe value.

Parameters:
simPointer to the simulation
local_beingPointer to the ape
Returns:
The average friend or foe value for all social graph entries

note that this includes the self

Definition at line 1332 of file social.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void social_secondary_loop ( noble_simulation local,
noble_being local_being,
void *  data 
)
Parameters:
localPointer to the simulation object
local_beingPointer to the being

Definition at line 1871 of file social.c.

Here is the caller graph for this function:

void speak_out ( n_string  filename,
n_string  paragraph 
)

Definition at line 182 of file speak.c.

Here is the call graph for this function:

Here is the caller graph for this function: