Skip to main content
deleted 1 character in body
Source Link
posita
  • 1.1k
  • 4
  • 10

I get a different result when I try to reproduce your described calculation using dyce¹:

from dyce import H, P

d10 = H(10)

def mechanic(nd10_roll):
    outcome_max = max(nd10_roll)
    # We are faithfully reproducing the approach here of (max * count). As alluded to
    # in the original question, we could have just as easily written something like:
    #   max_sum = sum(outcome for outcome in nd10_roll if outcome == outcome_max)
    count_max = sum(1 for outcome in nd10_roll if outcome == outcome_max)
    max_sum = outcome_max * count_max
    # Rounding is optional. We do it here solely for display readability.
    return round(max_sum / len(nd10_roll), 2)

results = {
  n: P.foreach(mechanic, nd10_roll=n@P(d10))
  for n in range(2, 7)
}

# ... see graph/binder for visualization of results

I've attached the anydyce² graphs below. You can see my attempt (and play around with it) in your browser: Try dyce [sourcesource]

That configuration of JupyterLite uses in-memory browser storage, so download any work you want to save.

There's a reasonable possibility the difference could be explained by:

  1. My not understanding your sentiment;
  2. My not getting my math right;
  3. AnyDice not doing what you think it's doing or want it to do; or
  4. Some combination of 1, 2, and 3.

That being said, my results look similar to @Ilmari Karonen's scaled up result from his answer. There are more efficient (and less readable) ways for dyce to arrive at those results, but you should be able to drive that implementation up to 10d10 (and possibly beyond) without too much of an issue. If you want to go higher, I can explore alternatives.


¹ dyce is my Python dice probability library.

² anydyce is my visualization layer for dyce meant as a rough stand-in for AnyDice.


Line Plot Burst Plot

I get a different result when I try to reproduce your described calculation using dyce¹:

from dyce import H, P

d10 = H(10)

def mechanic(nd10_roll):
    outcome_max = max(nd10_roll)
    # We are faithfully reproducing the approach here of (max * count). As alluded to
    # in the original question, we could have just as easily written something like:
    #   max_sum = sum(outcome for outcome in nd10_roll if outcome == outcome_max)
    count_max = sum(1 for outcome in nd10_roll if outcome == outcome_max)
    max_sum = outcome_max * count_max
    # Rounding is optional. We do it here solely for display readability.
    return round(max_sum / len(nd10_roll), 2)

results = {
  n: P.foreach(mechanic, nd10_roll=n@P(d10))
  for n in range(2, 7)
}

# ... see graph/binder for visualization of results

I've attached the anydyce² graphs below. You can see my attempt (and play around with it) in your browser: Try dyce [source]

That configuration of JupyterLite uses in-memory browser storage, so download any work you want to save.

There's a reasonable possibility the difference could be explained by:

  1. My not understanding your sentiment;
  2. My not getting my math right;
  3. AnyDice not doing what you think it's doing or want it to do; or
  4. Some combination of 1, 2, and 3.

That being said, my results look similar to @Ilmari Karonen's scaled up result from his answer. There are more efficient (and less readable) ways for dyce to arrive at those results, but you should be able to drive that implementation up to 10d10 (and possibly beyond) without too much of an issue. If you want to go higher, I can explore alternatives.


¹ dyce is my Python dice probability library.

² anydyce is my visualization layer for dyce meant as a rough stand-in for AnyDice.


Line Plot Burst Plot

I get a different result when I try to reproduce your described calculation using dyce¹:

from dyce import H, P

d10 = H(10)

def mechanic(nd10_roll):
    outcome_max = max(nd10_roll)
    # We are faithfully reproducing the approach here of (max * count). As alluded to
    # in the original question, we could have just as easily written something like:
    #   max_sum = sum(outcome for outcome in nd10_roll if outcome == outcome_max)
    count_max = sum(1 for outcome in nd10_roll if outcome == outcome_max)
    max_sum = outcome_max * count_max
    # Rounding is optional. We do it here solely for display readability.
    return round(max_sum / len(nd10_roll), 2)

