# The Gaming Den

Welcome to the Gaming Den.

Skip to content

## A logarithmic resolution method

General questions, debates, and rants about RPGs

Moderator: Moderators

Post Reply

- Print view

2 posts • Page 1 of 1

Murtak
  Duke
  Posts: 1577
  Joined: Fri Mar 07, 2008 7:54 pm

### A logarithmic resolution method

- Quote

Post by Murtak » Fri Jul 10, 2009 9:39 am

This was touched upon in other threads ... basically it would be nice to have a system where each increase in the TN would lower the odds compared to the next lower TN by a fixed percentage. This is the best I have come up with so far:
Roll a d6.
If the die comes up as a 6, start over and add the result of that roll
If the die comes up as a 5, roll another die, subtract 1 and add that to the result
If the die comes up less than 5, just take that number
Basically you use SR3 rules, but 5 explode too, except they only add the "explode result" minus 1. This gives you probability changes of:
1 to 2: 0.83407
2 to 3: 0.801131799489252
3 to 4: 0.751840766237653
4 to 5: 0.66698515068275
5 to 6: 0.914020532410171
6 to 7: 0.908969210174029
7 to 8: 0.795790078666619
8 to 9: 0.750880202220818
9 to 10: 0.660474902314397
10 to 11: 0.495585692181669
11 to 12: 0.915702479338843
12 to 13: 0.909346169273967
13 to 14: 0.801940891045435
14 to 15: 0.738723872387239
15 to 16: 0.663440059568131
16 to 17: 0.504489337822671
17 to 18: 0.899888765294772
18 to 19: 0.899876390605686
19 to 20: 0.807692307692308
Mean change 0.774781505652969
Mean derivation from above 0.101666532821939
greatest derivation from above 0.2791958134713
Going down an average of 23% per step is ok I guess. 20 or maybe even 15 would have been nicer, but 23 should work. going down to half hurts though, but I can't see a way to fix that while keeping a system a human can handle - it is too confusing for my tastes as is.
Can anyone come up with a better scheme? Less jumps in probabilities would be nice, but I would like a reduction in complexity even more.
Murtak
Top

Murtak
  Duke
  Posts: 1577
  Joined: Fri Mar 07, 2008 7:54 pm

###

- Quote

Post by Murtak » Fri Jul 10, 2009 9:41 am

To doublecheck my approach and for anyone interested, here is the script I used to generate those numbers. I was too lazy to work out the math, so I just rolled a couple thousand times.

Code: Select all

    class Array
      def sum
        inject&#40;0.0&#41;&#123;|a, b| a + b&#125;
      end

      def mean
        sum / length.to_f
      end
    end

    class Die
      DieSize = 6

      def roll
        rand&#40;DieSize&#41; + 1
      end

      def roll_and_explode
        if &#40;result = roll&#41; == DieSize
          result + roll_and_explode
        elsif result == &#40;DieSize - 1&#41;
          result + roll - 1
        else
          result
        end
      end
    end

    times = 100000
    results = &#123;&#125;

    times.times do
      result = Die.new.roll_and_explode
      if results&#91;result&#93;
        results&#91;result&#93; += 1
      else
        results&#91;result&#93; = 1
      end
    end

    chances = &#123;&#125;

    &#40;1..20&#41;.each do |current|
      non_occurrences = &#40;1..&#40;current-1&#41;&#41;.inject&#40;0&#41;&#123;|a, b| a + &#40;results&#91;b&#93; || 0&#41;&#125;
      chances&#91;current&#93; = times - non_occurrences
    end

    changes = &#91;&#93;
    File.open&#40;'results.txt', 'w'&#41; do |file|
      chances.keys.sort.each do |key|
        unless chances&#91;key - 1&#93;.nil? || chances&#91;key - 1&#93; < 3
          change = chances&#91;key&#93;.to_f / chances&#91;key-1&#93;.to_f
          changes << change
          file << "#&#123;key - 1&#125; to #&#123;key&#125;&#58; #&#123;change&#125;\n"
        end
      end
      mean_change = changes.mean
      derivations = changes.collect&#123;|c| &#40;c - mean_change&#41;.abs&#125;
      greatest_derivation = derivations.sort.last
      file << "Mean change #&#123;mean_change&#125;\n"
      file << "Mean derivation from above #&#123;derivations.mean&#125;\n"
      file << "greatest derivation from above #&#123;greatest_derivation&#125;\n"
    end

Murtak
Top
Post Reply

- Print view

Display:
Sort by:
Direction:

2 posts • Page 1 of 1

Return to “In My Humble Opinion...”

Jump to

- Main
- ↳ About the Gaming Den
- ↳ In My Humble Opinion...
- ↳ I Gave the Mouse a Cookie...
- ↳ In The Trenches
- ↳ It's My Own Invention...
- ↳ MPSIMS