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
230
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
360
Paris.rb 2018: How to onboard junior Developers?
toch
0
390
Enterprise learning can be fun - ConFoo Montréal 2017
toch
0
350
Build a Web API with Hanami (ConFoo Montreal 2017)
toch
1
470
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
560
Ruby Kaigi 2015: Prepare yourself against Zombie epidemic
toch
0
310
RubyDay 2015: Deep Diving: How to Explore a New Code Base
toch
0
500
RockyMountain 2015: Prepare yourself against Zombie epidemic
toch
0
250
Other Decks in Programming
See All in Programming
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
130
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
260
Codex の「自走力」を高める
yorifuji
0
1.2k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
390
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
700
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
540
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
170
Unity6.3 AudioUpdate
cova8bitdots
0
120
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.5k
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.2k
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
390
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
380
Building the Perfect Custom Keyboard
takai
2
710
Faster Mobile Websites
deanohume
310
31k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
670
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
84
How to Talk to Developers About Accessibility
jct
2
150
Six Lessons from altMBA
skipperchong
29
4.2k
KATA
mclloyd
PRO
35
15k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
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