Variability coding with Percentages vs. Real Numbers

infinitum3d

  • Posts: 89
This is more of a theory question about programming rather than a Stencyl coding question.

I'm trying to incorporate a measure of variation into my AI.  My thought is that I want to use a basic 100 point scale. AI will start with a score of 50, and increase or decrease based on events.  For example, something good happens and the score goes up.  One way to do this is to say something like;

if GoodEvent=true
then AI_SCORE = AI_SCORE + 1

But for greater variation, I was thinking I could say;

if GoodEvent=true
then AI_SCORE = AI_SCORE + 1%

the percentage would allow for logarithmic higher increases at a higher score, and lower increases at a lower starting score.

My concern is that I will need to round numbers and/or use floating points which could affect performance (?)

So my question is, do I need to be concerned about this or should I just start testing it both ways. I don't want to reinvent the wheel so if anyone had experience with this is greatly like some guidance.

Thanks!