The AHA Model  Revision: 12809
Reference implementation 04 (HEDG02_04)
m_neuro.f90 File Reference

The Neurobiological and behaviour architecture of the AHA Model. More...

Go to the source code of this file.

Data Types

type  the_neurobio::percept_food
 This type defines how the agent perceives food items. The food perception object the_neurobio::percept_food is basically an array of food objects within the visual range of the agent plus distances to the agent. This is the "objective" perception container, reflecting the "real world". We introduce a perception error when perception object is analysed by the agent's neurobiological system. More...
 
type  the_neurobio::spatial_percept_component
 This type defines a single spatial perception component, i.e. some single elementary spatial object that can be perceived by the agent from a big array of objects of the same type which are available in the agent's environment. Different kinds of perception objects (e.g. conspecifics, predators etc.) can be produced by extending this basic type. More...
 
type  the_neurobio::conspec_percept_comp
 This type defines a single conspecific perception component. It is required for the the_neurobio::percept_conspecifics type that defines the whole conspecifics perception object (array of conspecifics). More...
 
type  the_neurobio::percept_conspecifics
 This type defines how the agent perceives conspecifics. More...
 
type  the_neurobio::spatialobj_percept_comp
 This type defines a single arbitrary spatial object perception component. For example, a predator perception object is then an array of such spatial object perception components. More...
 
type  the_neurobio::percept_predator
 This type defines how the agent perceives a predator. More...
 
type  the_neurobio::percept_stomach
 This type defines how the agent perceives its own stomach capacity. More...
 
type  the_neurobio::percept_body_mass
 This type defines how the agent perceives its own body mass it can be important for state-dependency. More...
 
type  the_neurobio::percept_energy
 This type defines how the agent perceives its own energy reserves it can be important for state-dependency. More...
 
type  the_neurobio::percept_age
 This type defines how the agent perceives its own age in terms of the model discrete time step. More...
 
type  the_neurobio::percept_reprfact
 Perception of the reproductive factor, reproductive factor depends on the sex hormones differently in males and females. More...
 
type  the_neurobio::percept_light
 Perception of the ambient illumination. This is a very simple perception component, singular and static. More...
 
type  the_neurobio::percept_depth
 Perception of the current depth horizon. More...
 
type  the_neurobio::memory_perceptual
 Individual perception memory(history) stack, a memory component that saves perception values at previous time steps of the model. Not whole perception objects are saved for simplicity, only the most important parameters, integer and real types so commondata::add_to_history() can be used in unmodified form. Decision making can make use of this memory stack. More...
 
type  the_neurobio::perception
 The perception architecture of the agent. See "The perception mechanism" for a general overview. At this level, lower order perception objects are combined into the the_neurobio::perception class hierarchy level of the agent. The object bound functions see_ and feel_ obtain (set) the specific perception objects from the external or internal environments of the agent and put them into the the_neurobio::perception data structure. Also, memory component is updated with the perception data. Perception objects can then be used as input into the individual decision-making procedures. More...
 
type  the_neurobio::percept_components_motiv
 Perceptual components of motivational states. Plugged into all STATE_, attention etc. These components are linked to specific inner or outer perception objects (stimuli). Their sum result(s) in the overall value of the motivation component. More...
 
type  the_neurobio::state_motivation_base
 These types describe the neurobiological states of the agent. (1) Each state may have several components that are related to specific inner or outer perception objects (stimuli). (2) There is also a motivation component that describes the global motivation value for this state. More...
 
interface  the_neurobio::motivation_init_root
 Abstract interface for the deferred init function clean_init that has to be overridden by each object that extends the basic motivational state type. More...
 
type  the_neurobio::state_hunger
 The motivational state of hunger. Evokes food seeking, eating, higher activity, emigrating and habitat switching. More...
 
type  the_neurobio::state_fear_defence
 The state of fear state. Evokes active escape, fleeing, emigration and habitat switch. More...
 
type  the_neurobio::state_reproduce
 The state of reproduction. Evokes seeking conspecifics and mating during the reproductive phase. More...
 
type  the_neurobio::motivation
 Motivation is a collection of all internal motivational states of the agent. This type is also used in defining Expectancies of motivations. More...
 
type  the_neurobio::memory_emotional
 Individual motivation/emotion memory stack, a memory component that saves the values of the final motivations at previous time steps of the model. Not whole state (STATE_) objects are saved for simplicity. add_to_history is used in unmodified form. Decision making can make use of this emotional memory stack. More...
 
type  the_neurobio::appraisal
 The appraisal level. At this level, perception objects are feed into the commondata::gamma2gene() sigmoid function and the neuronal responses are obtained at the output. Neuronal responses for different perception objects are then summed up and the promary motivation values are obtained. Following this, modulation alters some of the primary motivation values resulting in the final motivation values. See "From perception to GOS" for an overview. More...
 
type  the_neurobio::gos_global
 Global organismic state (GOS) level. GOS is defined by the dominant motivational state component (STATE_), namely, by the logical flag %dominant_state. If this logical flag is TRUE for a particular motivational state component, this state is the GOS. Thus, there should be is no separate data component(s) e.g. "value" for GOS. The values the_neurobio::gos_global::gos_main and the_neurobio::gos_global::gos_arousal can be inferred from the motivations, here are doubled mainly for convenience. See "From perception to GOS" for an overview. More...
 

Modules

module  the_neurobio
 Definition of the decision making and behavioural the architecture.
 

