I haven't take a math class in years and this shouldn't be as difficult as I think it is.
I am essentially simulating a moving bot within a grid that evaluates cells within a given radius based on the cells' distance to the bot, such that cells that are closer to the bot are more "attractive" to it. So, I would like to model "attraction" as a decreasing exponential function of "distance to the bot". On the y-axis is "attraction" which should be between 0 and 1, and the x-axis is "distance to the bot".
Additionally, there is another variable that is confusing as I don't know how to incorporate it. Bots can have a different radius (called "max length") within which they evaluate the attractiveness of each cell. So a cell that has a "distance to the bot" of say 10 meters will be less attractive (have a value closer to 0) to a bot with a max length of 15, than to a bot with a max length of 50. Below shows how I imagine the graph would look like:
Exponential decay of cell attractiveness with distance
Now for the actual model that I will use to calculate "attraction" for each cell. I know for exponential decay: y=a(1-r)^t, where a is the initial amount, r is the decay factor, and t is the rate of change. Would a for each cell be the cell's "distance to the bot"? I guess the actual decay factor doesn't matter too much for now. What would the "max length" be?
Maybe I did not understand exactly what you need, so please let me know.
So you need something like in this picture, right?
Where you have maximum and minimum "attractiveness" $A_{\max}, A_{\min}$ you will assign and a maximum radious $r_{\max}$ as well.
The attraction field will have the form $A(r) = a \exp(-\lambda r)$ where $a,r>0$ are positive constants we will obtain in terms of $A_{\max}, A_{\min}, r_{\max}$ and $\exp(\bullet)$ is the exponential function.
We want:
Hence the attractive field reads: $$ A(r) = A_{\max}\exp\left(\frac{r}{r_{\max}}\ln\left(\frac{A_{\min}}{A_{\max}}\right)\right) $$
Is this what you wanted? Hope this helps!
As a tangential comment, you may want to take a look at the general formulation of "artificial potential fields" which does more or less the same as you want to do: assign attractiveness/repulsiveness to cells in a map according to goals/obstacles for a robot.