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
210
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
360
Enterprise learning can be fun - ConFoo Montréal 2017
toch
0
320
Build a Web API with Hanami (ConFoo Montreal 2017)
toch
1
440
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
530
Ruby Kaigi 2015: Prepare yourself against Zombie epidemic
toch
0
280
RubyDay 2015: Deep Diving: How to Explore a New Code Base
toch
0
420
RockyMountain 2015: Prepare yourself against Zombie epidemic
toch
0
220
Other Decks in Programming
See All in Programming
Is Xcode slowly dying out in 2025?
uetyo
1
240
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
240
Quand Symfony, ApiPlatform, OpenAI et LangChain s'allient pour exploiter vos PDF : de la théorie à la production…
ahmedbhs123
0
120
エラーって何種類あるの?
kajitack
5
330
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
690
PipeCDのプラグイン化で目指すところ
warashi
1
230
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
150
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
850
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
0
490
GraphRAGの仕組みまるわかり
tosuri13
8
520
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
240
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
260
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Navigating Team Friction
lara
187
15k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Fireside Chat
paigeccino
37
3.5k
BBQ
matthewcrist
89
9.7k
Adopting Sorbet at Scale
ufuk
77
9.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Being A Developer After 40
akosma
90
590k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
53k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
680
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