Functions/Subroutines

elemental subroutine the_neurobio::percept_food_create_init (this, maximum_number_food_items)
 Initiate an empty food perception object with known number of components. More...
 
subroutine the_neurobio::percept_food_number_seen (this, number_set)
 Set the total number of food items perceived (seen) in the food perception object. Do not reallocate the perception object components with respect to this new number yet. More...
 
subroutine the_neurobio::percept_food_make_fill_arrays (this, items, dist)
 Make the food perception object, fill it with the actual data arrays. More...
 
elemental integer function the_neurobio::percept_food_get_count_found (this)
 Get the number (count) of food items seen. Trivial. More...
 
elemental real(srp) function the_neurobio::percept_food_get_meansize_found (this)
 Get the average size of food items seen. Trivial. More...
 
elemental real(srp) function the_neurobio::percept_food_get_meanmass_found (this)
 Get the average mass of food items seen. Trivial. More...
 
elemental real(srp) function the_neurobio::percept_food_get_meandist_found (this)
 Get the average distance to the food items seen. Trivial. More...
 
elemental subroutine the_neurobio::percept_food_destroy_deallocate (this)
 Deallocate and delete a food perception object. More...
 
subroutine the_neurobio::food_perception_get_visrange_objects (this, food_resource_available, time_step_model)
 Get available food items within the visual range of the agent, which the agent can perceive and therefore respond to. Food perception is packaged into the food perception object this%perceive_food for output. More...
 
elemental logical function the_neurobio::food_perception_is_seeing_food (this)
 Check if the agent sees any food items within its visual range. More...
 
real(srp) function the_neurobio::food_perception_probability_capture_memory_object (this, last, time_step_model)
 Calculate the probability of capture of a subjective representation of food item based on the data from the perceptual memory stack. More...
 
elemental subroutine the_neurobio::percept_stomach_create_init (this)
 Initiate an empty stomach capacity perception object. More...
 
elemental real(srp) function the_neurobio::percept_stomach_get_avail_capacity (this)
 Get the currently available value of the available stomach volume. More...
 
subroutine the_neurobio::percept_stomach_update_avail_capacity (this, current_volume)
 Set and update the currently available value of the available stomach volume. More...
 
elemental subroutine the_neurobio::percept_stomach_destroy_deallocate (this)
 Destroy the stomach perception object and deallocate it. More...
 
elemental subroutine the_neurobio::percept_bodymass_create_init (this)
 Initiate an empty body mass perception object. More...
 
elemental real(srp) function the_neurobio::percept_bodymass_get_current (this)
 Get the current value of the body mass perception. More...
 
subroutine the_neurobio::percept_bodymass_update_current (this, current)
 Set and update the current body mass perception value. More...
 
elemental subroutine the_neurobio::percept_bodymass_destroy_deallocate (this)
 Destroy the body mass perception object and deallocate. More...
 
elemental subroutine the_neurobio::percept_energy_create_init (this)
 Initiate an empty energy perception object. More...
 
elemental real(srp) function the_neurobio::percept_energy_get_current (this)
 Get the current value of the energy reserves. More...
 
subroutine the_neurobio::percept_energy_update_current (this, current)
 Set and update the current energy perception value. More...
 
elemental subroutine the_neurobio::percept_energy_destroy_deallocate (this)
 Destroy the energy perception object and deallocate. More...
 
elemental subroutine the_neurobio::percept_age_create_init (this)
 Initiate an empty age perception object. More...
 
elemental integer function the_neurobio::percept_age_get_current (this)
 Get the current value of the age reserves. More...
 
subroutine the_neurobio::percept_age_update_current (this, current)
 Set and update the current age perception value. More...
 
elemental subroutine the_neurobio::percept_age_destroy_deallocate (this)
 Destroy the age perception object and deallocate it. More...
 
subroutine the_neurobio::spatial_percept_set_cid (this, id)
 Set unique id for the conspecific perception component. More...
 
elemental integer function the_neurobio::spatial_percept_get_cid (this)
 Get the unique id of the food item object. More...
 
elemental subroutine the_neurobio::consp_percept_comp_create (this)
 Create a single conspecific perception component at an undefined position with default properties. More...
 
subroutine the_neurobio::consp_percept_make (this, location, size, mass, dist, cid, is_male)
 Make a single conspecific perception component. This is a single conspecific located within the visual range of the agent. More...
 
elemental real(srp) function the_neurobio::consp_percept_get_size (this)
 Get the conspecific perception component body size. More...
 
elemental real(srp) function the_neurobio::consp_percept_get_mass (this)
 Get the conspecific perception component body mass. More...
 
elemental real(srp) function the_neurobio::consp_percept_get_dist (this)
 Get the conspecific perception component distance. More...
 
elemental logical function the_neurobio::consp_percept_sex_is_male_get (this)
 Get the conspecific perception component sex flag (male). More...
 
elemental logical function the_neurobio::consp_percept_sex_is_female_get (this)
 Get the conspecific perception component sex flag (female). More...
 
elemental subroutine the_neurobio::percept_consp_create_init (this, maximum_number_conspecifics)
 Create conspecifics perception object, it is an array of conspecific perception components. More...
 
elemental subroutine the_neurobio::percept_consp_number_seen (this, number_set)
 Set the total number of conspecifics perceived (seen) in the conspecific perception object. But do not reallocate the conspecific perception components so far. More...
 
