Sugarscape
My implementation of Epstein and Axtell's large scale agent-based computational model, the Sugarscape, to explore the role of social phenomenon such as seasonal migrations, pollution, sexual reproduction, combat, and transmission of disease and even culture.
Install / Use
/learn @langerv/SugarscapeREADME
sugarscape
My implementation in Python of Epstein and Axtell's large scale agent-based computational model, the Sugarscape, to explore the role of social phenomenon such as seasonal migrations, pollution, sexual reproduction, combat, and transmission of disease and even culture.
In other words: Cellular Automata + Agents = Sugarscape.
Results
Evolution from random distribution under rules ({environment}, {agents}) = ({G1}, {M}):

Emergent diagonal waves of migration under rules ({G1}, {M}):

Seasonal migration and Hibernation resulting from rules ({S[1,8,50]}, {M}) and random distribution of agents:

Societal evolution through crossover of Genetic Attributes in Sexual Reproduction under rules ({G1}, {M, S}) coloring by agent vision:

Cultural transmission by tag-flipping under rules ({G1}, {M, K}) coloring by tribes:

Combat between two tribbes under rules ({G1}, {Cinf}), with various outcomes: a) coexistence between Blue and Red b) Red dominance c) Blue dominance:


Trench war and front line between two tribes fighting under rules ({G1}, {C2, R[60, 100]}) coloring by tribes:

Combat eliminates waves under rules ({G1}, {C2}):

Combat and Cultural Transmission under rules ({G1}, {Cinf,K}):

A realization of the Proto-History under rules ({G1}, {M,S,K}) and random distribution of agents, showing: migration, spatial segregation, mating, cultural transmission and finally tribes interaction such as collisions, penetrations, and conversions producing complex social histories :

Instructions
Install Python 2.6 and above: https://www.python.org.
Install Pygame 1.9 package: http://www.pygame.org.
On command schell, execute: python sugarscape.py.
Edit sugarscape.py and uncomment settings for the wanted simulation, run again.
Available controls during simulation:
- [F1] : show current agents population.
- [F2] : show current agents whealth histogram.
- [F3] : show current agents metabolism and vision mean values.
- [F12] : start / pause / resume simulation.
Todo
- Trading rules.
- Diseases.
Reference
- Schelling, Thomas C. (1978). Micromotives and Macrobehavior, Norton.
- Epstein, Joshua M.; Axtell, Robert L. (1996). Growing Artificial Societies: Social Science From the Bottom Up, MIT/Brookings Institution.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