results = {
  n: P.foreach(mechanic, nd10_roll=n@P(d10))
  for n in range(2, 7)
}

# ... see graph/binder for visualization of results

I've attached the anydyce² graphs below. You can see my attempt (and play around with it) in your browser: Try dyce [source]

That configuration of JupyterLite uses in-memory browser storage, so download any work you want to save.

There's a reasonable possibility the difference could be explained by:

  1. My not understanding your sentiment;
  2. My not getting my math right;
  3. AnyDice not doing what you think it's doing or want it to do; or
  4. Some combination of 1, 2, and 3.

That being said, my results look similar to @Ilmari Karonen's scaled up result from his answer. There are more efficient (and less readable) ways for dyce to arrive at those results, but you should be able to drive that implementation up to 10d10 (and possibly beyond) without too much of an issue. If you want to go higher, I can explore alternatives.


¹ dyce is my Python dice probability library.

² anydyce is my visualization layer for dyce meant as a rough stand-in for AnyDice.


Line Plot Burst Plot

deleted 11 characters in body
Source Link
posita
  • 1.1k
  • 4
  • 10

I get a different result when I try to reproduce your described calculation using dyce¹:

from dyce import H, P

d10 = H(10)

def mechanic(nd10_roll):
    outcome_max = max(nd10_roll)
    # We are faithfully reproducing the approach here of (max * count). As alluded to
    # in the original question, we could have just as easily written something like:
    #   max_sum = sum(outcome for outcome in nd10_roll if outcome == outcome_max)
    count_max = sum(1 for outcome in nd10_roll if outcome == outcome_max)
    max_sum = outcome_max * count_max
    # Rounding is optional. We do it here solely for display readability.
    return round(max_sum / len(nd10_roll), 2)

results = {
  n: P.foreach(mechanic, nd10_roll=n@P(d10))
  for n in range(2, 7)
}

# ... see graph/binder for visualization of results

I've attached the anydyce² graphs below. You can see my attempt (and play around with it) in your browser: Try dyce [sourcesource]

That configuration of JupyterLite uses in-memory browser storage, so download any work you want to save.

There's a reasonable possibility the difference could be explained by:

  1. My not understanding your sentiment;
  2. My not getting my math right;
  3. AnyDice not doing what you think it's doing or want it to do; or
  4. Some combination of 1, 2, and 3.

That being said, my results look similar to @Ilmari Karonen's scaled up result from his answer. There are more efficient (and less readable) ways for dyce to arrive at those results, but you should be able to drive that implementation up to 10d10 (and possibly beyond) without too much of an issue. If you want to go higher, I can explore alternatives.


¹ dyce is my Python dice probability library.

² anydyce is my visualization layer for dyce meant as a rough stand-in for AnyDice.


Line Plot Burst Plot

I get a different result when I try to reproduce your described calculation using dyce¹:

from dyce import H, P

d10 = H(10)

def mechanic(nd10_roll):
    outcome_max = max(nd10_roll)
    # We are faithfully reproducing the approach here of (max * count). As alluded to
    # in the original question, we could have just as easily written something like:
    #   max_sum = sum(outcome for outcome in nd10_roll if outcome == outcome_max)
    count_max = sum(1 for outcome in nd10_roll if outcome == outcome_max)
    max_sum = outcome_max * count_max
    # Rounding is optional. We do it here solely for display readability.
    return round(max_sum / len(nd10_roll), 2)

results = {
  n: P.foreach(mechanic, nd10_roll=n@P(d10))
  for n in range(2, 7)
}

# ... see graph/binder for visualization of results

I've attached the anydyce² graphs below. You can see my attempt (and play around with it) in your browser: Try dyce [source]

That configuration of JupyterLite uses in-memory browser storage, so download any work you want to save.

