Simon McGregor on Wed, 28 Jul 2010 08:43:18 -0700 (MST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [game-lang] Another quick tangential comment about integers and reals


On Wed, Jul 28, 2010 at 2:21 PM, Joel Uckelman <uckelman@xxxxxxxxx> wrote:
> Thus spake Simon McGregor:
>>
>> In regard to rationals and reals, imagine the following: a game is
>> played by moving points on a board in R2, up to 1 unit's distance at a
>> time (with the Euclidean metric). We can model this using the
>> rationals, because rational arithmetic is adequate to determine
>> whether two points with rational coordinates are within a rational
>> distance of one another.
>>
>> However, suppose that the provably optimal move in some situation is
>> to move your point as far as possible towards another point. Then (in
>> general), no move in the rational model is optimal, although there's
>> an optimal move in the continuous model. Uh-oh!
>>
>
> I don't follow this last bit of reasoning. It seems to imply that there's
> some real r which is nearer to a target t than any rational q is.

Yup. Some real (r_1, r_2) which is nearer to a rational target (t_1,
t_2) than any rational (q_1, q_2), given the constraints imposed by
the movement range rule - that the Euclidean distances of (r_1, r_2)
and (q_1, q_2) from a prior rational point (p_1, p_2) are a specified
rational distance (1) or less. The need for irrationals comes from the
square root sign in the Euclidean metric.

Say my point A is at (0,0) and the target point T is at (1,1); my
optimal move is to move A as close as possible to T; the rules prevent
A's new position from being more than 1 unit away from its current
position.
* If I am allowed reals, the optimal move is "A to (sqrt 2, sqrt 2)".
* If I am only allowed rationals, there is no optimal move, since
there is always another rationals move which is closer to T within the
allowable Euclidean distance of 1 unit.

Does that make sense now?


Simon
_______________________________________________
game-lang mailing list
game-lang@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/game-lang