forked from FSTT-LIST/RewardEngine_Unity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StrategyParameters.cs
30 lines (22 loc) · 933 Bytes
/
StrategyParameters.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
namespace com.glups.Reward
{
public class StrategyParameters
{
// 6 ranks, and the minimum score associated with each rank
public int[] theRankSteps = new int[] { 1, 50, 120, 200, 320, 360 };
public int theFixedSchedule = 10;
private int theMinVariableSchedule = 7;
private int theMaxVariableSchedule = 13;
public float theFixedIncentiveRatio = (float)0.2;
internal virtual int computeVariableSchedule()
{
int schedule = theMinVariableSchedule + (int)Math.Floor(MathHelper.NextDouble * (theMaxVariableSchedule - theMinVariableSchedule));
Console.WriteLine(">> Compute Variable Schedule: " + schedule);
return schedule;
}
internal virtual float computeVariableIncentive(int errors)
{
return (float)(errors * MathHelper.NextDouble * theFixedIncentiveRatio * 2);
}
}
}