pure subroutine the_neurobio::percept_consp_make_fill_arrays (this, consps)
 Make the conspecifics perception object, fill it with the actual arrays. More...
 
elemental integer function the_neurobio::percept_consp_get_count_seen (this)
 Get the number (count) of conspecifics seen. Trivial. More...
 
elemental subroutine the_neurobio::percept_consp_destroy_deallocate (this)
 Deallocate and delete a conspecific perception object. More...
 
subroutine the_neurobio::consp_perception_get_visrange_objects (this, consp_agents, time_step_model)
 Get available conspecific perception objects within the visual range of the agent, which the agent can perceive and therefore respond to. More...
 
elemental logical function the_neurobio::consp_perception_is_seeing_conspecifics (this)
 Check if the agent sees any conspecifics within the visual range. More...
 
elemental subroutine the_neurobio::spatialobj_percept_comp_create (this)
 Create a single arbitrary spatial object perception component at an undefined position with default properties. More...
 
subroutine the_neurobio::spatialobj_percept_make (this, location, size, dist, cid)
 Make a single arbitrary spatial object perception component. More...
 
elemental real(srp) function the_neurobio::spatialobj_percept_get_size (this)
 Get an arbitrary spatial object perception component size. More...
 
elemental real(srp) function the_neurobio::spatialobj_percept_get_dist (this)
 Get the distance to an arbitrary spatial object perception component. More...
 
real(srp) function the_neurobio::spatialobj_percept_visibility_visual_range (this, object_area, contrast, time_step_model)
 Calculate the visibility range of this spatial object. Wrapper to the visual_range function. This function calculates the distance from which this object can be seen by a visual object (e.g. predator or prey). More...
 
elemental subroutine the_neurobio::percept_predator_create_init (this, maximum_number_predators)
 Create predator perception object, it is an array of spatial perception components. More...
 
elemental subroutine the_neurobio::percept_predator_number_seen (this, number_set)
 Set the total number of predators perceived (seen) in the predator perception object. But do not reallocate the predator perception components so far. More...
 
pure subroutine the_neurobio::percept_predator_make_fill_arrays (this, preds, attack_rate)
 Make the predator perception object, fill it with the actual arrays. More...
 
pure subroutine the_neurobio::percept_predator_set_attack_rate_vector (this, attack_rate)
 Set an array of the attack rates for the predator perception object. More...
 
pure subroutine the_neurobio::percept_predator_set_attack_rate_scalar (this, attack_rate)
 Set an array of the attack rates for the predator perception object. More...
 
elemental integer function the_neurobio::percept_predator_get_count_seen (this)
 Get the number (count) of predators seen. Trivial. More...
 
elemental subroutine the_neurobio::percept_predator_destroy_deallocate (this)
 Deallocate and delete a predator perception object. More...
 
subroutine the_neurobio::predator_perception_get_visrange_objects (this, spatl_agents, time_step_model)
 Get available predators perception objects within the visual range of the agent, which the agent can perceive and therefore respond to. More...
 
elemental logical function the_neurobio::predator_perception_is_seeing_predators (this)
 Check if the agent sees any predators within the visual range. More...
 
elemental subroutine the_neurobio::percept_light_create_init (this)
 Make en empty light perception component. Really necessary only when perception objects are all allocatable. More...
 
elemental real(srp) function the_neurobio::percept_light_get_current (this)
 Get the current perception of the illumination. More...
 
subroutine the_neurobio::percept_light_set_current (this, timestep, depth)
 Set the current light level into the perception component. More...
 
elemental subroutine the_neurobio::percept_light_destroy_deallocate (this)
 Destroy / deallocate light perception component. Really necessary only when perception objects are all allocatable. More...
 
subroutine the_neurobio::light_perception_get_object (this, time_step_model)
 Get light perception objects into the individual PERCEPTION object layer. More...
 
elemental subroutine the_neurobio::percept_depth_create_init (this)
 Make en empty depth perception component. Really necessary only when perception objects are all allocatable. More...
 
elemental real(srp) function the_neurobio::percept_depth_get_current (this)
 Get the current perception of the depth. More...
 
subroutine the_neurobio::percept_depth_set_current (this, cdepth)
 Set the current depth level into the perception component. More...
 
elemental subroutine the_neurobio::percept_depth_destroy_deallocate (this)
 Destroy / deallocate depth perception component. Really necessary only when perception objects are all allocatable. More...
 
elemental subroutine the_neurobio::percept_reprfac_create_init (this)
 Make en empty reproductive factor perception component. Really necessary only when perception objects are all allocatable. More...
 
elemental real(srp) function the_neurobio::percept_reprfac_get_current (this)
 Get the current perception of the reproductive factor. More...
 
subroutine the_neurobio::percept_reprfac_set_current (this, reprfac)
 Set the current reproductive factor level into perception component. More...
 
elemental subroutine the_neurobio::percept_reprfac_destroy_deallocate (this)
 Destroy / deallocate reproductive factor perception component. Really necessary only when perception objects are all allocatable. More...
 
subroutine the_neurobio::depth_perception_get_object (this)
 Get depth perception objects into the individual PERCEPTION object layer. More...
 
subroutine the_neurobio::stomach_perception_get_object (this)
 Get the stomach capacity perception objects into the individual PERCEPTION object layer. More...
 
subroutine the_neurobio::bodymass_perception_get_object (this)
 Get the body mass perception objects into the individual PERCEPTION object layer. More...
 
subroutine the_neurobio::energy_perception_get_object (this)
 Get the energy reserves perception objects into the individual PERCEPTION object layer. More...
 