There's a reasonable possibility the difference could be explained by:

  1. My not understanding your sentiment;
  2. My not getting my math right;
  3. AnyDice not doing what you think it's doing or want it to do; or
  4. Some combination of 1, 2, and 3.

That being said, my results look similar to @Ilmari Karonen's scaled up result from his answer. There are more efficient (and less readable) ways for dyce to arrive at those results, but you should be able to drive that implementation up to 10d10 (and possibly beyond) without too much of an issue. If you want to go higher, I can explore alternatives.


¹ dyce is my Python dice probability library.

² anydyce is my visualization layer for dyce meant as a rough stand-in for AnyDice.


Line Plot Burst Plot

I get a different result when I try to reproduce your described calculation using dyce¹:

from dyce import H, P

d10 = H(10)

def mechanic(nd10_roll):
    outcome_max = max(nd10_roll)
    # We are faithfully reproducing the approach here of (max * count). As alluded to
    # in the original question, we could have just as easily written something like:
    #   max_sum = sum(outcome for outcome in nd10_roll if outcome == outcome_max)
    count_max = sum(1 for outcome in nd10_roll if outcome == outcome_max)
    max_sum = outcome_max * count_max
    # Rounding is optional. We do it here solely for display readability.
    return round(max_sum / len(nd10_roll), 2)

results = {
  n: P.foreach(mechanic, nd10_roll=n@P(d10))
  for n in range(2, 7)
}

# ... see graph/binder for visualization of results

I've attached the anydyce² graphs below. You can see my attempt (and play around with it) in your browser: Try dyce [source]

That configuration of JupyterLite uses in-memory browser storage, so download any work you want to save.

There's a reasonable possibility the difference could be explained by:

  1. My not understanding your sentiment;
  2. My not getting my math right;
  3. AnyDice not doing what you think it's doing or want it to do; or
  4. Some combination of 1, 2, and 3.

That being said, my results look similar to @Ilmari Karonen's scaled up result from his answer. There are more efficient (and less readable) ways for dyce to arrive at those results, but you should be able to drive that implementation up to 10d10 (and possibly beyond) without too much of an issue. If you want to go higher, I can explore alternatives.


¹ dyce is my Python dice probability library.

² anydyce is my visualization layer for dyce meant as a rough stand-in for AnyDice.


Line Plot Burst Plot

added 10 characters in body
Source Link
posita
  • 1.1k
  • 4
  • 10

I get a different result when I try to reproduce your described calculation using dyce¹:

from dyce import H, P

d10 = H(10)

def mechanic(nd10_roll):
    outcome_max = max(nd10_roll)
    # We are faithfully reproducing the approach here of (max * count). As alluded to
    # in the original question, we could have just as easily written something like:
    #   max_sum = sum(outcome for outcome in nd10_roll if outcome == outcome_max)
    count_max = sum(1 for outcome in nd10_roll if outcome == outcome_max)
    max_sum = outcome_max * count_max
    # Rounding is optional. We do it here solely for display readability.
    return round(max_sum / len(nd10_roll), 2)

results = {
  n: P.foreach(mechanic, nd10_roll=n@P(d10))
  for n in range(2, 7)
}

# ... see graph/binder for visualization of results

I've attached the anydyce² graphs below. You can see my attempt (and play around with it) in your browser: Try dyceTry dyce [source]

That configuration of JupyterLite uses in-memory browser storage, so download any work you want to save.

There's a reasonable possibility the difference could be explained by:

  1. My not understanding your sentiment;
  2. My not getting my math right;
  3. AnyDice not doing what you think it's doing or want it to do; or
  4. Some combination of 1, 2, and 3.

That being said, my results look similar to @Ilmari Karonen's scaled up result from his answer. There are more efficient (and less readable) ways for dyce to arrive at those results, but you should be able to drive that implementation up to 10d10 (and possibly beyond) without too much of an issue. If you want to go higher, I can explore alternatives.


