Editing
Agent-Based Modeling
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<div style="background-color: #4B0082; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> {{BloomIntro}} Agent-Based Modeling (ABM) is a powerful computational technique for studying complex systems by simulating the actions and interactions of autonomous individuals (called '''Agents'''). It is a "Bottom-Up" way of doing science. Instead of using a single equation to predict how a whole population will act, we create thousands of "Digital People," give them simple rules, and watch what happens when they interact. ABM allows us to see how a small change in individual behavior can lead to massive "Emergent" shifts in a city, a market, or an ecosystem. It is the closest thing science has to a "Virtual Laboratory." </div> __TOC__ <div style="background-color: #000080; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Remembering</span> == * '''Agent-Based Modeling (ABM)''' β A simulation technique used to understand the behavior of a system by modeling its individual parts. * '''Agent''' β An autonomous entity in a simulation that follows a set of rules (e.g., a Person, a Car, a Bird). * '''Emergence''' β When a complex global behavior arises out of simple local rules (The "Magic" of ABM). * '''Environment''' β The virtual space in which agents move and interact (e.g., a Grid, a Network, or a Map). * '''Bounded Rationality''' β The idea that agents only have limited information and limited brainpower (unlike the "perfect" individuals in classical economics). * '''Local Interaction''' β Agents only react to things immediately around them, not the whole system. * '''Stochasticity''' β The use of "Randomness" in a model to represent the unpredictability of the real world. * '''Monte Carlo Simulation''' β Running the same model thousands of times with different random seeds to see the average outcome. * '''Validation''' β The process of ensuring that the model's output matches real-world data. * '''Emergent Property''' β A macro-level pattern that was not explicitly programmed (e.g., a traffic jam). * '''NetLogo''' β The most popular programming language and platform for building agent-based models. * '''Sensitivity Analysis''' β Testing how much the final result changes when you slightly change one individual rule. </div> <div style="background-color: #006400; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Understanding</span> == ABM is understood through '''Rules''' and '''Aggregation'''. '''1. The 'Three-Step' Loop''': Every agent in every simulation follows a loop: * '''Observe''': What is happening around me? (e.g., "Is there a predator nearby?") * '''Decide''': Based on my rules, what should I do? (e.g., "If yes, run away.") * '''Act''': Change the state or position. (e.g., "Move to coordinate X,Y.") '''2. Complexity from Simplicity''': The power of ABM is that the rules can be very dumb, but the result is very smart. * '''The Boids Model''': To simulate a flock of birds, you don't need a "Leader." You just give every bird three rules: "Don't hit others," "Stay near the group," and "Fly in the same direction." * '''Result''': Perfectly realistic, "swarming" behavior. '''3. Discovering 'Tipping Points'''': ABM is excellent for finding "The Point of No Return." * If 10% of people wear masks, the virus spreads. If 15% wear them, nothing changes. But if 20% wear them, the virus suddenly dies out. ABM helps us find that "Magic Number" (the '''Phase Transition'''). '''The Schelling Model of Segregation''': This is the most famous ABM. Thomas Schelling showed that even if every person is "tolerant" (meaning they are happy as long as 30% of their neighbors are like them), the entire city will still end up 100% segregated. This proved that "Individual Intent" is not the same as "Group Outcome." </div> <div style="background-color: #8B0000; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Applying</span> == '''Modeling 'The Forest Fire' (A Cellular Automaton):''' <syntaxhighlight lang="python"> import random def simulate_fire(grid_size, density): """ Agents: Trees. Rule: 'If neighbor is on fire, I catch fire.' """ # Create a grid of trees (1) or empty (0) grid = [[1 if random.random() < density else 0 for _ in range(grid_size)] for _ in range(grid_size)] # Start a fire at the top row fire = [(0, i) for i in range(grid_size) if grid[0][i] == 1] burnt_count = len(fire) # Simple 'Spread' logic while fire: x, y = fire.pop(0) grid[x][y] = 2 # Burnt # Check 4 neighbors for dx, dy in [(0,1), (0,-1), (1,0), (-1,0)]: nx, ny = x+dx, y+dy if 0 <= nx < grid_size and 0 <= ny < grid_size: if grid[nx][ny] == 1: grid[nx][ny] = 2 fire.append((nx, ny)) burnt_count += 1 return burnt_count / (grid_size * grid_size) # Low Density: 40% trees print(f"Burnt area at 40%: {simulate_fire(20, 0.40) * 100:.1f}%") # High Density: 70% trees print(f"Burnt area at 70%: {simulate_fire(20, 0.70) * 100:.1f}%") # Note: The fire doesn't just grow linearly; it 'explodes' # once the density hits a critical point (~59%). </syntaxhighlight> ; ABM Landmarks : '''Conway's Game of Life''' β A 0-player game where 4 simple rules create infinite patterns, gliders, and even "computers" made of cells. : '''Sugarscape''' β A simulation that proved how inequality and wealth gaps emerge naturally even when everyone starts with the same ability. : '''Epidemiological Models (COVID)''' β Using ABM to simulate every individual in a city to see how "closing schools" vs "wearing masks" affects the hospitals. : '''Financial Market Simulators''' β Trading bots competing against each other to see how "Flash Crashes" happen. </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Analyzing</span> == {| class="wikitable" |+ Equation-Based vs. Agent-Based ! Feature !! Equation-Based (Physics/Calc) !! Agent-Based (ABM) |- | Level || Top-Down (The whole group) || Bottom-Up (The individual) |- | Variation || Everyone is 'Average' || Everyone is 'Unique' |- | Interaction || Aggregate (Mean-Field) || Direct and Local |- | Strength || Very fast / Mathematically pure || Can find 'Surprising' emergence |- | Analogy || A 'Formula' || A 'Video Game' |} '''The Concept of "Verification vs. Validation"''': * '''Verification''': "Did I build the model right?" (Is the code bug-free?). * '''Validation''': "Did I build the right model?" (Does it actually look like a real city?). Analyzing the "Truthfulness" of a simulation is the most difficult part of ABM. </div> <div style="background-color: #483D8B; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Evaluating</span> == Evaluating an ABM: (1) '''Stochasticity''': If you run the model 10 times, do you get 10 completely different answers (too much randomness)? (2) '''Rule Simplicity''': Are the rules based on real psychology or just "guesses"? (3) '''Scaling''': Does the model still work when you go from 100 agents to 1,000,000? (4) '''Equifinality''': Is there more than one way the model could have produced the result? </div> <div style="background-color: #2F4F4F; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> == <span style="color: #FFFFFF;">Creating</span> == Future Frontiers: (1) '''Digital Twins''': Creating a perfect ABM of a real-world city (like Singapore) to test every new law or bridge before it is built. (2) '''Social Media Simulation''': Using 100 million "Bot Agents" to see how fake news spreads and how to stop it. (3) '''AI-Agents''': Replacing simple "If/Then" rules with "Large Language Models" so the agents can actually "talk" and "reason" with each other. (4) '''Multi-Scale ABM''': Modeling a whole country by linking models of cells, people, and weather into one giant system. [[Category:Systems Science]] [[Category:Computer Science]] [[Category:Sociology]] </div>
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:BloomIntro
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information