subroutine the_neurobio::age_perception_get_object (this)
 Get the age perception objects into the individual PERCEPTION object layer. More...
 
subroutine the_neurobio::repfac_perception_get_object (this)
 Get the reproductive factor perception objects into the individual PERCEPTION object layer. More...
 
elemental subroutine the_neurobio::percept_memory_add_to_stack (this, light, depth, food, foodsize, fooddist, consp, pred, stom, bdmass, energ, reprfac)
 Add perception components into the memory stack. More...
 
elemental subroutine the_neurobio::percept_memory_cleanup_stack (this)
 Cleanup and destroy the perceptual memory stack. More...
 
elemental integer function the_neurobio::percept_memory_food_get_total (this)
 Get the total number of food items within the whole perceptual memory stack. More...
 
elemental real(srp) function the_neurobio::percept_memory_food_get_mean_n (this, last)
 Get the average number of food items per single time step within the whole perceptual memory stack. More...
 
elemental subroutine the_neurobio::percept_memory_food_mean_n_split (this, window, split_val, older, newer)
 Get the average number of food items per single time step within the perceptual memory stack, split to the first (older) and second (newer) parts. The whole memory stack ('sample') is split by the split_val parameter and two means are calculated: before the split_val and after it. More...
 
elemental real(srp) function the_neurobio::percept_memory_food_get_mean_size (this, last)
 Get the average size of food item per single time step within the whole perceptual memory stack. More...
 
elemental subroutine the_neurobio::percept_memory_food_mean_size_split (this, window, split_val, older, newer)
 Get the average size of food items per single time step within the perceptual memory stack, split to the first (older) and second(newer) parts. The whole memory stack 'sample' is split by the split_val parameter and two means are calculated: before the split_val and after it. More...
 
elemental real(srp) function the_neurobio::percept_memory_food_get_mean_dist (this, last, undef_ret_null)
 Get the average distance to food item per single time step within the whole perceptual memory stack. More...
 
elemental subroutine the_neurobio::percept_memory_food_mean_dist_split (this, window, split_val, older, newer)
 Get the average distance to food items per single time step within the perceptual memory stack, split to the first (older) and second(newer) parts. The whole memory stack 'sample' is split by the split_val parameter and two means are calculated: before the split_val and after it. More...
 
elemental real(srp) function the_neurobio::percept_memory_consp_get_mean_n (this, last)
 Get the average number of conspecifics per single time step within the whole perceptual memory stack. More...
 
elemental integer function the_neurobio::percept_memory_predators_get_total (this)
 Get the total number of predators within the whole perceptual memory stack. More...
 
elemental real(srp) function the_neurobio::percept_memory_predators_get_mean (this, last)
 Get the average number of predators per single time step within the whole perceptual memory stack. More...
 
elemental subroutine the_neurobio::percept_memory_predators_mean_split (this, window, split_val, older, newer)
 Get the average number of predators per single time step within the perceptual memory stack, split to the first (older) and second(newer) parts. The whole memory stack ('sample') is split by the split_val parameter and two means are calculated: before the split_val and after it. More...
 
elemental subroutine the_neurobio::perception_objects_add_memory_stack (this)
 Add the various perception objects to the memory stack object. This procedure is called after all the perceptual components (light, depth food, conspecifics, predators, etc.) are collected (using set object-bound subroutines) into the perception bundle, so all the values are known and ready to be used. More...
 
subroutine the_neurobio::perception_objects_get_all_environmental (this)
 A single umbrella subroutine to get all environmental perceptions: light, depth. This procedure invokes these calls: More...
 
subroutine the_neurobio::perception_objects_get_all_inner (this)
 A single umbrella subroutine wrapper to get all inner perceptions: stomach, body mass, energy, age. Invokes all these procedures: More...
 
elemental subroutine, private the_neurobio::perception_objects_init_agent (this)
 Initialise all the perception objects for the current agent. Do not fill perception objects with the real data yet. More...
 
elemental subroutine the_neurobio::perception_objects_destroy (this, clean_memory)
 Destroy and deallocate all perception objects. More...
 
elemental real(srp) function the_neurobio::perception_predation_risk_objective (this)
 Calculate the risk of predation as being perceived / assessed by this agent. More...
 
elemental real(srp) function the_neurobio::predation_risk_backend (pred_count, pred_memory_mean, weight_direct)
 Simple computational backend for the risk of predation that is used in objective risk function the_neurobio::perception_predation_risk_objective() and the subjective risk function. More...
 
elemental subroutine the_neurobio::perception_components_attention_weights_init (this, all_vals_fix, all_one, weight_light, weight_depth, weight_food_dir, weight_food_mem, weight_conspec, weight_pred_dir, weight_predator, weight_stomach, weight_bodymass, weight_energy, weight_age, weight_reprfac)
 Initialise the attention components of the emotional state to their default parameter values. Attention sets weights to individual perceptual components when the overall weighted sum is calculated. The default weights are parameters defined in COMMONDATA. More...
 
