Showing posts from March, 2012

Dice, Probabilities and Go, part 1.5

Well, I had planned to write up a full second post right now about switching from using the recursive formula for calculating the probability of rolling some number from multiple dice to using binomial coefficients to avoid floating point math until the last step. However, Daniel Martin pointed out that with a very small change, I could push off the floating point calc to the very end. Also, if you define N(s, n, k) == s^n * F(s,n,k), you get a nicer recursion relation: (in pseudo-python)   N(s, 1, k) == 1 if 1 <= k <= s else 0   N(s, n, k) == sum(N(s, n-1, k-i) for i in [1..s]) Can't argue with that logic. This is why code reviews are great! So I spent a little time getting that working and fast. Switching to integer math made it correct and adding memoization made it much faster. package main import ( "fmt" "math" ) func main() { printRolls_secondTry(6, 6) } func dieRolls_secondTryWithCache(sides, rolls, dieSum int,

Dice, probabilities, and Go - Part 1

A post on dmg42 got me thinking about damage rolls in D&D. The main point of the post was that in 4e, damage doesn't scale with the players' abilities to mitigate the damage. He makes a great argument for new damage rolls (with graphs!) but it got me thinking, how do I distinguish the damage brutes do vs lurkers? I wanted something a little more flexible with burstier damage so I figured I'd write an app to show how damage is distributed for different sets of dice.  Other   tools  exist which do most of what I want but that would make for a boring project. So I'm working on a tool written in Go. Why Go? I went with go because 1) I've never used it, 2) someday I may want to use it seriously, and most importantly 3) it has the cutest mascot. I mean just look at it: I have one on my shelf. This one is from someone else's shelf. Learning new languages is fun and I'll have a post on surprising features of Go sometime later, once I feel mo

Another mini!

Honorable warriors give their enemies ample warning that they are coming. At least that's the vibe I get with this model . I'm really happy with how it came out. The cloth has depth, the drybrushing blends more smoothly than other models I've done, and I actually painted the eye. I should have some other models posted soon since I convinced my brother Jan to let me use his camera for a photo shoot. Full album here .

Battle Boards!

I run a D&D 4e campaign and every session I need to draw up maps (welcome to Fourth Edition ™  I can hear Andrew saying). I used to use Paizo flip mats  for this and that worked pretty well. For $11 I had a 24x30 blank slate that I could use repeatedly. With a few different colored markers I drew whatever scene I wanted. This worked really well but somehow I always felt like I needed maps that were 24x30 to properly use the mat. After a while that becomes a little boring. Enter Battle Boards , or more accurately Battle Graph Dry Erase Boards. 10x10 dry erase tiles which are awesome. I got 9 of them so I could setup a 30x30 map if I wanted to but its more fun to take advantage of their modularity. My group is in the underdark and I really wanted to run an adventure with a sense of exploration using small encounters as they traversed through it. The battle boards work amazingly well for it. As they traverse tile to tile, I draw what they encounter on the next tile, around the curve