Exploring Cultural Dissemination based on Agent-Based Modeling

Dec 17, 2023·
Junhong Liu
Junhong Liu
· 5 min read

Introduction

The spread of culture is somewhat similar to the spread of infectious diseases, so Susceptible–Infected–Susceptible (SIS) model is used to simulate the cultural dissemination. Besides, Agent-Based Modeling (ABM) is also used in this experiment, which is a kind of computer simulation. besides, basic reproduction number ($R_0$) is used to measure the infectivity of pathogens. When $R_0 < 1$, it means the infectious diseases will gradually disappear on their own. When $R_0 > 1$, which means the number of infections will continue to increase (https://ccdd.hsph.harvard.edu/ncov-mandarin-chinese-translation/). In this experiment, infectors are used to represent culture transmitters, the susceptible is used to represent public, and the immunized is used to represent culture resister. I will explore the relationship between the proportion of culture resisters and $R_0$.

Method

The agents will be devided to three types: the susceptible, the infected and the immunized. The infected agent will “infect” surrounding (the degree of a node is 8) susceptible and immunized agents with a certain probability. Then the infected agent will be marked as the susceptible. In this case, the immunized agents will become to the susceptible agents after they get infected. (https://meltingasphalt.com/interactive/going-critical/)

In this experiment, the grid size is $100 \times 100$. I set the immunity of the immunized agents is $100\%$, i.e. $r = 1$. The initial number of infected agents accounted for $1\%$ of the total agent, i.e. $p_{inf} = 0.01$. In order to simplify the model, the morbidity rate $m$ is used instead of $R_0$, where $m = R_0 / 8$. At here, I set $R_0 = 2$, i.e. when a culture transmitter is able to evenly spread culture to two others, to study what is the critical threshold of this model. The critical threshold means culture will not spread if the percentage of culture resisters exceeds this critical threshold, vice versa. Thus, I set the percentage of immunized agents ($p_{imm}$) as 0.4, 0.5 and 0.6 respectively. For susceptible agents, the probability of infection is $m$. For immunized agents, the probability of infection is $m \times (1-r)$.

Results

$p_{imm} = 0.4$ $p_{imm} = 0.5$ $p_{imm} = 0.6$
1
2
3

Additionally, I set $r = 0.95$ when $p_{imm} = 0.6$, below shows the result.

$r = 0.95$ & $p_{imm} = 0.6$
4

Discussion

According to the results, we can see when $p_{imm} = 0.4$, the number of infected agents is increasing; when $p_{imm} = 0.5$, the number of infected agents fluctuates; when $p_{imm} = 0.6$, the number of infected agents is decreasing. Thus the critical threshold seems to be 0.5. It means when more than half of the population in an area resists a culture, it is usually difficult for that culture to spread in that area.

Meanwhile, my supplementary experiment shows that people’s sense of identity with a culture has an important impact on cultural transmission. If a cultural Resistor has a possibility to accept foreign cultures, even if the probability is very small, it will greatly promote the spread of foreign cultures in the region. From this perspective, the spread of culture seems unstoppable.

Source Code

% call the main function
runSchelling(100, 0.5, 1, 0.01, 0.25);


function runSchelling(gridSize, immunized_rate, immunity, infected_rate, infection_rate)
%% runSchelling(gridSize, immunized_rate, immunity, infected_rate, infection_rate)
%
% gridSize: The size of grid, which is gridSize by gridSize.
% immunized_rate: The proportion of the population that is immune to the virus.
% immunity: The immunity of the immunized.
% infected_rate: The proportion of the population that has been infected with the virus.
% infection_rate: The virus infection rate.

% the number of iterations
N_ITERATIONS = 100;

% creat a agent grid (population), the size is "gridSize" by "gridSize"
agentGrid = zeros(gridSize);
[m,n] = find(agentGrid == 0);

% Initialize the distribution of the immunized.
immunized = round(immunized_rate * gridSize * gridSize); % num of  the immunized
for igroup=1:immunized
    x = length(m);
    r = randi(x,1);
    agentGrid(m(r), n(r)) = 1;
    m(r) = [];
    n(r) = [];
end

% Initialize the distribution of agents in the infected
infected = round(infected_rate * gridSize * gridSize); % num of  the infected

if length(m) <= infected
    error('no more space left to place agents');
end

for y=1:infected
    x = length(m);
    r = randi(x,1);
    agentGrid(m(r), n(r)) = -1;
    m(r) = [];
    n(r) = [];
end

%% store the results in all iterations
seg = nan(N_ITERATIONS,1);

for time=1:N_ITERATIONS
    % store the results
    seg(time) = size(find(agentGrid == -1),1);
    subplot(1,2,1);
    imshow(agentGrid, [], 'InitialMagnification','fit');
    title("Data Visualization");
    subplot(1,2,2); plot(seg); xlabel('Time'); ylabel('The number of infected');title("Trend")

    % calculate whether the agents become the infected
    [yLoc, xLoc] = find(agentGrid == -1);
    nAgent = length(yLoc);

    for iAgent=1:nAgent
        y = yLoc(iAgent); x = xLoc(iAgent);
        for iMove=-1:1
            for p=-1:1
                if ~((iMove == 0) && (p == 0))
                    ik = y+iMove;
                    jp = x+p;
                    if (ik>=1 && ik <= gridSize) && (jp>=1 && jp <= gridSize)

                        % calculate the result for susceptible agents
                        if (agentGrid(ik, jp) == 0) && (rand(1,1) <= infection_rate)
                            agentGrid(ik, jp) = -1;
                            % calculate the result for immunized agents
                        elseif (agentGrid(ik, jp) == 1) && (rand(1,1) <= (infection_rate * (1-immunity)))
                            agentGrid(ik, jp) = -1;
                        end

                    end
                end
            end
        end
    end

    % calculate the result for infected agents theirselves
    for iAgent=1:nAgent
        y = yLoc(iAgent); x = xLoc(iAgent);
        if rand(1,1) > infection_rate
            agentGrid(y, x) = 0;
        end
    end

end

end