lc_social_events (faber_neuroevolution v1.2.4)
View SourceBehavioral event constructors for Social Silo.
Events related to reputation, coalitions, and social networks. Social Silo operates at timescale τ=25.
Summary
Types
-type individual_id() :: binary().
-type population_id() :: binary().
-type social_event() :: #reputation_changed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, individual_id :: individual_id(), population_id :: population_id(), reputation_before :: float(), reputation_after :: float(), change_cause :: cooperation | defection | achievement | punishment, witnesses :: [individual_id()]} | #coalition_formed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, coalition_id :: binary(), founder_ids :: [individual_id()], population_id :: population_id(), formation_reason :: defense | resource | breeding, initial_strength :: float()} | #coalition_dissolved{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, coalition_id :: binary(), population_id :: population_id(), dissolution_reason :: success | failure | conflict | attrition, duration_generations :: non_neg_integer(), final_members :: [individual_id()]} | #coalition_member_joined{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, coalition_id :: binary(), individual_id :: individual_id(), membership_type :: full | associate | candidate, coalition_size_after :: non_neg_integer()} | #coalition_member_expelled{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, coalition_id :: binary(), individual_id :: individual_id(), expulsion_reason :: defection | underperformance | conflict, coalition_size_after :: non_neg_integer()} | #mentoring_started{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, mentor_id :: individual_id(), mentee_id :: individual_id(), mentoring_type :: skill | strategy | general, expected_duration :: non_neg_integer() | indefinite} | #mentoring_ended{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, mentor_id :: individual_id(), mentee_id :: individual_id(), outcome :: success | failure | interrupted, duration_generations :: non_neg_integer(), mentee_improvement :: float()} | #social_network_updated{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, population_id :: population_id(), connections_added :: non_neg_integer(), connections_removed :: non_neg_integer(), network_density :: float(), clustering_coefficient :: float()} | #trust_established{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, individual_a_id :: individual_id(), individual_b_id :: individual_id(), trust_level :: float(), trust_basis :: cooperation | kinship | reputation} | #betrayal_detected{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, betrayer_id :: individual_id(), victim_id :: individual_id(), betrayal_type :: defection | deception | abandonment, trust_before :: float(), trust_after :: float()}.
-type timestamp() :: integer().
Functions
-spec betrayal_detected(map()) -> #betrayal_detected{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, betrayer_id :: individual_id(), victim_id :: individual_id(), betrayal_type :: defection | deception | abandonment, trust_before :: float(), trust_after :: float()}.
-spec coalition_dissolved(map()) -> #coalition_dissolved{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, coalition_id :: binary(), population_id :: population_id(), dissolution_reason :: success | failure | conflict | attrition, duration_generations :: non_neg_integer(), final_members :: [individual_id()]}.
-spec coalition_formed(map()) -> #coalition_formed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, coalition_id :: binary(), founder_ids :: [individual_id()], population_id :: population_id(), formation_reason :: defense | resource | breeding, initial_strength :: float()}.
-spec coalition_member_expelled(map()) -> #coalition_member_expelled{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, coalition_id :: binary(), individual_id :: individual_id(), expulsion_reason :: defection | underperformance | conflict, coalition_size_after :: non_neg_integer()}.
-spec coalition_member_joined(map()) -> #coalition_member_joined{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, coalition_id :: binary(), individual_id :: individual_id(), membership_type :: full | associate | candidate, coalition_size_after :: non_neg_integer()}.
-spec event_to_map(social_event()) -> map().
-spec mentoring_ended(map()) -> #mentoring_ended{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, mentor_id :: individual_id(), mentee_id :: individual_id(), outcome :: success | failure | interrupted, duration_generations :: non_neg_integer(), mentee_improvement :: float()}.
-spec mentoring_started(map()) -> #mentoring_started{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, mentor_id :: individual_id(), mentee_id :: individual_id(), mentoring_type :: skill | strategy | general, expected_duration :: non_neg_integer() | indefinite}.
-spec reputation_changed(map()) -> #reputation_changed{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, individual_id :: individual_id(), population_id :: population_id(), reputation_before :: float(), reputation_after :: float(), change_cause :: cooperation | defection | achievement | punishment, witnesses :: [individual_id()]}.
-spec trust_established(map()) -> #trust_established{meta :: #lc_event_meta{event_id :: binary(), correlation_id :: binary() | undefined, causation_id :: binary() | undefined, timestamp :: timestamp(), version :: pos_integer(), emitter :: atom()}, individual_a_id :: individual_id(), individual_b_id :: individual_id(), trust_level :: float(), trust_basis :: cooperation | kinship | reputation}.
social_network_updated(Data)