Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: flying AI (PR#1162)
Home

[Freeciv-Dev] Re: flying AI (PR#1162)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: flying AI (PR#1162)
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Sun, 30 Dec 2001 13:50:32 -0500

At 10:16 PM 01/12/28 -0800, Raahul Kumar wrote:
>
>--- Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> wrote:
>
[...]
> b = unit_types[n].build_cost + 40;
>
>I have no idea why we add 40 to build cost. If someone knows, speak up.
>Ross, Petr?

This is used for veteran units. Obviously they are 40 somethings better
than the standard unit build_cost, probably because rifleman are the
prototypical unit and this is double the shield cost or something :-).

To repeat a former caution though. There is a rationale for everything
if you can hold onto your sanity long enough to figure it out. But these
long involved calculations are not in themselves particularly important
or useful. They attempt to mimic some human assessment process, but don't
really cover the full spectrum, so accuracy is meaningless within a fairly
broad range.

The key aspect is that at the end of the day, there is a weight value 
that reflects some "percentage" desirability, and can be ranked with
other weights to guesstimate a preferred choice. These weights have some
association with resource cost/time to produce/danger/other effects ...,
i.e. they can go up or down within certain ranges.

Consistently getting the the 2nd or 3rd best choice will be a better
than average player. Getting the worst all the time is to be avoided.

Thus one only needs crude estimates of important game factors, not 
comprehensive calculations of every itsy bitsy detail known to ever be
a possible influence. The latter just make the game inefficient without
adding useful value.

In fact the best AI will rank the requests, then choose randonmly with
a bias to those that are higher ranked. This guarantees that it can 
get out of dead-end strategies that rigorous hardcoded logic tends to
produce.

But of course, one needs a certain task long term memory for this to
be properly implemented, i.e. the randomness factor is choosing a new
task, or the existing one is significantly highly weighted that it is
difficult to supplant even in a random choice algorithm.
[...]
>__________________________________________________
>Do You Yahoo!?
>Send your FREE holiday greetings online!
>http://greetings.yahoo.com

Cheers,
RossW
=====




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