Seeking assistance with model formulation in a simple problem I'm attempting to devise a mechanism by which gifts or rewards are distributed to players based their location (an area is divided into regions and I can compute if a player is within a region).  I would like to be able to specity a probability for the gifts/rewards, $P(R)$, and I'm assuming that the probability of a reward is conditional on the location, so $P(R|L)$ (I would like to specify this probability too, some locations will cough up more rewards than others).  If I was unconcerned about locations, I could draw a sample from a uniform distribution and see if I meet some threshold requirement. That is, if $P(R_1) = \frac{1}{10}$, then I just check if I draw a value in the interval $[0,\frac{1}{10})$. I'm confused as to how to go about this when I include locations and it seems to me that perhaps my formulation is incorrect. 
If someone could point me in the right direction, I would be most grateful.
 A: you are not very specific about what quantity $L$ actually represents, and so I see a couple ways of modelling the conditionality $P(R|L)$. 
I assume that your locations are discrete spatial units (e.g. pixels). Let's index the locations (pixels) by $i$, there is $N$ locations in the region, and $i \in 1:N$. I suggest these models:


*

*$L_i$ describes some condition at $i$-th location, and this condition is given prior to the modelling. It could be, for example, some index of risk, roughness, accessibility or cost of the location -- the higher the index, the higher is the reward. I also assume that $P_i$s are mutually independent. A specific model of $P_i(R|L_i)$, for example, the logistic (sigmoidal) function: $$P_i(R|L_i)=\frac{1}{1+e^{-(\alpha + \beta L_i)}}$$ where $\alpha$ and $\beta$ are parameters that you can tweak to make the function increasing, decreasing, or flat. To model optima (unimodal response of $P_i$ to $L_i$) you would use a polynomial in the denominator (note the extra parameter $\gamma$): $$P_i(R|L_i)=\frac{1}{1+e^{-(\alpha + \beta L_i + \gamma L_i^2)}}$$

*In my second model, $L_i$ describes the position in 2D space, relatively to other locations. Let $j$ be the index of a location (pixel) adjacent to location $i$. Then you'd look for something like $P_i(R| (L_i, P_j(R|L_j)))$, which is a model of spatial autocorrelation or spatial non-independence. There are many ways to model this, e.g. look for spatial autoregressive models, or kriging, or something similar. Or you can use some multivariate distribution, e.g. Multi-Variate Normal: $$P_i(R|L_i)\sim MVN(\boldsymbol\mu, \boldsymbol\Sigma)$$ where, where $\mu$ is a vector of location-specific means (could be set constant), and $\boldsymbol\Sigma$ is a symmetrical covariance matrix, where the value of covariance between two locations is obtained by scaling the euclidean (or other) distances ($\boldsymbol D$) between locations by some function, e.g. negative exponential $\boldsymbol \Sigma=e^{-\lambda \boldsymbol D}$. You can, again, tweak $\lambda$ to your taste. An interpretation of this model would be that the rewards (resources, wealth, treasure, ...) somehow spills to the neighbouring pixels, i.e. if you get high rewards at one location, you'd expect to also get high rewards in the adjacent location.

*You can combine both approaches above. When the $\rho_i \sim MVN(\boldsymbol\mu, \boldsymbol\Sigma)$, then: $$P_i(R|L_i)=\frac{1}{1+e^{-(\alpha + \beta L_i + \rho_i)}}$$
Note that the field of spatial modelling is enormous, and these are just some very specific examples which I am taking from, surprise, spatial ecology (my field). I presume that there will be interesting suggestions from others. Cheers!
