📄 ch6.mht
字号:
greatest=20
combination of threat and vulnerability (based on range, activity, =
facing,=20
range to other friendly units, cover, and sighting); fire on unit if=20
probability of kill exceeds probability of being killed".</P>
<P>How does one implement such principles into specific algorithms? I =
doubt=20
that any all purpose system. can ever be found. The best general =
solution I=20
have found so far for this problem utilizes point systems, field =
analysis, and=20
changes in the game structure.</P>
<P>First, I establish a point system for quantifying the merit of each =
possible move. This is a time-honored technique for many artificial=20
intelligence systems. A great deal of thought must go into the point =
system.=20
The first problem with it is one of dynamic range: the designer must =
insure=20
that the probability of two accessible moves each accumulating a point =
value=20
equal to the maximum value allowed by the word size (eight bits) =
approaches=20
zero. In other words, we can=92t have two moves each getting a score =
of 255 or we=20
have no way of knowing which is truly the better move. This problem =
will=20
diminish as 16-bit systems become more common.</P>
<P>A second problem with the point system is the balancing of factors =
against=20
each other. In our hypothetical tank game used above, we agree that =
climbing=20
on top of a hill is good, but we also agree that moving onto a road is =
good.=20
Which is better? If a hilltop position is worth 15 points, what is a =
road=20
position worth? These questions are very difficult to answer. They =
require a=20
deep familiarity with the play of the game. Unfortunately, such =
familiarity is=20
impossible to attain with a game that has yet to be completed. The =
only=20
alternative is broad experience, intimate knowledge of the situation =
being=20
represented, painstaking analysis, and lots of experimenting.</P>
<P>A second element of my general approach to artificial smarts is the =
use of=20
field analysis. This is only applicable to games involving spatial=20
relationships. In such games the human relies on pattern recognition =
to=20
analyze positions and plan moves. True pattern recognition on the =
level of=20
human effort is beyond the abilities of a microcomputer. However, =
something=20
approaching pattern recognition can be attained through the use of =
field=20
analysis. The key effort here is the creation of a calculable field =
quantity=20
that correctly expresses the critical information needed by the =
computer to=20
make a reasonable move. For example, in several of my wargames I have =
made use=20
of safety and danger fields that tell a unit how much safety or danger =
it=20
faces. Danger is calculated by summing the quotients of enemy =
units?strengths=20
divided by their ranges; thus, large close units are very dangerous =
and small=20
distant units are only slightly dangerous. A similar calculation with =
friendly=20
units yields a safety factor. By comparing the danger value at its =
position=20
with the safety value at its position, a unit can decide whether it =
should=20
exhibit bold behavior or timid behavior. Once this decision is made, =
the unit=20
can look around it and measure the net danger minus safety in each =
position=20
into which the unit could move. If it is feeling bold, it moves =
towards the=20
danger; if it is feeling timid, it moves away. Thus, the use of fields =
allows=20
a unit to assess a spatial array of factors.</P>
<P>Another technique for coping with artificial smarts problems is so =
simple=20
that it seems like cheating: change the game. If an element of the =
game is not=20
tractable with artificial reckoning, remove it. If you can=92t come up =
with a=20
good way to use a feature, you really have no choice but to delete it. =
For=20
example, while designing TANKTICS, I encountered a problem with lakes. =
If a=20
lake was concave in shape, the computer would drive its tanks to the =
shore,=20
back up, and return to the shore. The concave lake created a trap for =
my=20
artificial smarts algorithm. I wasted a great deal of time working on =
a=20
smarter artificial smarts routine that would not be trapped by concave =
lakes=20
while retaining desirable economies of motion. After much wasted =
effort I=20
discovered the better solution: delete concave lakes from the map.</P>
<P>Ideally, the experienced game designer has enough intuitive feel =
for=20
algorithms that she can sense game factors that are intractable and =
avoid them=20
during the design stages of the game. Most of us must discover these =
things=20
the hard way and retrace our steps to modify the design. Experiencing =
these=20
disasters is part of what provides the intuition.</P>
<P>A special problem is the coordination of moves of many different =
units=20
under the control of the computer. How is the computer to assure that =
the=20
different units move in a coordinated way and that traffic jams =
don=92t develop?=20
One way is to use a sequential planning system coupled with a simple =
test for=20
the position of other units. Thus, unit #1 moves first, then #2, then =
#3, with=20
each one avoiding collisions. I can assure you from my own experience =
that=20
this system replaces collisions with the most frustrating traffic =
jams. A=20
better way uses a virtual move system in which each unit plans a =
virtual move=20
on the basis of the virtual positions of all units. Here=92s how it =
works: we=20
begin with an array of real positions of all computer units. We create =
an=20
array of virtual positions and initialize all virtual values to the =
real=20
values. Then each unit plans its move, avoiding collisions with the =
virtual=20
positions. When its move is planned, it places its planned final =
position into=20
the virtual array. Other units then plan their moves. After all units =
have=20
planned one virtual move, the process repeats, with each unit planning =
its=20
move on the basis of the interim virtual move array. This huge outer =
loop=20
should be convergent; after a sufficient number of iterations the =
routine=20
terminates and the virtual positions form the basis of the moves made =
by the=20
computer=92s units. This technique should be useful for coordinating =
the moves of=20
many units and preventing traffic jams.</P>
<P>No matter how good an algorithm is, it has a limited regime of=20
applicability. The odds are that a specific algorithm will work best =
under a=20
narrow range of conditions. A good game design must offer a broad =
range of=20
conditions to be truly interesting. Thus, the designer must frequently =
create=20
a number of algorithms and switch from one to another as conditions =
change.=20
The transition from one algorithm to another is fraught with peril, =
for=20
continuity must be maintained across the transition. I well remember a =
frustrating experience with algorithm transitions with LEGIONNAIRE. =
The=20
computer-barbarians had three algorithms: a "run for safety" =
algorithm, an=20
"approach to contact" algorithm, and an "attack" algorithm. Under =
certain=20
conditions a barbarian operating under the "approach to contact" =
algorithm=20
would decide on bold behavior, dash forward to make contact with the =
human,=20
and make the transition to the "attack" algorithm, which would then =
declare an=20
attack unsafe. The barbarian would thus balk at the attack, and =
convert to the=20
"run for safety" algorithm, which would direct it to turn tail and =
run. The=20
human player was treated to a spectacle of ferociously charging and=20
frantically retreating barbarians, none of whom ever bothered to =
actually=20
fight. I eventually gave up and re-designed the algorithms, merging =
them into=20
a single "advance to attack" algorithm with no transitions.</P>
<P>The artificial smarts techniques I have described so far are =
designed for=20
use in games involving spatial relationships. Many games are =
non-spatial;=20
other artificial smarts techniques are required for such games. One of =
the=20
most common types of non-spatial games uses systems that behave in =
complex=20
ways. These games often use coupled differential equations to model =
complex=20
systems. LUNAR LANDER, HAMMURABI, ENERGY CZAR, and SCRAM are all =
examples of=20
such games. The primary problem facing the designer of such games is =
not so=20
much to defeat the human as to model complex behavior. I advise the =
game=20
designer to be particularly careful with games involving large systems =
of=20
coupled differential equations. HAMMURABI uses three coupled =
first-order=20
differential equations, and most programmers find it tractable. But =
the=20
complexity of the problem rises very steeply with the number of =
differential=20
equations used. ENERGY CZAR used the fantastic sum of 48 differential=20
equations, a feat made believable only by the fact that many =
constraints were=20
imposed on them. In general, be wary of more than four coupled =
differential=20
equations. If you must use many differential equations, try to use =
parallel=20
differential equations, in which the same fundamental equation is =
applied to=20
each element of an array of values.</P>
<P>To help keep the system balanced, each differential equation should =
have a=20
damping factor that must be empirically adjusted:</P>
<CENTER>
<P>new value =3D old value + (driving factor / damping =
factor)</P></CENTER>
<P>A small damping factor produces lively systems that bounce around =
wildly. A=20
large damping factor yields sluggish systems that change slowly.=20
Unfortunately, recourse to simple damping factors can backfire when a=20
relationship of negative feedback exists between the "new value" and =
the=20
"driving force". In this case, large damping inhibits the negative =
feedback,=20
and one of the variables goes wild. The behavior of systems of =
differential=20
equations is complex; I suggest that designers interested in these =
problems=20
study the mathematics of overdamped, underdamped, and critically =
damped=20
oscillatory systems. For more general information on solving systems =
of=20
differential equations, any good textbook on numerical analysis will =
serve as=20
a useful guide. <FONT size=3D-1><A=20
=
href=3D"http://www.vancouver.wsu.edu/fac/peabody/game-book/Chapter6.html#=
top">Top</A>=20
</FONT></P>
<P><A name=3D"Conclusions on Artificial"></A><B>Conclusions on =
Artificial=20
Smarts</B></P>
<P>The application of all of these methods may well produce a game =
with some=20
intelligence, but one=92s expectations should not be too high. Even =
the=20
expenditure of great effort is not enough to produce truly intelligent =
play;=20
none of my three efforts to date play with an intelligence that is =
adequate,=20
by itself, to tackle a human player. Indeed, they still need force =
ratios of=20
at least two to one to stand up to the human player. <FONT =
size=3D-1><A=20
=
href=3D"http://www.vancouver.wsu.edu/fac/peabody/game-book/Chapter6.html#=
top">Top</A>=20
</FONT></P>
<P><A name=3DLimited></A><B>Limited Information</B></P>
<P>Another way to make up for the computer=92s lack of intelligence is =
to limit=20
the amount of information available to the human player. If the human =
does not=20
have the information to process, he cannot apply his superior =
processing power=20
to the problem. This technique should not be applied to excess, for =
then the=20
game is reduced to a game of chance. It can, nevertheless, equalize =
the odds.=20
If the information is withheld in a reasonable context (e.g., the =
player must=20
send out scouts), the restrictions on information seem natural.</P>
<P>Limited information provides a bonus: it can tickle the imagination =
of the=20
player by suggesting without actually confirming. This only happens =
when the=20
limitations on the information are artfully chosen. Randomly assigned =
gaps in=20
information are confusing and frustrating rather than tantalizing. A =
naked=20
woman can be beautiful to the male eye, but an artfully dressed woman =
can=20
conceal her charms suggestively and thus appear even more alluring. =
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -