Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: Barbarians
Home

[Freeciv-Dev] Re: Barbarians

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Barbarians
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Fri, 17 Oct 2003 06:26:37 +0000 (GMT)

On Wed, 15 Oct 2003, Mike Kaufman wrote:
> you must be able to save barbarians in savegames, and the easiest/simplest
> way to do that is for a barbarian to be a player.

Yes. I am not suggesting we change this.

> Frankly, looking over your list, I don't see why barbarians can't be
> regular AI players.

Because barbarians should not attempt to behave like one, single, player
entity.

The barbarian code spawns multiple independent hordes of barbarians, and
each need to throw themselves at the defences of the victim before they
despawn due to running of out 'fuel'. This requires a mindless, suicidal
behaviour and lack of planning that we should be moving away from in the
AI.

> As long as you introduce personalities, etc. The only non-AI specific
> code is the player creation and placement code. Then hand off to AI with
> a set of personality restrictions (what to build in cities taken, how
> fast to retreat, what role is give to leader...)

This is not how the AI works. Furthermore, the AI has no personalities,
and if it had personalities (which would be a lot of work), those
personalities would not be specific enough to implement barbarian type
behaviour. They would not specify what to build and what to do, but the
weights given to different kinds of behaviour (see eg aidata priorities).

Right now the barbarian behaviour is implemented as a series of short-cuts
through the AI code. This is ugly, but works to a certain extent because
the Syela AI is also a stupid suicidial maniac, without plan and
coordination. Once we move away from that paradigm, maintaining the
barbarian codepaths in the AI code will become more and more of a bother.

Also, implementing a tiny AI for barbarians will significantly reduce the
CPU usage of the barbarian player(s), since they will not be doing
unnecessary AI calculations.

  - Per



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