Game Development Community

In Theory: Whole/Real Number vs. Percentages for changes in AI

by Infinitum3D · in General Discussion · 10/11/2014 (9:01 am) · 0 replies

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 logarithmically (sp?) 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 stay testing it both ways. I don't want to reinvent the wheel so if anyone had experience with this I'd greatly like some guidance.

Thanks!