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
330
Paris.rb 2018: How to onboard junior Developers?
toch
0
370
Enterprise learning can be fun - ConFoo Montréal 2017
toch
0
330
Build a Web API with Hanami (ConFoo Montreal 2017)
toch
1
450
Build a Web API with Hanami
toch
0
5.8k
Build a Cross-Platform Web API CLI in 15 minutes with Mruby-CLI
toch
0
540
Ruby Kaigi 2015: Prepare yourself against Zombie epidemic
toch
0
290
RubyDay 2015: Deep Diving: How to Explore a New Code Base
toch
0
440
RockyMountain 2015: Prepare yourself against Zombie epidemic
toch
0
230
Other Decks in Programming
See All in Programming
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
3
250
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
2.4k
Testing Trophyは叫ばない
toms74209200
0
890
概念モデル→論理モデルで気をつけていること
sunnyone
3
300
プロパティベーステストによるUIテスト: LLMによるプロパティ定義生成でエッジケースを捉える
tetta_pdnt
0
3.3k
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
320
Namespace and Its Future
tagomoris
6
710
Deep Dive into Kotlin Flow
jmatsu
1
360
請來的 AI Agent 同事們在寫程式時,怎麼用 pytest 去除各種幻想與盲點
keitheis
0
130
Swift Updates - Learn Languages 2025
koher
2
510
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
480
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
520
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
We Have a Design System, Now What?
morganepeng
53
7.8k
Thoughts on Productivity
jonyablonski
70
4.8k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
4 Signs Your Business is Dying
shpigford
184
22k
Rails Girls Zürich Keynote
gr2m
95
14k
Making Projects Easy
brettharned
117
6.4k
Done Done
chrislema
185
16k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
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