Recommend
 
 Thumb up
 Hide
5 Posts

BoardGameGeek» Forums » Board Game Design » Design Queries and Problems

Subject: Help with AnyDice rss

Your Tags: Add tags
Popular Tags: [View All]
Luis Marco
msg tools
Hello, eceryone. I wonder if anyone could help me using this page (anydice.com)

The thing is that I want to know the probability of one roll being equal or greater then a second one, while my dice have blanks, so I wrote

output 3d{1,1,1,0,0,0}>=3d{1,1,0,0,0}

Bur I think the result consider 0's (misses) so I want to write

first roll is grater than cero and equal or grater than second roll. But I don´t know how.

I hope someone could help me, thanks a lot.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jeremy Lennert
United States
California
flag msg tools
designer
Avatar
mbmbmbmbmb
If I understand you correctly, you want to calculate the probability that the sum of a collection of dice is BOTH greater than or equal to the sum of another collection of dice AND strictly greater than zero.

That is complex enough that you probably want to define a custom function, which might look something like this:

function: X:n greater than both Y:n and Z:n {
result: (X > Y) & (X > Z)
}

output [3d6 greater than both 2d6 and 5]


That function has 3 parameters (X, Y, and Z--parameter names are written in all caps) which are all required to be numbers (that's what ":n" means). If you pass a die (or collection of dice) to a function expecting a number or sequence, the function is invoked separately for each possible roll. This allows you to define a complex operation in terms of a single roll.

Naturally, you could modify that function so that the first ">" becomes ">=".

Alternately, I believe you can just subtract 1 from the second die roll before you pass it to the function, giving you something like:

output [3d{1,0} greater than both (3d{1,1,0,0,0}-1) and 0]

(Notice I have replaced d{1,1,1,0,0,0} with d{1,0} because that has the same probability distribution but might be faster for anydice to process--I'm not sure how the dice are represented internally.)



Also, I notice in the example from your post that you are using similar-but-not-identical dice for the two rolls (the first side uses 6-sided dice, the second side uses 5-sided dice). That's fine if it's what you meant, but seems like it might be a mistake.
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Luis Marco
msg tools
Thanks a lot, this helps me understanding the page. I get what you are saying. I wonder if there is an in depth manual in the usage of anydice...
Thanks again
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jeremy Lennert
United States
California
flag msg tools
designer
Avatar
mbmbmbmbmb
LuisAcuario wrote:
I wonder if there is an in depth manual in the usage of anydice...

Have you clicked on the "documentation" button on the left side of the anydice page?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Luis Marco
msg tools
Yes I have, but I found it hard to get the syntax rigth and the "traslation" of each comand in order for me to understand it, since I don´t know coding.

This full example clarifies it a lot.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Front Page | Welcome | Contact | Privacy Policy | Terms of Service | Advertise | Support BGG | Feeds RSS
Geekdo, BoardGameGeek, the Geekdo logo, and the BoardGameGeek logo are trademarks of BoardGameGeek, LLC.