Commit 556a1ba2 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

Added "state/psychology/cognition/GroupMembership.java"

parent 46c443a6
Pipeline #203849 passed with stages
in 119 minutes and 35 seconds
...@@ -47,11 +47,15 @@ public class ThreatCognitionModel implements ICognitionModel { ...@@ -47,11 +47,15 @@ public class ThreatCognitionModel implements ICognitionModel {
} else { } else {
// TODO: Imitate behavior if recognizing an in-group member. // TODO: Imitate behavior if recognizing an in-group member.
// Maybe, use also cooperative behavior from "CooperativeCognitionModel". // Maybe, use also cooperative behavior from "CooperativeCognitionModel".
// TODO: A pedestrian needs boolean variable "isInGroup" or another enum
// "Member { IN_GROUP, OUT_GROUP, OUT_GROUP_FRIENDLY, OUT_GROUP_NEUTRAL_ OUT_GROUP_HOSTILE }"
// if (pedestrian.getPerceivedThreat() != null) => These peds perceived a threat!
// else checkIfSearchRadiusContainsAThreatedPed
pedestrian.setSelfCategory(SelfCategory.TARGET_ORIENTED); pedestrian.setSelfCategory(SelfCategory.TARGET_ORIENTED);
} }
} else { } else {
throw new IllegalArgumentException("Use only \"Bang\" and \"ElapsedTime\" stimuli!"); throw new IllegalArgumentException("Can only process \"Bang\" and \"ElapsedTime\" stimuli!");
} }
} }
} }
......
package org.vadere.state.psychology.cognition;
/**
* According to the self-categorization theory ("reicher-2010"), people define
* themselves as member of social categories (see{@link SelfCategory}). When
* people share the same {@link SelfCategory}, they often act collectively
* if they feel as in-group member to this category.
*
* For instance, two protesters - which define themselves as in-group members
* of the category protesters - walk together during a demonstration.
*
* This enum shall capture this in- and out-group membership. The membership
* can be interpreted as a tree:
*
* <pre>
* Membership
* /\
* / \
* / \
* In Out
* / | \
* / | \
* / | \
* Friendly Neutral Hostile
* </pre>
*
* Following outcome may be observed when two people with a given membership
* come together:
* <ul>
* <li>IN_GROUP / IN_GROUP => imitate behavior</li>
* <li>IN_GROUP / OUT_GROUP_FRIENDLY => imitate behavior</li>
* <li>IN_GROUP / OUT_GROUP_NEUTRAL => ignore behavior of IN_GROUP member</li>
* <li>IN_GROUP / OUT_GROUP_HOSTILE => react hostile to IN_GROUP member</li>
* </ul>
*
* Note: The value "OUT_GROUP" exists for convenience if you do not like to handle
* the subcategories FRIENDLY, NEUTRAL and HOSTILE. "OUT_GROUP" should be handled
* like "OUT_GROUP_NEUTRAL". I.e., IN_GROUP / OUT_GROUP => ignore behavior of
* IN_GROUP member.
*/
public enum GroupMembership {
IN_GROUP,
OUT_GROUP,
OUT_GROUP_FRIENDLY,
OUT_GROUP_NEUTRAL,
OUT_GROUP_HOSTILE
}
...@@ -4,9 +4,9 @@ package org.vadere.state.psychology.cognition; ...@@ -4,9 +4,9 @@ package org.vadere.state.psychology.cognition;
* According to the self-categorization theory ("reicher-2010"), people define * According to the self-categorization theory ("reicher-2010"), people define
* themselves as member of a social category. Often, people act collectively * themselves as member of a social category. Often, people act collectively
* when being in the same category. E.g., protesters - which define themselves * when being in the same category. E.g., protesters - which define themselves
* as protesers - walk together during a demonstration. * as protesters - walk together during a demonstration.
* *
* Our agents can use these categorizations to to derive a specific behavior. * Our agents can use these categorizations to derive a specific behavior.
* E.g., if an agents is "COOPERATIVE", the pedestrian swaps places * E.g., if an agents is "COOPERATIVE", the pedestrian swaps places
* with other "COOPERATIVE" pedestrians. * with other "COOPERATIVE" pedestrians.
* *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment