Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Re: (PR#2641) islands from the client's point of view
Home

[Freeciv-Dev] Re: (PR#2641) islands from the client's point of view

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2641) islands from the client's point of view
From: "Mike Kaufman via RT" <rt@xxxxxxxxxxxxxx>
Date: Sun, 2 Feb 2003 19:53:13 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, Feb 02, 2003 at 06:44:03PM -0800, Jason Short via RT wrote:
> Mike Kaufman via RT wrote:
> 
> >>Who should receive the packet?
> >>Any client involved in the possible "change of view". That is:
> >>1) Both sides of the trade route established
> >>2) Both sides of the trade routes of a captured city
> >>3) All the sides affected by the improvement effect (at the moment, only
> >>one)
> >>4) All sides for which that tiles was KNOWN.
> > 
> > 
> > 1) and 2) only one side will get a packet. The other side will already 
> > have the correct information.
> > 3) will never have a packet sent.
> > 4) true, and a packet is sent when that tile becomes known.
> 
> I think you are wrong about #3.  Just like with the current trade 
> problem, this situation generates a special-case as well.

sigh. no I'm not wrong.

> The issue is that each player needs to have the same idea as the server 
> whether the two locations are on the same island.

of course, this happens implicitly with PPOV. but each player does _not_
have to have the same idea about the two locations... see below.

> In this case, suppose player#1 thinks city A is not on the same island 
> as the effect.  Player#2 thinks it is.  Depending on what the effect is, 
> at some point one of these players is likely to see something 
> inconsistent happen (because the server decides, based on its own ideas, 
> whether the effect actually applies).  And at that point a 
> client-side-ai is going to be very confused.

look, the _only_ consistency that has to happen is between the player and
the server's idea of the player. A player will [almost] never have enough
information about another player to make this kind of determination. A CMA
or any other agent that needs this is going to fail in any kind of
scenario.

> Note that this can happen even if neither player#1 nor player#2 have 
> anything to do with the effect itself.  So it could be an effect from 
> player#3 affecting a unit/city from player#4.  Player#1 and player#2 are 
> just watching from offshore.  But when the effect actually happens, one 
> of player#1 and player#2 is going to get confused.

I'm certainly confused :)
 
> This is hard to explain without a good example of what the effect could 
> be.  And I only have a bad example.
> 
> Say the effect is the Hoover Dam, giving a 'free' power plant to all 
> cities (friend or enemy) on the continent (just as an example). 
> Player#3 builds the dam, and it affects player#4's city.  Now player#1 
> sends in a diplomat to investigate the city, and sees that the 
> production is mysteriously increased.  This mystery confuses the AI.

no, it should not confuse the AI, because the AI shouldn't have to EVER
know exactly why things are in another player's city. Let me repeat: NEVER
EVER. This needs to be built into any client-side ai. Let me give a couple
of other examples: A tech that increases trade by 100%; A player-wide-ranged
improvement, that doubles shield-production (this will be for every city);
an island-wide effect that trebles science production...

In terms of effects, you need to think of another player as a black box.
Anything happening in any of his cities can be dependent on effects that
_you_ know nothing about. Now a smart player or AI can infer certain
things. Since you or and AI knows the rulesets for example, you know
instantly whether nation-specific effects apply; or if science is
abnormally high, there might be a certain player-wide improvement lurking
somewhere. But you or the AI cannot be certain that this is the case, and
if someone builds an AI without this in mind, it will serve them right when
is crashes horribly.

I want to make a point here: island-wide effects only apply to one (1)
player and one player only. They do _not_ apply to anyone or anything on a
particular island. This in itself avoids all sorts of unpleasantness which
may be what you're so worried about (and there is nothing that anyone can
do or say to make me change my mind about this).

-mike

PS: of course, now that I say this, I can think of some  situations
where right now the client is misleading its controller (and that is the
win_chance popup in mapctrl.c) with a Unit_Defend effect, a client can be
seriously mistaken about a unit's ability to defeat another unit. It's easy
to test (well not yet), just give City Walls Player-range and watch the fun.



[Prev in Thread] Current Thread [Next in Thread]