subroutine the_neurobio::perception_components_neuronal_response_init_set (this, this_agent, param_gp_matrix_light, param_gp_matrix_depth, param_gp_matrix_food_dir, param_gp_matrix_food_mem, param_gp_matrix_conspec, param_gp_matrix_pred_dir, param_gp_matrix_predator, param_gp_matrix_stomach, param_gp_matrix_bodymass, param_gp_matrix_energy, param_gp_matrix_age, param_gp_matrix_reprfac, param_gerror_cv_light, param_gerror_cv_depth, param_gerror_cv_food_dir, param_gerror_cv_food_mem, param_gerror_cv_conspec, param_gerror_cv_pred_dir, param_gerror_cv_predator, param_gerror_cv_stomach, param_gerror_cv_bodymass, param_gerror_cv_energy, param_gerror_cv_age, param_gerror_cv_reprfac, param_gene_label_light, param_gene_label_depth, param_gene_label_food_dir, param_gene_label_food_mem, param_gene_label_conspec, param_gene_label_pred_dir, param_gene_label_predator, param_gene_label_stomach, param_gene_label_bodymass, param_gene_label_energy, param_gene_label_age, param_gene_label_reprfac)
 Set and calculate individual perceptual components for this motivational state using the neuronal response function, for this_agent. More...
 
subroutine the_neurobio::perception_components_neuronal_response_calculate (this, this_agent, param_gp_matrix_light, param_gp_matrix_depth, param_gp_matrix_food_dir, param_gp_matrix_food_mem, param_gp_matrix_conspec, param_gp_matrix_pred_dir, param_gp_matrix_predator, param_gp_matrix_stomach, param_gp_matrix_bodymass, param_gp_matrix_energy, param_gp_matrix_age, param_gp_matrix_reprfac, param_gerror_cv_light, param_gerror_cv_depth, param_gerror_cv_food_dir, param_gerror_cv_food_mem, param_gerror_cv_conspec, param_gerror_cv_pred_dir, param_gerror_cv_predator, param_gerror_cv_stomach, param_gerror_cv_bodymass, param_gerror_cv_energy, param_gerror_cv_age, param_gerror_cv_reprfac, perception_override_light, perception_override_depth, perception_override_food_dir, perception_override_food_mem, perception_override_conspec, perception_override_pred_dir, perception_override_predator, perception_override_stomach, perception_override_bodymass, perception_override_energy, perception_override_age, perception_override_reprfac)
 Calculate individual perceptual components for this motivational state using the neuronal response function, for an this_agent. More...
 
elemental real(srp) function the_neurobio::state_motivation_light_get (this)
 Standard "get" function for the state neuronal light effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_depth_get (this)
 Standard "get" function for the state neuronal depth effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_food_dir_get (this)
 Standard "get" function for the state neuronal directly seen food effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_food_mem_get (this)
 Standard "get" function for the state neuronal food items from past memory effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_conspec_get (this)
 Standard "get" function for the state neuronal conspecifics effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_pred_dir_get (this)
 Standard "get" function for the state neuronal direct predation effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_predator_get (this)
 Standard "get" function for the state neuronal predators effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_stomach_get (this)
 Standard "get" function for the state neuronal stomach effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_bodymass_get (this)
 Standard "get" function for the state neuronal body mass effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_energy_get (this)
 Standard "get" function for the state neuronal energy reserves effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_age_get (this)
 Standard "get" function for the state neuronal age effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_reprfac_get (this)
 Standard "get" function for the state neuronal reproductive factor effect component. More...
 
elemental real(srp) function the_neurobio::state_motivation_motivation_prim_get (this)
 Standard "get" function for the root state, get the overall primary motivation value (before modulation). More...
 
elemental real(srp) function the_neurobio::state_motivation_motivation_get (this)
 Standard "get" function for the root state, get the overall final motivation value (after modulation). More...
 
elemental logical function the_neurobio::state_motivation_is_dominant_get (this)
 Check if the root state is the dominant state in GOS. More...
 
elemental character(len=label_length) function the_neurobio::state_motivation_fixed_label_get (this)
 Get the fixed label for this motivational state. Note that the label is fixed and cannot be changed. More...
 
pure subroutine the_neurobio::state_motivation_attention_weights_transfer (this, copy_from)
 Transfer attention weights between two motivation state components. The main use of this subroutine would be to transfer attention from the actor agent's main motivation's attention component to the behaviour's GOS expectancy object. More...
 
elemental real(srp) function the_neurobio::perception_component_maxval (this)
 Calculate the maximum value over all the perceptual components. More...
 
elemental real(srp) function the_neurobio::state_motivation_percept_maxval (this)
 Calculate the maximum value over all the perceptual components of this motivational state component. More...
 
elemental real(srp) function the_neurobio::state_motivation_calculate_prim (this, maxvalue)
 Calculate the level of primary motivation for this specific emotional state component. More...
 
elemental subroutine the_neurobio::perception_component_motivation_init_zero (this)
 Initialise perception components for a motivation state object. More...
 
elemental subroutine the_neurobio::state_hunger_zero (this)
 Init and cleanup hunger motivation object. The only difference from the base root STATE_MOTIVATION_BASE is that it sets unique label. More...
 
elemental subroutine the_neurobio::state_fear_defence_zero (this)
 Init and cleanup fear state motivation object. The only difference from the base root STATE_MOTIVATION_BASE is that it sets unique label. More...
 
elemental subroutine the_neurobio::state_reproduce_zero (this)
 Init and cleanup reproductive motivation object. The only difference from the base root STATE_MOTIVATION_BASE is that it sets unique label. More...
 
elemental subroutine the_neurobio::motivation_init_all_zero (this)
 Init the expectancy components to a zero state. More...
 
elemental subroutine the_neurobio::motivation_reset_gos_indicators (this)
 Reset all GOS indicators for this motivation object. More...
 