¹ dyce is my Python dice probability library.

² anydyce is my visualization layer for dyce meant as a rough stand-in for AnyDice.


Line Plot Burst Plot

I get a different result when I try to reproduce your described calculation using dyce¹:

from dyce import H, P

d10 = H(10)

def mechanic(nd10_roll):
    outcome_max = max(nd10_roll)
    # We are faithfully reproducing the approach here of (max * count). As alluded to
    # in the original question, we could have just as easily written something like:
    #   max_sum = sum(outcome for outcome in nd10_roll if outcome == outcome_max)
    count_max = sum(1 for outcome in nd10_roll if outcome == outcome_max)
    max_sum = outcome_max * count_max
    # Rounding is optional. We do it here solely for display readability.
    return round(max_sum / len(nd10_roll), 2)

results = {
  n: P.foreach(mechanic, nd10_roll=n@P(d10))
  for n in range(2, 7)
}

# ... see graph/binder for visualization of results

I've attached the anydyce² graphs below. You can see my attempt (and play around with it) in your browser: Try dyce [source]

That configuration of JupyterLite uses in-memory browser storage, so download any work you want to save.

There's a reasonable possibility the difference could be explained by:

  1. My not understanding your sentiment;
  2. My not getting my math right;
  3. AnyDice not doing what you think it's doing or want it to do; or
  4. Some combination of 1, 2, and 3.

That being said, my results look similar to @Ilmari Karonen's scaled up result from his answer. There are more efficient (and less readable) ways for dyce to arrive at those results, but you should be able to drive that implementation up to 10d10 (and possibly beyond) without too much of an issue. If you want to go higher, I can explore alternatives.


¹ dyce is my Python dice probability library.

² anydyce is my visualization layer for dyce meant as a rough stand-in for AnyDice.


Line Plot Burst Plot

I get a different result when I try to reproduce your described calculation using dyce¹:

from dyce import H, P

d10 = H(10)

def mechanic(nd10_roll):
    outcome_max = max(nd10_roll)
    # We are faithfully reproducing the approach here of (max * count). As alluded to
    # in the original question, we could have just as easily written something like:
    #   max_sum = sum(outcome for outcome in nd10_roll if outcome == outcome_max)
    count_max = sum(1 for outcome in nd10_roll if outcome == outcome_max)
    max_sum = outcome_max * count_max
    # Rounding is optional. We do it here solely for display readability.
    return round(max_sum / len(nd10_roll), 2)

results = {
  n: P.foreach(mechanic, nd10_roll=n@P(d10))
  for n in range(2, 7)
}

# ... see graph/binder for visualization of results

I've attached the anydyce² graphs below. You can see my attempt (and play around with it) in your browser: Try dyce [source]

That configuration of JupyterLite uses in-memory browser storage, so download any work you want to save.

There's a reasonable possibility the difference could be explained by:

  1. My not understanding your sentiment;
  2. My not getting my math right;
  3. AnyDice not doing what you think it's doing or want it to do; or
  4. Some combination of 1, 2, and 3.

That being said, my results look similar to @Ilmari Karonen's scaled up result from his answer. There are more efficient (and less readable) ways for dyce to arrive at those results, but you should be able to drive that implementation up to 10d10 (and possibly beyond) without too much of an issue. If you want to go higher, I can explore alternatives.


¹ dyce is my Python dice probability library.

² anydyce is my visualization layer for dyce meant as a rough stand-in for AnyDice.


Line Plot Burst Plot

deleted 16 characters in body
Source Link
posita
  • 1.1k
  • 4
  • 10
Loading
added 761 characters in body
Source Link
posita
  • 1.1k
  • 4
  • 10
Loading
added 388 characters in body
Source Link
posita
  • 1.1k
  • 4
  • 10
Loading
Source Link
posita
  • 1.1k
  • 4
  • 10
Loading