Dungeons, Dragons and Functions
summary
Models D&D Fifth Edition rules (the 316-page PHB plus 300+ page Monster and DM books — ~1,000+ pages of spec) in F# using discriminated unions, records and pattern matching; implements a dice-expression DSL and overloads to write rolls like “4d6+2”. Outputs to the browser via Fable + Elmish, producing an ugly but working combat simulator that runs automated trials (goblins lose to wolves most runs). Project takes months not weeks and plans to use reinforcement learning to learn better creature strategies.
AI-written summary · about
chapters (40)
- 0:00Intro
- 0:45What do you do
- 1:07Story
- 2:07Who is Mathias
- 4:05Agenda
- 5:06Agency
- 5:53Dungeons Dragons
- 6:47Rules
- 7:16Books
- 7:50Roleplay
- 9:42Domain Modeling
- 10:42Abilities
- 11:00Discrimination Union
- 11:27Ability Score
- 11:40Record
- 12:04Pattern Matching
- 12:48Modifiers
- 14:04Algebraic Data Types
- 16:24Parallelization
- 17:41Ranged
- 20:12Nesting Dolls
- 21:19The Mantra
- 23:11The Wyvern
- 23:43The Lie
- 24:16Damage
- 24:34List
- 25:11Wyvern
- 25:32Options
- 26:00Weapons
- 28:03Discrimination Unions
- 29:33Dice Rolls
- 30:05Model Expressions
- 40:00Combat
- 40:42State
- 42:50Update
- 48:56Decision Needed
- 49:06Validation
- 50:07Conclusion
- 53:46Thank you
- 54:52Making a decision
related talks
59mDungeons, Dragons and Functions
01h 01mDungeons, Dragons and Functions
01h 01mDungeons, Dragons and Functions
52mF# in the real world
58mDomain Driven Design (DDD) with Algebraic Data Types (ADT)
53mIntroduction to T(ype)DD with F# and Reactive Web Apps with Fable.io
49mDomain Modeling Made Functional
01h 00mF# in the Real World
