Influence on Voting Ideology

Influence on Voting Ideology preview image

1 collaborator

Default-person John Glass (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 7.0.0-beta0 • Viewed 6 times • Downloaded 1 time • Run 0 times
Download the 'Influence on Voting Ideology' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This model is an agent-based simulation of voting behavior in which individuals (“voters”) change their political orientation over time and decide whether to vote based on a mix of:

  • Media influence (mass communication as a controlling agency)
  • Peer influence (local social reinforcement / conformity pressure)
  • Economic satisfaction (material conditions as a motivating operation)
  • Reinforcement history (past voting increases future voting likelihood)

The model is trying to show how simple local rules—applied repeatedly—can produce population-level outcomes like turnout changes, ideological drift, and polarization (dispersion of beliefs), without assuming perfectly rational voters.


HOW IT WORKS

Agents

Each turtle represents a voter with internal state variables:

  • ideology: continuous value from -1 to +1 (left/progressive to right/conservative)
  • media-exposure: how susceptible the agent is to media influence (0–1)
  • economic-satisfaction: how good the agent feels about conditions (0–1)
  • peer-pressure: the average ideology of nearby agents (computed each tick)
  • vote-probability: computed each tick from motivation + economics + reinforcement
  • voted?: whether the agent voted this tick
  • last-reward: reinforcement value that increases with voting, decays with not voting

Time step (“tick”) rules

Each tick, every agent does:

  1. Perceive media
  • A random “media bias” is generated each tick.
  • The agent’s ideology shifts slightly based on:

    • media-strength
    • the agent’s media-exposure
    • the random media bias
  1. Perceive peers
  • The agent looks at turtles within a radius (currently in-radius 3).
  • It computes average neighbor ideology and shifts toward it using peer-strength.
  1. Compute vote probability
  • Motivation to vote increases with:

    • ideological intensity (abs ideology)
    • economic satisfaction (economic-weight * economic-satisfaction)
    • reinforcement (last-reward)
  • These are averaged into vote-probability.

  1. Decide to vote
  • If vote-probability > turnout-threshold → agent votes.
  • Voting increases reinforcement (last-reward + 0.1).
  • Not voting decreases reinforcement (multiplies by 0.9).
  1. Aggregate outcome
  • “Left votes” = voters with ideology < 0
  • “Right votes” = voters with ideology ≥ 0
  • Sets election-result based on which side has more votes.

HOW TO USE IT

Buttons

  • setup

    • Clears the world and creates 300 voters with random ideology, exposure, and economic satisfaction.
    • Initializes plots/metrics.
  • go (forever)

    • Runs the model continuously, one tick at a time.

Sliders (Interface tab)

All sliders range from 0 to 1.

  • media-strength

    • How strongly media shifts ideology each tick.
    • Higher = faster ideological movement driven by media.
  • peer-strength

    • How strongly local peer ideology shifts an agent’s ideology.
    • Higher = stronger conformity / clustering / echo chamber effects.
  • economic-weight

    • How much economic satisfaction contributes to vote probability.
    • Higher = turnout depends more on economic conditions.
  • turnout-threshold

    • The minimum vote-probability required to vote.
    • Higher = voting is “harder” (higher response cost / barriers / disengagement).

Plots (optional, model runs without them)

Create plots with these exact names to display them:

  • Turnout

    • Plots turnout-rate over time (fraction of voters voting each tick).
  • Ideology

    • Plots mean-ideology over time (average ideological position).
  • Polarization

    • Plots polarization-sd over time (standard deviation of ideology).
  • Ideology Histogram

    • Histogram of ideology values for all agents (distribution snapshot each tick).
  • Voter Ideology Histogram

    • Histogram of ideology values for agents who voted this tick only.

Useful monitors (optional)

Add monitors for:

  • election-result
  • turnout-rate
  • mean-ideology
  • polarization-sd
  • extremes-rate

THINGS TO NOTICE

  • Turnout habit formation: once some agents begin voting, reinforcement can stabilize a voting “habit,” raising turnout even if conditions later worsen.
  • Polarization vs. drift: mean ideology might stay near the center while polarization increases (the population splits into extremes).
  • Peer clustering: with higher peer-strength, you may see stable ideological regions (local consensus pockets).
  • Media-driven volatility: high media-strength can cause ideology to fluctuate or drift rapidly across the population.
  • Voter-only vs population ideology: the voter-only histogram can look very different from the overall population—turnout rules can bias who shows up.

THINGS TO TRY

  1. Peer influence sweep
  • Set media-strength = 0.1, vary peer-strength from 0 → 1.
  • Watch how polarization (SD) and the histograms change.
  1. Media dominance
  • Set peer-strength = 0, increase media-strength.
  • Observe whether ideology becomes more volatile and whether turnout changes indirectly via ideology intensity.
  1. Turnout suppression / barriers
  • Increase turnout-threshold from 0.3 → 0.8.
  • Watch turnout collapse and compare voter-only ideology to the overall ideology distribution.
  1. Economic voting
  • Increase economic-weight to 1.0.
  • Then rerun setup several times—see how turnout becomes tightly tied to economic satisfaction variation.
  1. Polarization without big mean change
  • Try peer-strength = 0.7 and media-strength = 0.2.
  • Watch for two-peaked histograms while mean ideology stays near 0.
  1. Who votes?
  • Keep sliders fixed; run multiple times.
  • Compare the voter-only histogram: do moderates drop out? do extremes dominate? does it flip?

Colors

🐢 What the Turtle Colors Mean

Each turtle’s color represents its current political ideology. The colors update every tick as agents are influenced by media and peers.

Color Mapping

  • 🔵 Blue

    • Ideology < –0.2
    • Interpreted as left / progressive orientation
  • 🔴 Red

    • Ideology > +0.2
    • Interpreted as right / conservative orientation
  • Gray

    • –0.2 ≤ Ideology ≤ +0.2
    • Interpreted as moderate / centrist

Where this is defined in the code


🧠 Why This Matters in the Model

  • Visual polarization: You can see clustering and segregation as similar-colored turtles group together.
  • Dynamic change: Colors change over time, showing ideological movement caused by media and peer influence.
  • Centrist compression or erosion: Watch the gray population grow (moderation) or shrink (polarization).
  • Voter vs. non-voter contrast: Compare turtle colors with the voter-only ideology histogram to see which ideologies actually turn out.

🔍 Things to Try (Color-Focused)

  • Increase peer-strength and watch red/blue clusters stabilize.
  • Increase media-strength and watch colors flicker or drift.
  • Raise turnout-threshold and see whether gray turtles stop voting first.

If you’d like, I can also:

  • Map color intensity to ideological strength (darker = more extreme)
  • Use different shapes for voters vs non-voters
  • Add links showing influence pathways

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; VOTING BEHAVIOR AGENT-BASED MODEL (NETLOGO WEB SAFE)
;; Final consolidated version + ideology histogram + voter-only histogram
;; + ideology distribution plot (Left/Moderate/Right counts)
;;
;; REQUIRED Interface sliders (create in NetLogo Web Interface tab):
;;   media-strength      (min 0 max 1 step 0.01 initial 0.30)
;;   peer-strength       (min 0 max 1 step 0.01 initial 0.40)
;;   economic-weight     (min 0 max 1 step 0.01 initial 0.30)
;;   turnout-threshold   (min 0 max 1 step 0.01 initial 0.50)
;;
;; OPTIONAL Interface plots (create if you want them; model runs without):
;;   "Turnout"
;;   "Ideology"
;;   "Polarization"
;;   "Ideology Histogram"
;;   "Voter Ideology Histogram"
;;   "Ideology Distribution"  <-- NEW: requires 3 pens named "Left", "Moderate", "Right"
;;
;; Buttons:
;;   setup
;;   go (forever)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

globals [
  election-result
  turnout-rate
  mean-ideology
  polarization-sd
  extremes-rate
]

turtles-own [
  ideology              ;; -1 (progressive) to +1 (conservative)
  media-exposure        ;; 0–1
  economic-satisfaction ;; 0–1
  peer-pressure         ;; -1 to +1
  vote-probability      ;; 0–1
  voted?                ;; true / false
  last-reward           ;; reinforcement history
]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SETUP & MAIN LOOP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to setup
  clear-all
  set-default-shape turtles "person"

  ;; Sliders must exist in Interface with exact names above
  validate-slider-ranges

  create-turtles 300 [
    setxy random-xcor random-ycor
    set ideology random-float 2 - 1
    set media-exposure random-float 1
    set economic-satisfaction random-float 1
    set peer-pressure 0
    set vote-probability 0
    set voted? false
    set last-reward 0
    recolor
  ]

  update-voting-plots
  reset-ticks
end 

to go
  ask turtles [
    perceive-media
    perceive-peers
    calculate-vote-probability
    decide-to-vote
    recolor
  ]

  calculate-election
  update-voting-plots
  tick
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SLIDER VALIDATION
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to validate-slider-ranges
  set media-strength max list 0 min list 1 media-strength
  set peer-strength max list 0 min list 1 peer-strength
  set economic-weight max list 0 min list 1 economic-weight
  set turnout-threshold max list 0 min list 1 turnout-threshold
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; BEHAVIORAL PROCESSES
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to perceive-media
  let media-bias random-float 2 - 1
  set ideology ideology + (media-strength * media-exposure * media-bias)
  set ideology max list -1 min list 1 ideology
end 

to perceive-peers
  let local-peers turtles in-radius 3
  if any? local-peers [
    set peer-pressure mean [ideology] of local-peers
    set ideology ideology + (peer-strength * peer-pressure)
  ]
  set ideology max list -1 min list 1 ideology
end 

to calculate-vote-probability
  let ideology-motivation abs ideology
  let economic-effect economic-weight * economic-satisfaction
  let reinforcement last-reward
  set vote-probability (ideology-motivation + economic-effect + reinforcement) / 3
end 

to decide-to-vote
  if vote-probability > turnout-threshold [
    set voted? true
    set last-reward last-reward + 0.1
  ]
  if vote-probability <= turnout-threshold [
    set voted? false
    set last-reward last-reward * 0.9
  ]
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; OUTCOMES
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to calculate-election
  let left-votes count turtles with [voted? and ideology < 0]
  let right-votes count turtles with [voted? and ideology >= 0]

  if left-votes > right-votes [
    set election-result "Progressive Win"
  ]
  if right-votes >= left-votes [
    set election-result "Conservative Win"
  ]
end 

to recolor
  if ideology < -0.2 [ set color blue ]
  if ideology >  0.2 [ set color red ]
  if ideology >= -0.2 and ideology <= 0.2 [ set color gray ]
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; METRICS (REPORTERS)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to-report calc-turnout-rate
  if count turtles = 0 [ report 0 ]
  report count turtles with [voted?] / count turtles
end 

to-report calc-mean-ideology
  if count turtles = 0 [ report 0 ]
  report mean [ideology] of turtles
end 

to-report calc-polarization-sd
  if count turtles < 2 [ report 0 ]
  let m mean [ideology] of turtles
  let v mean [(ideology - m) * (ideology - m)] of turtles
  report sqrt v
end 

to-report calc-extremes-rate
  if count turtles = 0 [ report 0 ]
  report count turtles with [abs ideology > 0.7] / count turtles
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PLOT SAFETY CHECK (NETLOGO WEB)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to-report plot-exists? [plot-label]
  let ok? true
  carefully [
    set-current-plot plot-label
  ] [
    set ok? false
  ]
  report ok?
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; HISTOGRAMS (NETLOGO WEB SAFE)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to update-ideology-histogram
  if plot-exists? "Ideology Histogram" [
    set-current-plot "Ideology Histogram"
    clear-plot
    set-histogram-num-bars 20
    histogram [ideology] of turtles
  ]
end 

to update-voter-ideology-histogram
  if plot-exists? "Voter Ideology Histogram" [
    set-current-plot "Voter Ideology Histogram"
    clear-plot
    set-histogram-num-bars 20

    ;; Only those who voted this tick
    if any? turtles with [voted?] [
      histogram [ideology] of turtles with [voted?]
    ]
  ]
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; IDEOLOGY DISTRIBUTION PLOT (LEFT / MODERATE / RIGHT COUNTS)
;; Requires plot "Ideology Distribution" with pens: "Left", "Moderate", "Right"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to update-ideology-distribution
  if plot-exists? "Ideology Distribution" [
    set-current-plot "Ideology Distribution"
    
    ;; Left (progressive): ideology < -0.2
    set-current-plot-pen "Left"
    plot count turtles with [ideology < -0.2]
    
    ;; Moderate (centrist): -0.2 <= ideology <= 0.2
    set-current-plot-pen "Moderate"
    plot count turtles with [ideology >= -0.2 and ideology <= 0.2]
    
    ;; Right (conservative): ideology > 0.2
    set-current-plot-pen "Right"
    plot count turtles with [ideology > 0.2]
  ]
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PLOTS (WEB SAFE — DEFAULT PENS ONLY)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to update-voting-plots
  set turnout-rate calc-turnout-rate
  set mean-ideology calc-mean-ideology
  set polarization-sd calc-polarization-sd
  set extremes-rate calc-extremes-rate

  if plot-exists? "Turnout" [
    set-current-plot "Turnout"
    plot turnout-rate
  ]

  if plot-exists? "Ideology" [
    set-current-plot "Ideology"
    plot mean-ideology
  ]

  if plot-exists? "Polarization" [
    set-current-plot "Polarization"
    plot polarization-sd
  ]

  update-ideology-histogram
  update-voter-ideology-histogram
  update-ideology-distribution  ;; <-- NEW: call the distribution plot updater
end 

There is only one version of this model, created 2 days ago by John Glass.

Attached files

File Type Description Last updated
Influence on Voting Ideology.png preview Preview for 'Influence on Voting Ideology' 2 days ago, by John Glass Download

This model does not have any ancestors.

This model does not have any descendants.