Cellular automata that mimics reality
dev.to·3d·
Discuss: DEV
🔲Cellular Automata
Preview
Report Post
There are many things that cellular automatas have many uses but for this post I will detail now as I said in one of my other blog posts titled "..." is to model populations. I will be talking about modeling human populations.
As humans if we are alive, we need to have at the very least 1 companion, it's just our nature. But some people are also introverted or extroverted so there could be an rng value from 3 to 9 to mimic this. This is what that would look like:
If ((item (I) of (Grid#)) = 1)
If (n ( > 0 ) and ( n < rnd(3 to 9)))
add 1 to (Grid)
else
add 0 to (Grid)
else
If (n = 2)
add 1 to (Grid)
else
add 0 to (Grid)
This will give semi interesting results but eventually it just collapses into a fixed state. The next one interests me more because of the fact that It mimics slime mold...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help