This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: exploring_worth sub-module functions (Was Re: Side Mask)


On Tue, 2002-07-23 at 21:23, Bob Carragher wrote:
> This is a very minor point but may make a big difference to
> performance:  would these module functions be inline?  gcc
> supports inline functions in C but I don't know if this is
> supported by all C compilers.  (It probably is.  In any case,
> if/when xconq is converted to C++, this issue would disappear.)

As far as I know, there has never been a time when the AI was so much
slower than a human player that this was an issue (unless there was a
time when Xconq was played on 386 PC's).  It might eventually become an
issue, depending on how much more code is eventually added to the AI,
but I doubt it's worth worrying about at the moment.

> 
> I don't know how often the explorer_worth function would be
> invoked, but if it's "regularly," then it needs to be as
> efficient as is reasonably possible.

It's only invoked once, at the beginning of the game.  However, I
suppose that the worths of some units could change over time (e.g. in
"advances", when big cities become more important, granaries and
ziggurats would also become more important), so eventually, the AI may
be re-programmed to invoke these functions more than once per game.

> 
> Hm, actually, I'm not so sure about that anymore.  Certainly
> at the very start the AIs can take as long as the humans to
> perform their moves, but later in the game the humans almost
> certainly take far longer.

That may just be because we think our moves out more thoroughly than the
AI.  On the other hand, when the AI has ten times as much code as it has
now, and it's running on machines with P4 or Athlon CPU's at 2GHz with
1GB of RAM...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]