Experiment 20241210-BROD

Experiment design

Date: 2025-01-14

Designer: Hiro KATAOKA (University of Tsukuba)

Hypotheses: Figure 4 in Sasahara et al. (2020, doi: 10.1007/s42001-020-00084-7) can be produced with interactions between beliefs only

100 agents; 1 runs; 500 games

Variables

fixed variables: WORKFLOW TOPIC ATOM EPSILON PACTIVE PREWRITE NBITERATIONS NBAGENTS NBRUNS ALPHA MU REWRITE PREHOC

controled variables: DELTAS SEEDS INITS VALUES

dependent variables: mdb ngb anb

Values

DELTAS: 1 2 3 4 5 6 7
SEEDS: 15596 61362 11884 22766 45114
INITS: 1439 19602 578
VALUES: a b

Measures

Before verifing each hypotheses, we define the measures needed to check them. Let $A$ be the set of agents.

mdb (Maximal Distance between Beliefs)

This measure shows the maximal distance between beliefs: $$ \max_{a,a'\in A}d(B_a,B_{a'}) $$ where $d$ is the Hamming distance between the sets of models $m$: $$ d(B,B')=|\{m;m\models B\oplus m\models B\}|, $$ with $\oplus$ as the exclusive or.

Intuitively, the more mdb is, the more polarized agents' beliefs are.

ngb (Number of Groups based on Beliefs)

This measure shows the number of groups of agents based on opinions.

The $i$-th group $G_i$ is a nonempty subset of $A$ such that $G_i\cap G_j=\emptyset$ if $i\neq j$. Each $G_i$ can be defined as the maximal subset of $A$ such that all members share the same beliefs, i.e., $$ \forall i,\forall a,a'\in G_i,B_a\equiv B_{a'}. $$ Or equivalently, this measure can be calculated by $|\{B_a;a\in A\}|$.

Intuitively, the more ngb is, the more polarized agents' beliefs are.

anb (Average number of Neighbors over Beliefs-based groups)