elemental real(srp) function the_neurobio::motivation_max_perception_calc (this)
 Calculate maximum value of the perception components across all motivations. More...
 
pure real(srp) function, dimension(:), allocatable the_neurobio::motivation_return_final_as_vector (this)
 Return the vector of final motivation values for all motivational state components. More...
 
elemental real(srp) function the_neurobio::motivation_maximum_value_motivation_finl (this)
 Calculate the maximum value of the final motivations across all motivational state components. More...
 
elemental logical function the_neurobio::motivation_val_is_maximum_value_motivation_finl (this, test_value)
 Checks if the test value is the maximum final motivation value across all motivational state components. More...
 
elemental logical function the_neurobio::motivation_val_is_maximum_value_motivation_finl_o (this, test_motivation)
 Checks if the test value is the maximum final motivation value across all motivational state components. More...
 
elemental subroutine the_neurobio::motivation_primary_sum_components (this, max_val)
 Calculate the primary motivations from motivation-specific perception appraisal components. The primary motivations are motivation values before the modulation takes place. More...
 
elemental subroutine the_neurobio::motivation_modulation_absent (this)
 Produce modulation of the primary motivations, that result in the final motivation values (_finl). In this subroutine, modulation is absent, so the final motivation values are equal to the primary motivations. More...
 
elemental subroutine, private the_neurobio::appraisal_init_zero_cleanup_all (this)
 Initialise and cleanup all appraisal object components and sub-objects. More...
 
elemental subroutine the_neurobio::appraisal_agent_set_dead (this)
 Set the individual to be dead. Note that this function does not deallocate the individual agent object, this may be a separate destructor function. More...
 
subroutine the_neurobio::appraisal_perceptual_comps_motiv_neur_response_calculate (this)
 Get the perceptual components of all motivational states by passing perceptions via the neuronal response function. More...
 
elemental subroutine the_neurobio::appraisal_primary_motivations_calculate (this, rescale_max_motivation)
 Calculate primary motivations from perceptual components of each motivation state. More...
 
subroutine the_neurobio::appraisal_motivation_modulation_non_genetic (this, no_modulation)
 Produce modulation of the primary motivations, that result in the final motivation values (_finl). Modulation here is non-genetic and involves a fixed transformation of the primary motivation values. More...
 
subroutine the_neurobio::appraisal_motivation_modulation_genetic (this, no_genetic_modulation)
 Produce modulation of the primary motivations, that result in the final motivation values (_finl). Modulation involves effects of such characteristics of the agent as body mass and age on the primary motivations (hunger, active and passive avoidance and reproduction) mediated by the genome effects. Here the genome determines the coefficients that set the degree of the influence of the agent's characteristics on the motivations. More...
 
elemental real(srp) function asymptotic (max_level, x)
 Definition of the asymptotic function for converting the primary genotype-based modulation coefficient gamma to the actual additive multiplication value: $ y = \frac{M\cdot x}{1 + x} $, where $ M $ is the asymptotic value (maximum) More...
 
elemental subroutine the_neurobio::appraisal_add_final_motivations_memory (this)
 Add individual final emotional state components into the emotional memory stack. This is a wrapper to the the_neurobio::memory_emotional::add_to_memory method. More...
 
real(srp) function the_neurobio::reproduce_do_probability_reproduction_calc (this, weight_baseline, allow_immature)
 Calculate the instantaneous probability of successful reproduction. More...
 
logical function the_neurobio::reproduction_success_stochast (this, prob)
 Determine a stochastic outcome of this agent reproduction. Returns TRUE if the agent has reproduced successfully. More...
 
elemental subroutine the_neurobio::emotional_memory_add_to_stack (this, v_hunger, v_defence_fear, v_reproduction, v_gos_label, v_gos_arousal, v_gos_repeated)
 Add emotional components into the memory stack. More...
 
elemental subroutine the_neurobio::emotional_memory_add_gos_to_stack (this, v_gos_label, v_gos_arousal, v_gos_repeated)
 Add the current GOS label or/and arousal value and/or arousal repeat count into the emotional memory stack. More...
 
elemental subroutine the_neurobio::emotional_memory_cleanup_stack (this)
 Cleanup and destroy the emotional memory stack. More...
 
elemental real(srp) function the_neurobio::emotional_memory_hunger_get_mean (this, last)
 Get the average value of the hunger motivation state within the whole emotional memory stack. More...
 
elemental real(srp) function the_neurobio::emotional_memory_actve_avoid_get_mean (this, last)
 Get the average value of the fear state motivation state within the whole emotional memory stack. More...
 
elemental real(srp) function the_neurobio::emotional_memory_reproduct_get_mean (this, last)
 Get the average value of the reproductive motivation state within the whole emotional memory stack. More...
 
elemental real(srp) function the_neurobio::emotional_memory_arousal_mean (this, last)
 Get the average value of the GOS arousal within the whole emotional memory stack. More...
 
subroutine the_neurobio::gos_find_global_state (this)
 Find and set the Global Organismic State (GOS) of the agent based on the various available motivation values. The motivation values linked with the different stimuli compete with the current GOS and among themselves. More...
 
pure real(srp) function arousal_decrease_factor_fixed (time_step)
 
real(srp) function arousal_decrease_factor_nonpar (time_step)
 
elemental subroutine, private the_neurobio::gos_init_zero_state (this)
 Initialise GOS engine components to a zero state. The values are set to commondata::missing, commondata::unknown, string to "undefined". More...
 
