Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2006:
[Freeciv-Dev] Re: (PR#18237) ai.ruleset
Home

[Freeciv-Dev] Re: (PR#18237) ai.ruleset

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#18237) ai.ruleset
From: banjo <banjo@xxxxxxxxxx>
Date: Tue, 04 Jul 2006 15:56:19 +1200

Curtis Warren wrote:
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=18237 >

Actually, I've been having a similar idea for about a year. The idea
is to basically have sort of a "decision list," if you will, that
basically gives a general overview of how the AI should behave. This
would basically be the overall plan, with the other parts of the AI,
e.g. attack strategy and short term responses to events, being handled
by the code. For example, the typical strategy for a 2.0.x game looks
like this:

* grow to 8 cities
* research the republic
* build harbors and temples
* rapture to 8
* create traderoutes
* build marketplaces and aqueducts
* rapture to 12
* build libraries and banks
* rapture
* build unis and stock exchange
* build marines and transports
* attack everyone

The basic idea is that each step outlines a stage: either something to
build, an action to perform, etc. There are essentially 3 base
properties which will "fall through" if not specified: what to build,
trade rate, and city state, e.g. Max Production, Max Trade, etc. If
something like this were implemented, the AI could be tailored for
each ruleset with a minimal amount of effort. At the same time, this
would also make the AI much more organised and it would actually
concentrate on abstract tasks, rather than just doing whatever
whenever.


If all the AI's have the same strategy, then the human players will
adapt and find a better one, and then the game will be boring again.

One of the reasons i wrote rndCiv was to drive the ai into being
more general and less focussed on one ruleset, (and to try and keep each game fresh). The ruleset given above will be hard (but not impossible) to recreate with rndCiv - but it won't be the *best* strategy for any given random ruleset.

At least the AI currently analyses it's strategic position and tries to come up with a non-doctrinaire solution (not a very good one, & not a very long-term strategic one, but an emergent one ).

However i think the above idea is on the right track, and would like to suggest a few changes...

What if the AI's had a choice of strategies (in a data/strategy dir?), so that each ai could play the game a little differently.

What if these strategies could be tweaked, bred and traded between players.

What if these strategies could inform the AI (through headers), about what situations they were good for (It would be easier for rndCiv to create a summary to suit). You could have these strategies...

 small isolated island    vs large continent with many enemies
 slow tech development    vs fast tech development
 lots of sea              vs mainly continental
 im the biggest nation    vs im the smallest nation
 im the richest nation    vs im dirt poor
 i have many cities       vs i have few cities
 i am ahead in technology vs i am lagging in technology
 i am getting beaten up   vs i rule the battlefield

Also you could add strategic variance from the nations file..

   i am peaceful vs aggressive vs expansionist vs builder

as it used to be (though not used?). As an aside, i like the idea of these national qualities being associated with the leader not the nation.

Combined with this, is the early/middle/late game, and specific strategies for modpacks & rndCiv rulesets (i like the idea of an AI with 'The Orcs' going on a typical orcish rampage) .

To explain, imagine the strategy above, was played by an AI, over a game
by combining 3 (early/middle/late) strategies as it needed to...

Early Largepox
 * grow to 8 cities
 * research the republic
 * build harbors and temples
 * rapture to 8

Middle Largepox
 * create traderoutes
 * build marketplaces and aqueducts
 * rapture to 12
 * build libraries and banks

Late Largepox
 * rapture
 * build unis and stock exchange
 * build marines and transports
 * attack everyone

Where as another poor AI starts off the same, gets kicked around and goes into survival mode, and tries another approach near the end.

Early Largepox
 * grow to 8 cities
 * research the republic
 * build harbors and temples
 * rapture to 8

Middle Survival
 * build city walls and defenders
 * build 2 cannon per city
 * beg for peace with everyone
 * steal techs from enemies

Late Balance of Power
 * rapture to 12
 * ally against big players
 * boost bulbs and gold
 * attack palace of those building spacecraft

I suppose this is a little more complicated, though more flexible, but from my reading of current ai papers, it seems that hybrid systems are the way to go - and i like the idea of being able to download and play against other peoples strategic plans.

thoughts?

-banjo

















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