A COMPARISON OF THE ARTIFICIAL INTELLIGENCE

advertisement
A COMPARISON OF THE ARTIFICIAL INTELLIGENCE CURRENTLY PLANNED
FOR EDF AGAINST THE AI IN XCOM: ENEMY UNKNOWN AND TFTD
*** A description of XCOM's Tactical AI ***
Battlemaps in XCOM are composed of smaller, predesigned maps
with dimensions of 10, 20, or 30 on a side (any multiple of ten).
10x10 is the most common, although 20x20 is often used. These
predesigned maps ("import maps") are the key to the alien strategy.
Each import map is associated with a "route map," which, among
other things, tells the game where to place aliens at the start
of a battle and where they should move during it. Take the
following lovely ASCII diagram for an example (1 tile = 2x2 ASCII)
/\
/\
\/LLLLLLLLLLLLL\/
__ __ __ __ L __ __ __ __
+
LL
/\+
+
LL L
\/+
LL
L
L
+
LL
L
L
+
+
L
L
L
+
L
L
L
+/\
L
L
+
+\/LLL
L L
+
LLL
L L
+
LL /\
+
+
\/
+
+
+
+_ __ __ __ __ __ __ __ __+
The + and _ are walls; the diamonds are route nodes and L's are
links. Those are the paths the AI will take. Each Link has a
patrol weight assigned to it; the AI will be more likely to go
to a node with a higher patrol weight. A node in a strategic
position would ideally be given a higher patrol weight by the map
designer.
If an alien sees an XCOM agent or civilian (it can't distinguish
between them!), or has LOF on one that another sees, it will
attack it. If it sees more than one, it will pick one target at
random. The attack method is random, as well; there is no
strategy I am aware of in deciding between a grenade and a gun.
The effect of the difficulty levels is simple. In higher diff
levels, the aliens are tougher and 'remember' you guys longer.
The aliens can know where your guys are for quite a few turns
after they lose sight of them on Superhuman--this is one reason
for the annoyance involved with alien mind control. If they see
a guy, they can mind control him slightly later ... If they
control a guy, then they know where he is for their next turn...
so they can control him again ... and again ... and again, until
they lose him for a turn. (Combine this with the bug that lets
you see through corners in UFOs, and you've got a big problem!)
In TFTD, if an alien saw an enemy, that alien would track the
enemy for up to eight turns, then return to the routemap links.
*** A summary of EDF's Tactical AI ***
There are too many components in the EDF's AI for me to list
them all and give them adequate description.
The central entity in EDF's AI is the pathfinder. Most
pathfinders in most games are designed to find the best route
from point A to point B. EDF's routefinder finds the best routes
from point A to every point the unit can possibly reach.
What's the advantage to this? Does it justify the fact that it
must be significantly slower than a simpler routefinder? Well,
first, it's not much slower than a conventional routefinding
algorithm, even for finding a way to only one point. It's
certainly faster than XCOM's.
The true advantage, though, comes from the fact that routes to
any number of potential destinations can quickly be tested and
compared. If there are 10 squares where the alien can shoot
an EDF agent, the AI can check all 10 to see which is closest
without using any more processing time than if it only had to
check one.
This routefinding technique has more upsides than just that, of
course. If a unit, controlled by the AI, is short of energy,
the routine can easily be made to find the routes which require
the least energy expenditure.
Further, it will be possible to have "danger modified routemaps"-basically, the computer will be able to determine roughly how
dangerous each square is to step in--based on the possible
reactions of known enemies--and then avoid overly dangerous zones
of the map. This will be even more useful when the AI is
seriously outmanned and must use extreme caution, and when
individual AI controlled units are badly wounded.
The AI will be able to create LOF maps just like the routemaps.
It will be able to, then, find the fastest route to a place where
it can shoot an enemy by comparing the routemap with the LOF
map. This feature will also let it calculate the danger maps for
routefinding, because it can find the LOF map for an enemy as
easily as it can for friends.
That alone would make the AI more formiddable than XCOM's by
a significant amount. There's more to it, though. A bunch of
semi-intelligent aliens fighting you on their own would be
tougher than XCOM's random aliens fighting you on their own, but
a coordinating force must be present. The AI must be able to
identify goals and know when it's worth taking risks--and making
sacrifices.
To facilitate this, the AI will be able to set goals. The basic
idea of this--and I'll admit, it's still in the planning stages-is to let it identify:
a) Risks to its own soldiers
b) Overall objectives that must be met (kill civilians, take out
control center, etc.)
c) Beneficial, yet unimportant, activities (killing civilians
while on a research mission)
To use XCOM units and weapons as examples because EDF's aren't
fully developed, if an alien sees one soldier with a blaster
launcher and another with a stun rod, it will try to take out the
blaster equipped soldier first. Unless, of course, the soldier
with the stun rod is very close, will likely stun it, and the
alien has valuable knowledge that the aliens can't afford to let
the humans learn about ...
The next task, then, is to identify what each unit can do to
achieve those goals. Once that is done, units who are most able
to help achieve the most important goals--but unable to achieve
less important ones--will go first. At the point when they cannot
help in achieving that goal, they will try to identify another
which they can. The most important goals will always be dealt
with first, to ensure that they *are* dealt with, and whenever
possible the ability to deal with lesser goals is retained.
There are a few more features about which I will write later.
Download