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
220
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
340
Paris.rb 2018: How to onboard junior Developers?
toch
0
380
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
300
RubyDay 2015: Deep Diving: How to Explore a New Code Base
toch
0
460
RockyMountain 2015: Prepare yourself against Zombie epidemic
toch
0
230
Other Decks in Programming
See All in Programming
TypeScript 5.9で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
110
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
2
2.1k
Private APIの呼び出し方
kishikawakatsumi
3
890
GeistFabrik and AI-augmented software development
adewale
PRO
0
110
JJUG CCC 2025 Fall: Virtual Thread Deep Dive
ternbusty
3
460
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
730
予防に勝る防御なし(2025年版) - 堅牢なコードを導く様々な設計のヒント / Growing Reliable Code PHP Conference Fukuoka 2025
twada
PRO
39
13k
モビリティSaaSにおけるデータ利活用の発展
nealle
0
540
Flutterチームから作る組織の越境文化
findy_eventslides
0
500
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
2
5.1k
アーキテクチャと考える迷子にならない開発者テスト
irof
9
3.2k
スタートアップを支える技術戦略と組織づくり
pospome
7
7k
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Designing for humans not robots
tammielis
254
26k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Into the Great Unknown - MozCon
thekraken
40
2.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Documentation Writing (for coders)
carmenintech
76
5.1k
Six Lessons from altMBA
skipperchong
29
4.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
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