Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
KeepRubyWeird 2015: Prepare yourself against Zo...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Christophe Philemotte
October 26, 2015
Programming
290
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
Transcript
49 slides
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
More Decks by Christophe Philemotte
See All by Christophe Philemotte
SF Kafka Summit 2019: Cross the Streams Thanks to Kafka and Flink
toch
0
440
Paris.rb 2018: How to onboard junior Developers?
toch
0
450
Enterprise learning can be fun - ConFoo Montréal 2017
toch
0
400
Build a Web API with Hanami (ConFoo Montreal 2017)
toch
1
510
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
610
Ruby Kaigi 2015: Prepare yourself against Zombie epidemic
toch
0
370
RubyDay 2015: Deep Diving: How to Explore a New Code Base
toch
0
550
RockyMountain 2015: Prepare yourself against Zombie epidemic
toch
0
310
Other Decks in Programming
See All in Programming
AIエージェントの「テストは通るのに本番で壊れる」を減らす
shibuiwilliam
3
130
Skills Are the New npm [AAIF Bengaluru, Nov 2026]
shivamsaraswat
0
140
はじめてのKubernetesコントリビューション
nasa9084
0
330
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
160
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
470
Claude Codeのおかげでやりたいことがやれるようになったんだよォー!
sms_tech
0
190
Distance field of Julia set
kinakomoti321
0
330
SODA - FACT BOOK(EN)
sodainc
1
300
Jujutsu で毎日のバージョン管理に「安心」と「直感性」を
oukayuka
0
120
Promiseの向こう側へコンテキストを届ける ― proposal-async-context
seriseri
0
850
テスト駆動開発から学ぶ 達人プログラマーの型 / TechRAMEN 2026 Conference
a_okui
0
3.2k
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
620
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
710
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
250
Building the Perfect Custom Keyboard
takai
2
970
New Earth Scene 8
popppiees
5
2.9k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
340
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
Optimizing for Happiness
mojombo
378
72k
Crafting Experiences
bethany
1
460
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
380