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
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
300
RubyDay 2015: Deep Diving: How to Explore a New Code Base
toch
0
450
RockyMountain 2015: Prepare yourself against Zombie epidemic
toch
0
230
Other Decks in Programming
See All in Programming
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
110
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
190
Cursorハンズオン実践!
eltociear
2
1.2k
ドメイン駆動設計のエッセンス
masuda220
PRO
2
280
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
8.7k
なぜGoのジェネリクスはこの形なのか? - Featherweight Goが明かす設計の核心
qualiarts
0
260
Migration to Signals, Resource API, and NgRx Signal Store
manfredsteyer
PRO
0
120
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
380
理論と実務のギャップを超える
eycjur
0
180
AI Agent 時代的開發者生存指南
eddie
4
2.1k
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
140
技術的負債の正体を知って向き合う
irof
0
260
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Music & Morning Musume
bryan
46
6.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
The World Runs on Bad Software
bkeepers
PRO
72
11k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
GraphQLとの向き合い方2022年版
quramy
49
14k
Documentation Writing (for coders)
carmenintech
75
5.1k
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