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
250
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
KeepRubyWeird 2015: Prepare yourself against Zombie epidemic
Christophe Philemotte
October 26, 2015
More Decks by Christophe Philemotte
See All by Christophe Philemotte
SF Kafka Summit 2019: Cross the Streams Thanks to Kafka and Flink
toch
0
400
Paris.rb 2018: How to onboard junior Developers?
toch
0
420
Enterprise learning can be fun - ConFoo Montréal 2017
toch
0
360
Build a Web API with Hanami (ConFoo Montreal 2017)
toch
1
480
Build a Web API with Hanami
toch
0
5.9k
Build a Cross-Platform Web API CLI in 15 minutes with Mruby-CLI
toch
0
580
Ruby Kaigi 2015: Prepare yourself against Zombie epidemic
toch
0
340
RubyDay 2015: Deep Diving: How to Explore a New Code Base
toch
0
520
RockyMountain 2015: Prepare yourself against Zombie epidemic
toch
0
270
Other Decks in Programming
See All in Programming
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.5k
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
110
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
730
スマートグラスで並列バイブコーディング
hyshu
0
130
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
110
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
190
Inside Stream API
skrb
1
700
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1.2k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
190
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.8k
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
120
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
230
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
67k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
330
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
190
Mobile First: as difficult as doing things right
swwweet
225
10k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
390
Being A Developer After 40
akosma
91
590k
Thoughts on Productivity
jonyablonski
76
5.2k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
250
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