elemental subroutine the_neurobio::gos_agent_set_dead (this)
 Set the individual to be dead. Note that this function does not deallocate the individual agent object, this may be a separate destructor function. More...
 
elemental subroutine the_neurobio::gos_reset_motivations_non_dominant (this)
 Reset all motivation states as not dominant with respect to the GOS. More...
 
elemental character(len=label_length) function the_neurobio::gos_global_get_label (this)
 Get the current global organismic state (GOS). More...
 
elemental real(srp) function the_neurobio::gos_get_arousal_level (this)
 Get the overall level of arousal. Arousal is the current level of the dominant motivation that has brought about the current GOS at the previous time step. More...
 
subroutine the_neurobio::gos_attention_modulate_weights (this)
 Modulate the attention weights to suppress all perceptions alternative to the current GOS. This is done using the attention modulation interpolation curve. More...
 
elemental integer function the_neurobio::perception_food_items_below_calculate (this)
 Calculate the number of food items in the perception object that are located below the actor agent. More...
 
elemental integer function the_neurobio::perception_food_items_below_horiz_calculate (this, hz_lower, hz_upper)
 Calculate the number of food items in the perception object that are located below the actor agent within a specific vertical horizon [hz_lower,hz_upper]. The horizon limits are relative, in that they start from the depth position of the this actor agent: [z+hz_lower, z+hz_upper]. More...
 
elemental real(srp) function the_neurobio::perception_food_mass_below_calculate (this)
 Calculate the average mass of a food item from all the items in the current perception object that are below the actor agent. More...
 
elemental real(srp) function the_neurobio::perception_food_mass_below_horiz_calculate (this, hz_lower, hz_upper)
 Calculate the average mass of a food item from all the items in the current perception object that are below the actor agent within a specific vertical horizon [hz_lower,hz_upper]. The horizon limits are relative, in that they start from the depth position of the this actor agent: [z+hz_lower, z+hz_upper]. More...
 
elemental integer function the_neurobio::perception_food_items_above_calculate (this)
 Calculate the number of food items in the perception object that are located above the actor agent. More...
 
elemental integer function the_neurobio::perception_food_items_above_horiz_calculate (this, hz_lower, hz_upper)
 Calculate the number of food items in the perception object that are located above the actor agent within a specific vertical horizon [hz_lower,hz_upper]. The horizon limits are relative, in that they start from the depth position of the this actor agent: [z-hz_upper, z-hz_upper]. More...
 
elemental real(srp) function the_neurobio::perception_food_mass_above_calculate (this)
 Calculate the average mass of a food item from all the items in the current perception object that are above the actor agent. More...
 
elemental real(srp) function the_neurobio::perception_food_mass_above_horiz_calculate (this, hz_lower, hz_upper)
 Calculate the average mass of a food item from all the items in the current perception object that are above the actor agent within a specific vertical horizon [hz_lower,hz_upper]. The horizon limits are relative, in that they start from the depth position of the this actor agent: [z-hz_upper, z-hz_upper]. More...
 
elemental integer function the_neurobio::perception_conspecifics_below_calculate (this)
 Calculate the number of conspecifics in the perception object that are located below the actor agent. More...
 
elemental integer function the_neurobio::perception_conspecifics_above_calculate (this)
 Calculate the number of conspecifics in the perception object that are located above the actor agent. More...
 
elemental integer function the_neurobio::perception_conspecifics_below_horiz_calculate (this, hz_lower, hz_upper)
 Calculate the number of conspecifics in the perception object that are located below the actor agent within a specific vertical horizon [hz_lower,hz_upper]. The horizon limits are relative, in that they start from the depth position of the this actor agent: [z+hz_lower, z+hz_upper]. More...
 
elemental integer function the_neurobio::perception_conspecifics_above_horiz_calculate (this, hz_lower, hz_upper)
 Calculate the number of conspecifics in the perception object that are located above the actor agent within a specific vertical horizon [hz_lower,hz_upper]. The horizon limits are relative, in that they start from the depth position of the this actor agent: [z-hz_upper, z-hz_upper]. More...
 
elemental integer function the_neurobio::perception_predator_below_calculate (this)
 Calculate the number of predators in the perception object that are located below the actor agent. More...
 
elemental integer function the_neurobio::perception_predator_above_calculate (this)
 Calculate the number of predators in the perception object that are located above the actor agent. More...
 
elemental integer function the_neurobio::perception_predator_below_horiz_calculate (this, hz_lower, hz_upper)
 Calculate the number of predators in the perception object that are located below the actor agent within a specific vertical horizon [hz_lower,hz_upper]. The horizon limits are relative, in that they start from the depth position of the this actor agent: [z+hz_lower, z+hz_upper]. More...
 
elemental integer function the_neurobio::perception_predator_above_horiz_calculate (this, hz_lower, hz_upper)
 Calculate the number of predators in the perception object that are located above the actor agent within a specific vertical horizon [hz_lower,hz_upper]. The horizon limits are relative, in that they start from the depth position of the this actor agent: [z-hz_upper, z-hz_upper]. More...
 
elemental real(srp) function the_neurobio::perception_food_dist_below_calculate (this)
 Calculate the average distance to all food items in the current perception object that are below the actor agent. More...
 
elemental real(srp) function the_neurobio::perception_food_dist_above_calculate (this)
 Calculate the average distance to all food items in the current perception object that are above the actor agent. More...
 
