Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] Re: (PR#4701) autoattack oddities esp. with cruise missile
Home

[Freeciv-Dev] Re: (PR#4701) autoattack oddities esp. with cruise missile

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: andy@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4701) autoattack oddities esp. with cruise missiles
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 29 Jul 2003 10:43:45 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, 28 Jul 2003, Andy Smith wrote:
> Seems none of the AI levels by default include H_MAP or H_FOG so any AI
> would be free to cheat like this. OTOH I guess it has been like
> this for a while and no one has noticed before.

Oh, we've noticed ;-)

A lot of the handicaps are unused. I removed most of these a while ago,
but left H_MAP and H_FOG alone. H_TARGETS is used in most of the code
where these two would make sense. H_TARGETS is sort of an AI limited fog
of war. You should use this instead of H_MAP or H_FOG, since the AI is
not capable of playing to H_MAP or H_FOG in any case.

We should also rename all of this mess. Eg having H_MAP is not having a
handicap, it means we are not cheating.

A more general approach would be to call it player_property instead of
ai_handicap. Then you would have

  /* Advantageous properties */
  PP_RATES              /* Can set its rates beyond government limits */
  PP_NO_FOG             /* Can see through fog of war */
  PP_OMNISCIENT         /* Can see entire map */
  PP_PROD_FLEXIBILITY   /* Can change production without penalty */
  PP_NO_ANARCHY         /* No period of anarchy after revolution */
  /* Disadvantageous properties */
  PP_BAD_LUCK           /* Can get only 25 gold or barbs from huts */
  /* Other */
  PP_AWAY               /* "Player Away" AI mode */
  PP_EXPERIMENTAL       /* Enable experimental AI features (for testing) */
  /* AI only */
  PP_NO_DIPLOMAT        /* No offensive use of diplomats */
  PP_DEFENSIVE          /* Build defensive buildings without calculating need */
  PP_NO_PLANES          /* Doesn't build air units */
  PP_AI_FAKE_FOG        /* AI won't go after targets it should not see */

H_HUTS can be subsumed under PP_AI_FAKE_FOG.

Moreover, I think the four last can be subsumed under a general
PP_STUPID_AI property tag. (Though, the no planes property is not really
needed. A newbie who might get screwed by AI airplanes is most likely
toast long before the AI gets aircraft anyway.)

The AI levels would then look like this:
 - Novice & Easy: PP_NO_FOG, PP_OMNISCIENT, PP_PROD_FLEXIBILITY,
PP_NO_ANARCHY, PP_NO_DIPLOMAT, PP_DEFENSIVE, PP_NO_PLANES, PP_AI_FAKE_FOG,
PP_BAD_LUCK
 - Medium: PP_NO_FOG, PP_OMNISCIENT, PP_PROD_FLEXIBILITY,
PP_NO_ANARCHY, PP_NO_DIPLOMAT, PP_AI_FAKE_FOG
 - Hard: PP_NO_FOG, PP_OMNISCIENT, PP_PROD_FLEXIBILITY,
PP_NO_ANARCHY, PP_RATES
 - Experimental: As above, pluss PP_EXPERIMENTAL

  - Per

"This is the future for the world we're in at the moment,"
promised Lawrence Di Rita, special assistant to Rumsfeld.
"We'll get better as we do it more often."




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