Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
KeepRubyWeird 2015: Prepare yourself against Zo...
Search
Christophe Philemotte
October 26, 2015
Programming
0
200
KeepRubyWeird 2015: Prepare yourself against Zombie epidemic
Christophe Philemotte
October 26, 2015
Tweet
Share
More Decks by Christophe Philemotte
See All by Christophe Philemotte
SF Kafka Summit 2019: Cross the Streams Thanks to Kafka and Flink
toch
0
320
Paris.rb 2018: How to onboard junior Developers?
toch
0
350
Enterprise learning can be fun - ConFoo Montréal 2017
toch
0
310
Build a Web API with Hanami (ConFoo Montreal 2017)
toch
1
430
Build a Web API with Hanami
toch
0
5.7k
Build a Cross-Platform Web API CLI in 15 minutes with Mruby-CLI
toch
0
510
Ruby Kaigi 2015: Prepare yourself against Zombie epidemic
toch
0
270
RubyDay 2015: Deep Diving: How to Explore a New Code Base
toch
0
390
RockyMountain 2015: Prepare yourself against Zombie epidemic
toch
0
210
Other Decks in Programming
See All in Programming
英語 × の私が、生成AIの力を借りて、OSSに初コントリビュートした話
personabb
0
190
コンテナでLambdaをデプロイするときに知っておきたかったこと
_takahash
0
180
フロントエンドテストの育て方
quramy
11
2.9k
地域ITコミュニティの活性化とAWSに移行してみた話
yuukis
0
230
「”誤った使い方をすることが困難”な設計」で良いコードの基礎を固めよう / phpcon-odawara-2025
taniguhey
0
120
「影響が少ない」を自分の目でみてみる
o0h
PRO
2
990
Django for Data Science (Boston Python Meetup, March 2025)
wsvincent
0
320
マルチアカウント環境での、そこまでがんばらない RI/SP 運用設計
wa6sn
0
710
Making TCPSocket.new "Happy"!
coe401_
1
130
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
730
Defying Front-End Inertia: Inertia.js on Rails
skryukov
0
460
List とは何か? / PHPerKaigi 2025
meihei3
0
720
Featured
See All Featured
A designer walks into a library…
pauljervisheath
205
24k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.5k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.6k
It's Worth the Effort
3n
184
28k
Optimising Largest Contentful Paint
csswizardry
36
3.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.1k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
9
740
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Transcript
Benjamin Lehman, ©2011
Benjamin Lehman, ©2011 Prepare yourself against Zombie epidemic
Agent Based Model
None
None
None
None
None
Agent Based Model
Map National Geographics, ©2011
map = Map.new(4, 4)
point = Point.new point_north = Point.new point.neighborhood[:north] = point_north point_north.neighborhood[:south]
= point # ...
John DellAngelo, ©2013 Agent
agent = Agent.new(age, start_point, stm)
agent.perceive # => {}
agent.act # => :walk agent.walk(:east)
None
agent.age # => 1
agent.commit # => #<ZombieEpidemic::State:... # @name=:susceptible, ...
State
state = State.new(:susceptible) state.define_possible_actions( ->(agent) { [:walk, :stay, :fight].sample }
)
state.decide_action_for(agent) # => :walk
infected = State.new(:susceptible) state.add_transition( infected, ->(state, agent) { true }
)
state.trigger_transition(agent) # => #<ZombieEpidemic::State:... # @name=:infected, ...
None
State Transition Machine
stm = StateTransitionMachine.new # create states: # - susceptible #
- infected # - zombie # - dead # create transitions # set default initial state
Simulation Loop
steps = 100 agents = create_the_agents steps.times do agents.each do
|agent| agent.act; agent.age end agents.each { |agent| agent.commit } remove_the_deads(agents) end
steps = 100 agents = create_the_agents steps.times do agents.each do
|agent| agent.act; agent.age end agents.each { |agent| agent.commit } remove_the_deads(agents) end
steps = 100 agents = create_the_agents steps.times do agents.each do
|agent| agent.act; agent.age end agents.each { |agent| agent.commit } remove_the_deads(agents) end
steps = 100 agents = create_the_agents steps.times do agents.each do
|agent| agent.act; agent.age end agents.each { |agent| agent.commit } remove_the_deads(agents) end
steps = 100 agents = create_the_agents steps.times do agents.each do
|agent| agent.act; agent.age end agents.each { |agent| agent.commit } remove_the_deads(agents) end
steps = 100 agents = create_the_agents steps.times do agents.each do
|agent| agent.act; agent.age end agents.each { |agent| agent.commit } remove_the_deads(agents) end
steps = 100 agents = create_the_agents steps.times do agents.each do
|agent| agent.act; agent.age end agents.each { |agent| agent.commit } remove_the_deads(agents) end
steps = 100 agents = create_the_agents steps.times do agents.each do
|agent| agent.act; agent.age end agents.each { |agent| agent.commit } remove_the_deads(agents) end
steps = 100 agents = create_the_agents steps.times do agents.each do
|agent| agent.act; agent.age end agents.each { |agent| agent.commit } remove_the_deads(agents) end
None
None
Validation & Calibration
# validation # == # functional test
None
None
# Calibration # f(x, y, z, ?) = a
Simulate & Prepare yourself
Live Demo
None
Outro
? toch _toch toch/zombie_epidemic