public inbox for xconq7@sourceware.org
 help / color / mirror / Atom feed
From: Hans Ronne <hronne@comhem.se>
To: Eric McDonald <mcdonald@phy.cmich.edu>
Cc: xconq7@sources.redhat.com
Subject: Re: occupant combat in standard game
Date: Tue, 03 Feb 2004 04:43:00 -0000	[thread overview]
Message-ID: <l03130301bc44d0ad639e@[212.181.162.155]> (raw)
In-Reply-To: <Pine.LNX.4.44.0402022243340.14123-100000@leon.phy.cmich.edu>

>> The theater reassignment code you ask for does exist (review_theaters and
>> mplayer_review_units). It is run at the start of each turn, which should be
>> sufficient. The code cares more about area control than about attacking
>> specific units, though. This is the way the mplayer works, however, for
>> better or for worse.
>
>Well, I haven't actually traced through these functions yet (since
>I haven't switched focus to AI strategy), but it seems that
>mplayer_review_units would not mess with PLAN_OFFENSIVE units
>which don't have goals. It does some rebalancing in the case of
>exploratory and defensive plans, but apparently not offensive
>ones. If this is the case, then plan_offense is going to be
>re-executed and call the tactical function, ai_go_after_victim,
>quite a bit. (And this seems to be what I actually see when I
>watch mplayers....)

All units with PLAN_OFFENSIVE will have a goal of type GOAL_VICINITY_HELD
if they are run by the mplayer. Therefore, when this goal is true (no enemy
units left in the theater) the unit will replan. This does eventually
happen, though stray enemy units can delay further offensives
unnecessarily. We discussed this on the list last year:

http://sources.redhat.com/ml/xconq7/2003/msg00047.html

I think it might be a good idea to loosen up the requirement for
GOAL_VICINITY_HELD being true so that an overwhelming superiority is enough.

Now, if the unit is run by the iplayer, there is no strategy code at all
and hence no theaters, and assign_to_offense will therefore set a plan
without a goal. This may cause a unit to get trapped in PLAN_OFFENSIVE, as
you pointed out. The best fix for this is probably to modify
assign_to_offense so that a GOAL_VICINITY_HELD is created also in that
case, using the vicinity of the unit itself. You do not really need
theaters to define such a goal.

Hans


      reply	other threads:[~2004-02-03  4:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-27 13:28 Peter Garrone
2004-01-28  5:57 ` Jim Kingdon
2004-01-28  7:54   ` Peter Garrone
2004-01-28  9:42     ` Skeezics Boondoggle
2004-01-28 16:45       ` Jim Kingdon
2004-01-28 17:26         ` Eric McDonald
2004-01-28 16:58   ` Eric McDonald
2004-01-28 17:11     ` Jim Kingdon
2004-02-02 11:00       ` Peter Garrone
2004-02-02 19:33         ` Eric McDonald
2004-02-03  0:05           ` Hans Ronne
2004-02-03  3:58             ` Eric McDonald
2004-02-03  4:43               ` Hans Ronne [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='l03130301bc44d0ad639e@[212.181.162.155]' \
    --to=hronne@comhem.se \
    --cc=mcdonald@phy.cmich.edu \
    --cc=xconq7@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).