Dungeons, Dragons and Functions
summary
Implements D&D 5e rules in F#, spending about six months turning PHB/DMG/Monster Manual specs into code using discriminated unions and records to model stats, weapons and attacks, and a dice expression DSL with eval to roll complex expressions. Builds a Fable + Elmish web simulator that runs automated encounters and shows wolves beat goblins frequently; many rules are half truths (melee reach exceptions, multi-damage, optional features), effects and global buffs remain hardest, and reinforcement learning is the planned next step.
AI-written summary · about
chapters (25)
- 0:00Start
- 5:13Player's Handbook (PHB)
- 7:23Ogres, Goblins, & Company
- 8:25Discriminated Union
- 8:44Abilities
- 9:21Pattern Matching
- 10:08Modifiers
- 10:28Function
- 15:40Different structure: OR
- 16:13Melee & Ranged
- 16:57Attack: a sketch
- 17:58Pattern Match to extract data
- 18:57Modules
- 19:17Chimerae
- 22:16Goblin attacks
- 22:29Wyvern attacks
- 25:36The truth...
- 28:13Questions to ask
- 43:33Evaluation
- 45:19What is a fair fight?
- 45:36Estimating probability of survival
- 46:16In practice
- 46:39Modeling (4)
- 53:42Alternatives
- 54:57What's missing
related talks
01h 02mDungeons, Dragons and Functions
01h 01mDungeons, Dragons and Functions
01h 01mDungeons, Dragons and Functions
52mF# in the real world
01h 00mF# in the Real World
53mIntroduction to T(ype)DD with F# and Reactive Web Apps with Fable.io
46mFunctional programming in F# Fad or Fabulous
01h 14mFunctional Programming in F#: Fad or Fabulous?
