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
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
3
11k
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
3
5.7k
Pythonに漸進的に型をつける
nealle
1
110
Devoxx BE - Local Development in the AI Era
kdubois
0
130
Six and a half ridiculous things to do with Quarkus
hollycummins
0
210
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
3
940
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
880
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
230
CSC305 Lecture 09
javiergs
PRO
0
300
AI Agent 時代的開發者生存指南
eddie
4
2.1k
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
240
bootcamp2025_バックエンド研修_WebAPIサーバ作成.pdf
geniee_inc
0
120
Featured
See All Featured
Music & Morning Musume
bryan
46
6.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Gamification - CAS2011
davidbonilla
81
5.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
How STYLIGHT went responsive
nonsquared
100
5.8k
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
630
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
115
20k
A better future with KSS
kneath
239
18k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
The Language of Interfaces
destraynor
162
25k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
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