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
350
Paris.rb 2018: How to onboard junior Developers?
toch
0
390
Enterprise learning can be fun - ConFoo Montréal 2017
toch
0
340
Build a Web API with Hanami (ConFoo Montreal 2017)
toch
1
460
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
550
Ruby Kaigi 2015: Prepare yourself against Zombie epidemic
toch
0
300
RubyDay 2015: Deep Diving: How to Explore a New Code Base
toch
0
490
RockyMountain 2015: Prepare yourself against Zombie epidemic
toch
0
240
Other Decks in Programming
See All in Programming
CSC307 Lecture 07
javiergs
PRO
0
530
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
270
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
170
Data-Centric Kaggle
isax1015
2
730
ゆくKotlin くるRust
exoego
1
220
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.7k
Grafana:建立系統全知視角的捷徑
blueswen
0
310
AI時代の認知負荷との向き合い方
optfit
0
110
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
610
AIエージェントの設計で注意するべきポイント6選
har1101
7
3.3k
ThorVG Viewer In VS Code
nors
0
760
CSC307 Lecture 03
javiergs
PRO
1
490
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Mind Mapping
helmedeiros
PRO
0
64
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
48
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
280
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
First, design no harm
axbom
PRO
2
1.1k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
GraphQLとの向き合い方2022年版
quramy
50
14k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
66
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
310
How to train your dragon (web standard)
notwaldorf
97
6.5k
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