I think you can change your mind. You can use the simple probability of evaluating how often and by how many points the computer should “catch up”. In addition, you can calculate the difference between the computer score and the human score, and then pass this to the sigmoid function to give you the degree to which the computer score increases.
Illustrative Python:
import random, math
human_score = 0
computer_score = 0
trials = 100
computer_ahead_factor = 5
computer_catchup_prob = 0.33
computer_ahead_prob = 0.5
computer_advantage_count = 0
for i in xrange(trials):
human_score += random.randint(0,5)
score_diff = human_score - computer_score
p = (math.atan(score_diff)/(math.pi/2.) + 1)/2.
if random.random() < computer_ahead_prob:
computer_score = human_score + random.randint(0,computer_ahead_factor)
elif random.random() < computer_catchup_prob:
computer_score += int(abs(score_diff)*p)
print 'Human score:',human_score
print 'Computer score:',computer_score
computer_advantage_count += computer_score > human_score
print 'Effective computer advantage ratio: %.6f' % (computer_advantage_count/float(trials),)
source
share