elemental real(srp) function the_neurobio::perception_consp_dist_below_calculate (this)
 Calculate the average distance to all conspecifics in the current perception object that are below the actor agent. More...
 
elemental real(srp) function the_neurobio::perception_consp_dist_above_calculate (this)
 Calculate the average distance to all conspecifics in the current perception object that are above the actor agent. More...
 
elemental real(srp) function the_neurobio::perception_predator_dist_below_calculate (this)
 Calculate the average distance to all predators in the current perception object that are below the actor agent. More...
 
elemental real(srp) function the_neurobio::perception_predator_dist_above_calculate (this)
 Calculate the average distance to all predators in the current perception object that are above the actor agent. More...
 
real(srp) function the_neurobio::predator_capture_probability_calculate_spatobj (this, this_predator, attack_rate, is_freezing, time_step_model)
 Calculate the probability of attack and capture of the this agent by the predator this_predator. This probability is a function of the distance between the predator and the agent and is calculated by the predator-class-bound procedure the_environment::predator::risk_fish(). Example call: More...
 
real(srp) function the_neurobio::predator_capture_probability_calculate_pred (this, this_predator, is_freezing, time_step_model)
 Calculate the probability of attack and capture of the this agent by the predator this_predator. This probability is a function of the distance between the predator and the agent and is calculated by the predator-class-bound procedure the_environment::predator::risk_fish(). More...
 
real(srp) function the_neurobio::predation_capture_probability_risk_wrapper (this, is_freezing)
 Calculate the overall direct predation risk for the agent, i.e. the probability of attack and capture by the nearest predator. More...
 
elemental real(srp) function the_neurobio::get_prop_size (this)
 Get the body size property of a polymorphic object. The object can be of the following extension of the basic the_environment::spatial class: More...
 
elemental real(srp) function the_neurobio::get_prop_mass (this)
 Get the body mass property of a polymorphic object. The object can be of the following extension of the basic the_environment::spatial class: More...
 

Variables

character(len= *), parameter, private the_neurobio::modname = "(THE_NEUROBIO)"
 

Detailed Description

The Neurobiological and behaviour architecture of the AHA Model.

Author
Sergey Budaev serge.nosp@m.y.bu.nosp@m.daev@.nosp@m.uib..nosp@m.no
Jarl Giske jarl..nosp@m.gisk.nosp@m.e@uib.nosp@m..no
Date
2016-2017

Definition in file m_neuro.f90.

Function/Subroutine Documentation

◆ asymptotic()

elemental real(srp) function appraisal_motivation_modulation_genetic::asymptotic ( real(srp), intent(in)  max_level,
real(srp), intent(in)  x 
)

Definition of the asymptotic function for converting the primary genotype-based modulation coefficient gamma to the actual additive multiplication value: $ y = \frac{M\cdot x}{1 + x} $, where $ M $ is the asymptotic value (maximum)

Note
wxMaxima quick code:
wxplot2d(0.7*x/(1+x), [x, 0, 10]);

Definition at line 6909 of file m_neuro.f90.

Here is the caller graph for this function:

◆ arousal_decrease_factor_fixed()

pure real(srp) function gos_find_global_state::arousal_decrease_factor_fixed ( integer, intent(in), optional  time_step)

Fixed spontaneous arousal dissipation factor

At each step, gos_arousal is reduced by a constant factor, AROUSAL_GOS_DISSIPATION_FACTOR (e.g. reduced by 0.5) independently on the current GOS time step. TODO: make dependent on the genome.

Parameters
[in]time_steptime_step The number of repetitions of the same GOS.
Note
Note that the time_step dummy parameter is not used in calculations here. But it is still present as an optional parameter for compatibility with the other possible dissipation pattern functions that can really depend on the time GOS repeat step.
Returns
Arousal dissipation factor.

At each GOS step the gos_arousal is reduced by the factor AROUSAL_GOS_DISSIPATION_FACTOR that is independent of the time_step.

Definition at line 7711 of file m_neuro.f90.

Here is the caller graph for this function:

◆ arousal_decrease_factor_nonpar()

real(srp) function gos_find_global_state::arousal_decrease_factor_nonpar ( integer, intent(in)  time_step)

Nonparametric spontaneous arousal dissipation pattern

Here the arousal dissipation factor is defined by a function of the GOS repeated time step based on polynomial or linear interpolation over a grid defined by AROUSAL_GOS_DISSIPATION_NONPAR_ABSCISSA (X) and AROUSAL_GOS_DISSIPATION_NONPAR_ORDINATE (Y). For example, multiplied by 0.9 at the first time step, 0.5 at the 10s step, 0.7 at 20s step. TODO: make dependent on the genome.

Parameters
[in]time_stepThe number of repetitions of the same GOS.
Returns
Arousal dissipation factor. In this version, arousal dissipation factor is determined by a nonlinear interpolation-based function.

Save Interpolation plot:
htintrpl.exe [ 1.0, 2.00, 5.00, 10.0, 15.0, 18.0, 20.0 ] \
[ 1.0, 0.98, 0.80, 0.40, 0.22, 0.18, 0.17 ] [2] \
[img_doxygen_dissipate_nonpar.ps]

Interpolation plots can be saved in the debug mode using this plotting command: commondata::debug_interpolate_plot_save().

Warning
Disabling the plot output allows the function to be declared as pure with all the benefits.

Definition at line 7753 of file m_neuro.f90.