This example walks through a simulation showing how personality traits - specifically trust propensity - influence behavioral decisions. We will create two entities with different dispositions and observe how the same relationship context produces different trust outcomes.
The Scenario
We want to model two people, Alice and Bob, who have different baseline tendencies to trust others. Alice is naturally trusting (high trust propensity), while Bob is more cautious (moderate trust propensity). Both meet a new colleague, Carol, and we want to compute their willingness to trust her in different domains.
Step 1: Create the Entities
First, we create Alice with a high trust propensity of 0.8 on a 0-1 scale. This represents someone who generally assumes good intentions and gives others the benefit of the doubt.
// Create Alice with high trust propensity
let alice = EntityBuilder::new("alice", Species::Human)
.with_age(32)
.with_hexaco(Hexaco {
honesty_humility: 0.7,
emotionality: 0.5,
extraversion: 0.6,
agreeableness: 0.8, // High agreeableness correlates with trust
conscientiousness: 0.6,
openness: 0.7,
})
.with_trust_propensity(0.8) // High baseline trust
.build();
Now we create Bob with a more moderate trust propensity of 0.5. This represents someone who is neither particularly trusting nor distrusting - they wait for evidence before extending trust.
// Create Bob with moderate trust propensity
let bob = EntityBuilder::new("bob", Species::Human)
.with_age(45)
.with_hexaco(Hexaco {
honesty_humility: 0.6,
emotionality: 0.4,
extraversion: 0.4,
agreeableness: 0.5, // Moderate agreeableness
conscientiousness: 0.7,
openness: 0.5,
})
.with_trust_propensity(0.5) // Moderate baseline trust
.build();
Step 2: Create the Target and Add to Simulation
Carol is the person both Alice and Bob will be evaluating for trustworthiness.
// Create Carol (the person being evaluated)
let carol = EntityBuilder::new("carol", Species::Human)
.with_age(28)
.with_hexaco(Hexaco {
honesty_humility: 0.65,
emotionality: 0.5,
extraversion: 0.7,
agreeableness: 0.6,
conscientiousness: 0.75,
openness: 0.6,
})
.build();
// Add all entities to the simulation
let mut sim = Simulation::new();
let anchor = Timestamp::from_date(2024, 1, 1);
sim.add_entity(alice, anchor);
sim.add_entity(bob, anchor);
sim.add_entity(carol, anchor);
Step 3: Establish Relationships
We create relationships between Alice-Carol and Bob-Carol. These are new relationships with no history, so trust starts at the baseline level influenced by trust propensity.
// Establish relationships
let alice_carol = RelationshipBuilder::new("alice", "carol")
.with_type(RelationshipType::Colleague)
.with_context(Context::Work)
.build();
let bob_carol = RelationshipBuilder::new("bob", "carol")
.with_type(RelationshipType::Colleague)
.with_context(Context::Work)
.build();
sim.add_relationship(alice_carol, anchor);
sim.add_relationship(bob_carol, anchor);
Step 4: Query Initial Trust
Before any interactions occur, let us query how much Alice and Bob trust Carol. Remember, trust is decomposed into three components following Mayer's model: Ability, Benevolence, and Integrity.
// Query Alice's initial trust in Carol
let alice_handle = sim.query_entity("alice");
let alice_trust = alice_handle.trust_toward("carol", Timestamp::from_date(2024, 1, 15));
println!("Alice's initial trust in Carol:");
println!(" Ability: {:.2}", alice_trust.ability); // 0.56
println!(" Benevolence: {:.2}", alice_trust.benevolence); // 0.58
println!(" Integrity: {:.2}", alice_trust.integrity); // 0.57
// Query Bob's initial trust in Carol
let bob_handle = sim.query_entity("bob");
let bob_trust = bob_handle.trust_toward("carol", Timestamp::from_date(2024, 1, 15));
println!("Bob's initial trust in Carol:");
println!(" Ability: {:.2}", bob_trust.ability); // 0.42
println!(" Benevolence: {:.2}", bob_trust.benevolence); // 0.40
println!(" Integrity: {:.2}", bob_trust.integrity); // 0.41
Why the Difference?
Notice that Alice's trust values are higher than Bob's across all three dimensions. This is because:
- Alice's high trust propensity (0.8) raises her baseline assumptions about others
- Bob's moderate trust propensity (0.5) produces neutral starting assumptions
- Neither has evidence about Carol yet, so propensity dominates
This matches psychological reality: some people start from a position of trust, others from skepticism.
Step 5: Compute Trust Decisions
Now we simulate a concrete decision: Would Alice and Bob be willing to delegate an important project to Carol?
// Define a trust decision scenario
let delegation_decision = TrustDecision {
domain: TrustDomain::Professional,
stakes: Stakes::High, // Important project
reversibility: Reversibility::Moderate, // Can course-correct if needed
evidence_available: Evidence::Low, // New colleague, limited info
};
// Compute willingness to trust
let alice_willingness = alice_handle.willingness_to_trust(
"carol",
&delegation_decision,
Timestamp::from_date(2024, 1, 15)
);
let bob_willingness = bob_handle.willingness_to_trust(
"carol",
&delegation_decision,
Timestamp::from_date(2024, 1, 15)
);
println!("Willingness to delegate project to Carol:");
println!(" Alice: {:.2}", alice_willingness); // 0.62 - willing, with some hesitation
println!(" Bob: {:.2}", bob_willingness); // 0.38 - hesitant, would want more info
Interpreting the Results
Alice's willingness of 0.62 suggests she would likely delegate the project, though she would appreciate some safeguards. Her high trust propensity allows her to take this calculated risk.
Bob's willingness of 0.38 suggests he would be reluctant to delegate without more information. His moderate trust propensity, combined with high stakes and low evidence, produces caution.
Step 6: How Trust Evolves
Now let us add an event: Carol successfully completes a smaller task, demonstrating competence.
// Carol demonstrates ability
let demonstration = EventBuilder::new(EventType::CompetenceDemonstration)
.with_actor("carol")
.with_observers(vec!["alice", "bob"])
.with_domain(TrustDomain::Professional)
.with_quality(0.7) // Good but not exceptional
.build();
sim.add_event(demonstration, Timestamp::from_date(2024, 2, 1));
// Query updated trust
let alice_trust_updated = alice_handle.trust_toward("carol", Timestamp::from_date(2024, 2, 15));
let bob_trust_updated = bob_handle.trust_toward("carol", Timestamp::from_date(2024, 2, 15));
println!("After competence demonstration:");
println!("Alice's trust - Ability: {:.2}", alice_trust_updated.ability); // 0.68
println!("Bob's trust - Ability: {:.2}", bob_trust_updated.ability); // 0.58
Both Alice and Bob update their Ability assessments based on evidence. But notice the difference in magnitude:
- Alice moved from 0.56 to 0.68 (+0.12)
- Bob moved from 0.42 to 0.58 (+0.16)
Bob's larger update reflects that he was further from where the evidence points. Evidence has more room to move a skeptic than someone who already believed.
What This Example Demonstrates
Personality Shapes Initial Conditions
Trust propensity creates different starting points for the same relationship. This is why first impressions vary so much between people.
Trust Is Multidimensional
Following Mayer's model, we track Ability, Benevolence, and Integrity separately. Carol might be trusted for competence but not yet for having good intentions.
Context Matters
The same trust levels produce different decisions depending on stakes, reversibility, and available evidence. Trust is always evaluated in context.
Evidence Updates Beliefs
When Carol demonstrates competence, both Alice and Bob update their assessments. The system models belief updating, not just static traits.
Try It Yourself
Experiment with different scenarios:
- What if Carol makes a mistake? How does trust recover over time?
- What if Alice and Bob have different relationship contexts with Carol (friend vs. colleague)?
- How do high-stakes vs. low-stakes decisions change willingness to trust?
The Behavioral Pathways library lets you explore these questions computationally.