This measure shows the average number of neighbors in another communities. Let $G_1,\ldots,G_n$ be the groups based on beliefs. Let $E(\subseteq A\times A)$ be the set of edges in the network agents form. Then, this measure is defined as follows: $$ \frac{1}{n}|\{(a,a')\in E; \exists ij.a\in G_i,a'\in G_j,i\neq j\}|. $$

Intuitively, the less anb is, the more segregated the network is.

Experiment

Date: 2025-01-14

Performer: Hiro KATAOKA (University of Tsukuba)

The whole experiment, from scratch, can be executed through:

In principle, this could be generated from command line through:

# only once, not checked in
$ bash utils/clone.sh 

# depends on ${HASH}, if it does not change, no need to recompile
# to compile a further version use 'last' as argument
$ bash utils/compile.sh

# generate the templates
$ bash utils/genTemplate.sh

# Perform experiments
$ bash script.sh

# The analysis is done through jupyter
$ jupyter notebook &
# Do not forget to trust the notebook

# Before commiting the notebook
$ nb-clean -e notebook.ipynb

# suppresses results and experiments
$ bash utils/cleanup.sh

# bash utils/anonymize.sh

Parameter file: params.sh

Executed command (script.sh):

#!/bin/bash

. params.sh

set -u
mkdir -p ${RESDIR}

# run

date > ${RESDIR}/log.txt

for init in ${INITS}
do
for delta in ${DELTAS}
do
for seed in ${SEEDS}
do
for value in ${VALUES}
do
EXP=${init}-${delta}-${seed}-${value}
mkdir -p ${RESDIR}/${EXP}

echo ${EXP}
${SIMDIR}/soba --seed ${seed} --dir "${RESDIR}/${EXP}" --nbAgent ${NBAGENTS} \
    --tick ${NBITERATIONS} --atoms ${ATOM} --update ${WORKFLOW} \
    --prehoc "${PREHOC}" --mu "${MU}" --alpha "${ALPHA}" --rewrite ${REWRITE} \
    --pUnfollow "${PREWRITE}" --pActive "${PACTIVE}" --epsilon "${EPSILON}"  \
	--delta ${delta} \
    --network """`cat ${TEMPLATEDIR}/graph-${init}.json`""" \
    --beliefs """`cat ${TEMPLATEDIR}/beliefs-${init}.json`""" \
    --opinions """`cat ${TEMPLATEDIR}/opinions-${init}.json`""" \
    --values """`cat ${TEMPLATEDIR}/val-${value}.json`""" \
    --topics "${TOPIC}"
done
done
done
done

date >> ${RESDIR}/log.txt

# analyse

Hardware: AMD EPYC 7302P, Memory 128GB

OS: Ubuntu 22.04.5 LTS x86_64

Nim version: 2.2.0

Simulator version: 747763f895c41497a0f7066177762ba2d7cb93ff

Duration and Output

  • Duration: 15 minutes
  • Output: 299 MB

Raw results

results/
  log.txt
results/1439-1-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-1-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-1-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-1-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-1-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-1-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-1-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-1-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-1-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-1-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-2-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-2-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-2-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-2-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-2-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-2-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-2-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-2-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-2-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-2-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-3-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-3-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-3-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-3-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-3-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-3-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-3-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-3-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-3-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-3-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-4-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-4-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-4-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-4-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-4-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-4-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-4-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-4-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-4-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-4-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-5-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-5-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-5-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-5-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-5-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-5-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-5-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-5-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-5-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-5-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-6-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-6-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-6-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-6-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-6-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-6-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-6-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-6-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-6-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-6-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-7-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-7-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-7-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-7-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-7-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-7-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-7-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-7-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-7-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/1439-7-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-1-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-1-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-1-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-1-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-1-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-1-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-1-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-1-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-1-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-1-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-2-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-2-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-2-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-2-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-2-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-2-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-2-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-2-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-2-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-2-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-3-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-3-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-3-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-3-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-3-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-3-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-3-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-3-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-3-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-3-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-4-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-4-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-4-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-4-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-4-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-4-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-4-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-4-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-4-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-4-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-5-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-5-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-5-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-5-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-5-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-5-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-5-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-5-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-5-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-5-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-6-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-6-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-6-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-6-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-6-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-6-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-6-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-6-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-6-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-6-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-7-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-7-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-7-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-7-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-7-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-7-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-7-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-7-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-7-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/19602-7-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-1-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-1-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-1-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-1-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-1-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-1-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-1-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-1-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-1-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-1-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-2-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-2-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-2-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-2-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-2-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-2-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-2-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-2-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-2-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-2-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-3-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-3-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-3-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-3-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-3-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-3-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-3-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-3-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-3-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-3-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-4-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-4-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-4-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-4-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-4-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-4-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-4-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-4-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-4-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-4-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-5-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-5-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-5-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-5-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-5-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-5-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-5-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-5-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-5-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-5-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-6-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-6-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-6-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-6-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-6-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-6-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-6-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-6-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-6-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-6-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-7-11884-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-7-11884-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-7-15596-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-7-15596-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-7-22766-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-7-22766-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-7-45114-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-7-45114-b/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-7-61362-a/
  grhist.csv
  belhist.csv
  ophist0.csv
results/578-7-61362-b/
  grhist.csv
  belhist.csv
  ophist0.csv

Analysis

Before showing plots, we read all of the data and calculate the measures.

Out[13]:
init delta seed value mdb ngb anb
1439-1-15596-a 1439 1 15596 a 8 30 4.666667
1439-1-15596-b 1439 1 15596 b 8 25 5.32
1439-1-61362-a 1439 1 61362 a 8 26 4.461538
1439-1-61362-b 1439 1 61362 b 8 23 5.695652
1439-1-11884-a 1439 1 11884 a 8 24 4.583333
... ... ... ... ... ... ... ...
578-7-11884-b 578 7 11884 b 0 1 0.0
578-7-22766-a 578 7 22766 a 0 1 0.0
578-7-22766-b 578 7 22766 b 0 1 0.0
578-7-45114-a 578 7 45114 a 0 1 0.0
578-7-45114-b 578 7 45114 b 0 1 0.0

210 rows × 7 columns

We will use $0.01$ as the significance threshold.

Producing Figure 4a in Sasahara et al. with beliefs

We first try to produce Figure 4a in Sasahara et al. (2020) with beliefs (that is, the plots where the $x$-axis shows $\delta$ and $y$-axis shows the 'belief version' measures (e.g., maximal distance between beliefs instead of opinions))

No description has been provided for this image

The larger $\delta$ is, the less mdb is. Thus, this figure corresponds to the figure (especially Figure 4a) in Sasahara et al.

Since $B_0$ depends on values, we can see the difference between $V_a$ and $V_b$:

No description has been provided for this image

They show the same tendency.

Statistical tests

mdb from experiments with $V_a$ and it from experiments with $V_b$ follow a normal distribution according to the Shapiro-Wilk test.

For $V_a$:

Out[24]:
ShapiroResult(statistic=0.7739752531051636, pvalue=2.0552018420438856e-11)

and for $V_b$:

Out[25]:
ShapiroResult(statistic=0.7765446305274963, pvalue=2.43901548263592e-11)

Each follow the normal distributions. Thus we can perform paird $t$ test to see whether changing values has significant effect on mdb.

Out[26]:
TtestResult(statistic=1.6442616684994291, pvalue=0.1031417803292338, df=104)

The $p$-value is larger than 0.01. Thus, we cannot conclude that changing values has such effects.

Similar analysis is performed compare mdb from experiments with same $\delta$ and same values.

/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:1879: UserWarning: Input data for shapiro has range zero. The results may not be accurate.
  warnings.warn("Input data for shapiro has range zero. The results "
Out[27]:
V1 V2
1 True True
2 False True
3 False False
4 True True
5 True True
6 True False
7 False False

From the table above, mdb follows a normal distribution if $\delta\in\{1,4,5\}$. Otherwise, it does not.

Thus, we apply the paired $t$-test for $\delta\in\{1,4,5\}$ and the Wilcoxon signed-rank test otherwise.

/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4088: UserWarning: Exact p-value calculation does not work if there are zeros. Switching to normal approximation.
  warnings.warn("Exact p-value calculation does not work if there are "
/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4102: UserWarning: Sample size too small for normal approximation.
  warnings.warn("Sample size too small for normal approximation.")
Out[28]:
p-val significance?
1 0.007693 True
2 0.140146 False
3 0.706358 False
4 0.138401 False
5 0.178959 False
6 0.179712 False
7 None False

The table above shows the results. There are significant difference between two values if and only if $\delta=1$.

Using always the Wilcoxon signed-rank cannot change the conclusion as displayed below:

/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4088: UserWarning: Exact p-value calculation does not work if there are zeros. Switching to normal approximation.
  warnings.warn("Exact p-value calculation does not work if there are "
/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4102: UserWarning: Sample size too small for normal approximation.
  warnings.warn("Sample size too small for normal approximation.")
Out[29]:
p-val significance?
1 0.001526 True
2 0.140146 False
3 0.706358 False
4 0.187622 False
5 0.071192 False
6 0.179712 False
7 None False

Producing Figure 4b in Sasahara et al. with Beliefs

Next, we try to produce the 'belief version' of the Figure 4b in Sasahara et al., i.e., the relation between $\delta$ and ngb.

No description has been provided for this image

The same tendency with the figure in Sasahara et al. can be observed.

Out[31]:
ngb
min mean median max
delta
1 21 24.066667 24.0 30
2 5 8.666667 9.0 12
3 1 3.633333 4.0 6
4 1 2.3 2.0 4
5 1 1.466667 1.0 3
6 1 1.1 1.0 3
7 1 1.0 1.0 1

The table above shows that $\delta=4$ yields $2.3$ groups on average.

No description has been provided for this image

This result does not depend on values on average.

Statistical tests

We perform the statistical tests following the same protocol as above to see whether changing values has an effect on ngb.

For $V_a$, the result of the Shapiro-Wilk test is:

Out[33]:
ShapiroResult(statistic=0.656313955783844, pvalue=2.4944798424119188e-14)

For $V_b$:

Out[34]:
ShapiroResult(statistic=0.6645212173461914, pvalue=3.7603292468756447e-14)

Both of ngb from experiments which share $V_a$ and $V_b$ follow normal distributions. Thus we can perform the paired $t$-test.

Out[35]:
TtestResult(statistic=1.1255315836117867, pvalue=0.2629545695977573, df=104)

But the $p$-value is larger than the significance level, we cannot conclude that changing value has an effect.

Same analysis is performed but each data are compared $\delta$-wise.

/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:1879: UserWarning: Input data for shapiro has range zero. The results may not be accurate.
  warnings.warn("Input data for shapiro has range zero. The results "
Out[36]:
V1 V2
1 False False
2 False False
3 False False
4 False False
5 True True
6 True False
7 False False

The table above shows whether the measure ngb from the experiments which share the same $\delta$ and the same values follows a normal distribution. From this table, when $\delta\in\{1,4,5\}$, they follow normal distributions; otherwise they do not.

/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4088: UserWarning: Exact p-value calculation does not work if there are zeros. Switching to normal approximation.
  warnings.warn("Exact p-value calculation does not work if there are "
/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4102: UserWarning: Sample size too small for normal approximation.
  warnings.warn("Sample size too small for normal approximation.")
Out[37]:
p-val significance?
1 0.007693 True
2 0.140146 False
3 0.706358 False
4 0.138401 False
5 0.178959 False
6 0.179712 False
7 None False

The results from the statistical tests are the same as before. If we apply the Wilcoxon signed-rank test for all comparisons, this does not change the results:

/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4088: UserWarning: Exact p-value calculation does not work if there are zeros. Switching to normal approximation.
  warnings.warn("Exact p-value calculation does not work if there are "
/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4102: UserWarning: Sample size too small for normal approximation.
  warnings.warn("Sample size too small for normal approximation.")
Out[38]:
p-val significance?
1 0.001526 True
2 0.140146 False
3 0.706358 False
4 0.187622 False
5 0.071192 False
6 0.179712 False
7 None False

Network Segregation

Finally, we see whether the network has been segregated or not.

No description has been provided for this image
No description has been provided for this image

But unfortunately the larger $\delta$ is the smaller anb is... In other words, we cannot observe the V-shaped plot as we observe in 20241209-BROD.

This is beacuse agents are on the way to converge to single group. In the plots below, each circles correspond to each agents and the same colors show the same beliefs corresponding agents have.

1439-1-15596-a

No description has been provided for this image

1439-2-15596-a

No description has been provided for this image

1439-3-15596-a

No description has been provided for this image

1439-4-15596-a

No description has been provided for this image

1439-5-15596-a

No description has been provided for this image

1439-6-15596-a

No description has been provided for this image

1439-7-15596-a

No description has been provided for this image

We can draw the same plot with $V_b$:

1439-1-15596-b

No description has been provided for this image

1439-2-15596-b

No description has been provided for this image

1439-3-15596-b

No description has been provided for this image

1439-4-15596-b

No description has been provided for this image

1439-5-15596-b

No description has been provided for this image

1439-6-15596-b

No description has been provided for this image

1439-7-15596-b

No description has been provided for this image

The following networks are taken from the experiments which uses $\delta=4$.

1439-4-15596-a

No description has been provided for this image

1439-4-15596-b

No description has been provided for this image

1439-4-61362-a

No description has been provided for this image

1439-4-61362-b

No description has been provided for this image

1439-4-11884-a

No description has been provided for this image

1439-4-11884-b

No description has been provided for this image

1439-4-22766-a

No description has been provided for this image

1439-4-22766-b

No description has been provided for this image

1439-4-45114-a

No description has been provided for this image

1439-4-45114-b

No description has been provided for this image

19602-4-15596-a

No description has been provided for this image

19602-4-15596-b

No description has been provided for this image

19602-4-61362-a

No description has been provided for this image

19602-4-61362-b

No description has been provided for this image

19602-4-11884-a

No description has been provided for this image

19602-4-11884-b

No description has been provided for this image

19602-4-22766-a

No description has been provided for this image

19602-4-22766-b

No description has been provided for this image

19602-4-45114-a

No description has been provided for this image

19602-4-45114-b

No description has been provided for this image

578-4-15596-a

No description has been provided for this image

578-4-15596-b

No description has been provided for this image

578-4-61362-a

No description has been provided for this image

578-4-61362-b

No description has been provided for this image

578-4-11884-a

No description has been provided for this image

578-4-11884-b

No description has been provided for this image

578-4-22766-a

No description has been provided for this image

578-4-22766-b

No description has been provided for this image

578-4-45114-a

No description has been provided for this image

578-4-45114-b

No description has been provided for this image

The plots above show that we cannot observe network segregation ($\delta=1$ may be the exception but the network has not separated completely.).

Following plots show the same plots but data from experiments which end with a single community are excluded.

No description has been provided for this image
No description has been provided for this image

Excluding the data from experiments which end with the single community shows the similar effect.

Statistical tests

To see whether changing values has the significant effect on anb, we perform statistical tests. With the Shapiro-Wilk test, anb from $V_a$ and $V_b$ follow the normal distribution.

For $V_a$:

Out[47]:
ShapiroResult(statistic=0.8741397261619568, pvalue=5.860937335455674e-08)

and for $V_b$:

Out[48]:
ShapiroResult(statistic=0.8237373232841492, pvalue=7.381622535440613e-10)

Thus we perform paird $t$ tests

Out[49]:
TtestResult(statistic=-0.5110272953642753, pvalue=0.6104151008871217, df=104)

The $p$-value is larger than the significance level (0.01). Thus, we cannot conclude that it has the effect.

Similar analysis is performed for each experiments which share the same $\delta$.

/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:1879: UserWarning: Input data for shapiro has range zero. The results may not be accurate.
  warnings.warn("Input data for shapiro has range zero. The results "
Out[50]:
V1 V2
1 False False
2 False False
3 False False
4 False False
5 True True
6 True False
7 False False

The table above shows that anb follows a normal distribution if and only if $\delta=5$. Thus, we perform the paired $t$ test for $\delta=5$ and the Wilcoxon Signed-Rank test for other data.

/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4088: UserWarning: Exact p-value calculation does not work if there are zeros. Switching to normal approximation.
  warnings.warn("Exact p-value calculation does not work if there are "
/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4102: UserWarning: Sample size too small for normal approximation.
  warnings.warn("Sample size too small for normal approximation.")
Out[51]:
p-val significance?
1 0.001526 True
2 0.140146 False
3 0.706358 False
4 0.187622 False
5 0.178959 False
6 0.179712 False
7 None False

The table below shows the results if we apply the Wilcoxon Signed-Rank test for all experiments.

/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4088: UserWarning: Exact p-value calculation does not work if there are zeros. Switching to normal approximation.
  warnings.warn("Exact p-value calculation does not work if there are "
/Users/azumabashi/.anyenv/envs/pyenv/versions/3.12.0/lib/python3.12/site-packages/scipy/stats/_morestats.py:4102: UserWarning: Sample size too small for normal approximation.
  warnings.warn("Sample size too small for normal approximation.")
Out[52]:
p-val significance?
1 0.001526 True
2 0.140146 False
3 0.706358 False
4 0.187622 False
5 0.071192 False
6 0.179712 False
7 None False

Thus, changing values has the significant effect if and only if $\delta=1$, which is the case when agents cannot interact enough.

Conclusion

We could produce the 'belief version' of the Figure 4 in Sasahara et al. (2020).

This file can be retrieved from URL https://sake.re/20241210-BROD