⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch15.htm

📁 对于程序员来说可以利用JAVA来开发网络游戏!
💻 HTM
📖 第 1 页 / 共 3 页
字号:
complex AI systems in games, there is a renewed interest in AI
within the commercial game community. As a matter of fact, many
new games that boast a wide range of AI implementations are being
released. Following are some of the new commercial games making
strong claims to AI support. Because these games are all new,
and because most of them aren't on the market as I'm writing this,
be aware that each game may change when it actually hits the shelves.
<H3><A NAME="Battlecruiser3000AD"><B>Battlecruiser: 3000AD</B></A>
</H3>
<P>
Battlecruiser: 3000AD, by Take 2 Interactive Software, claims
to be the first commercial game to feature neural networks. Neural
networks are a fairly recent area of AI research and use very
complex mathematics to model communications and actions in the
brain. Virtually every non-player character in Battlecruiser:
3000AD is driven by a neural network, including each of the 125
crew members on your own ship. The computer opponents also use
neural networks to guide negotiations, trading, and of course,
combat.
<P>
For more information about Battlecruiser: 3000AD, check out its
Web page at
<BLOCKQUOTE>
<TT><A HREF="http://www.westol.com/~taketwo/battle.html">http://www.westol.com/~taketwo/battle.html</A></TT>
</BLOCKQUOTE>
<H3><A NAME="CloakDaggerandDNA"><B>Cloak, Dagger, and DNA</B></A>
</H3>
<P>
Cloak, Dagger, and DNA, by Oidian Systems, is one of, if not <I>the</I>
first game to make use of genetic algorithms. Genetic algorithms
comprise an advanced branch of AI devoted to evolved thought in
AI systems. Cloak, Dagger, and DNA is the first in a family of
games by Oidian Systems using genetic algorithms. The game itself
is somewhat similar to Risk; a map is broken down into regions,
some of which contain factories. The possession of factories both
brings income to the player and provides bases where you can build
more units (either armies or spies). Armies are necessary to take
and defend areas, and combat is calculated based on the number
of units in a given area, with the defender getting a defensive
bonus.
<P>
The heart of the game is its use of genetic algorithms to guide
the computer opponent play. It comes with four &quot;DNA strands,&quot;
which are rules governing the behavior of the computer opponents.
As each DNA strand plays, it tracks how well it does in every
battle. Between battles, the user can allow the DNA strands to
compete against each other (and/or the player's DNA strand) in
a series of tournaments that allow each DNA strand to evolve.
There are a number of rules governing how DNA strands mutate,
and the user can edit these rules for a particular strand. A library
of up to 50 DNA patterns can be maintained in the shareware version.
<P>
For information about Cloak, Dagger, and DNA, and to download
your own copy, check out its Web page at
<BLOCKQUOTE>
<TT><A HREF="http://www.quake.net/~obrien/oidian/cddna.html">http://www.quake.net/~obrien/oidian/cddna.html</A></TT>
</BLOCKQUOTE>
<H3><A NAME="Destiny"><B>Destiny</B></A></H3>
<P>
Destiny, by Interactive Magic, promises to combine the best elements
of Civilization, Sim City, and Descent to provide a 3-D strategy
game. Interactive Magic, the same company that produced Star Rangers,
Apache, and Air Warrior II, has teamed up with a company called
Neuromedia, an AI development studio. Not a lot is known about
Neuromedia, but they've published papers for various AI symposiums,
mostly on genetic algorithms, so it's only logical to expect some
degree of genetic AI in the game.
<P>
For more information about Destiny, stop by its Web page, which
is located at
<BLOCKQUOTE>
<TT><A HREF="http://www.imagicgames.com/destiny.dir/destiny.html">http://www.imagicgames.com/destiny.dir/destiny.html</A></TT>
</BLOCKQUOTE>
<H3><A NAME="DungeonKeeper"><B>Dungeon Keeper</B></A></H3>
<P>
Dungeon Keeper, by Interplay, puts you in the role of a keeper
of a dungeon filled with monsters, traps, and treasure, among
other things. The game is somewhat of a dungeon simulator, where
you are placed in charge of a limited amount of resources and
monsters and must build a dungeon room by room. If you're successful,
you'll be able to bring in new recruits and continue to fight
off parties of adventurers foolish enough to visit.
<P>
The AI in the game makes use of a process called &quot;behavioral
cloning&quot; to learn from the human player's actions. The brains
of the monsters themselves come from hundreds of hours of internal
play by the game designers; every time an interesting trick by
one of the human players proved to be repeatedly successful, it
was incorporated by the designers into the monsters' AI database.
In the network mode, you can even allow the game to run in the
background and let the AI manage the hiring of monsters and placement
of rooms and traps, solely based on information the game has learned
from watching the player.
<P>
Dungeon Keeper claims to possess the &quot;most sophisticated
monster AI of any game yet,&quot; with each monster having roughly
1500 bytes dedicated to AI and personality statistics. By comparison,
the AI for each character in Populous used 48 bytes. Monsters
that are hurt will feel pain and try to run away, and monsters
that can smell will use this ability to track players and lead
other monsters to where the players are hiding.
<P>
For the latest information about Dungeon Keeper, check out Interplay's
Web site at
<BLOCKQUOTE>
<TT><A HREF="http://www.interplay.com/website/homepage.html">http://www.interplay.com/website/homepage.html</A></TT>
</BLOCKQUOTE>
<H3><A NAME="GrandPrixII"><B>Grand Prix II</B></A></H3>
<P>
According to <I>pc Review</I>, Grand Prix II, by Microprose, has
computer-controlled drivers with AI based on real drivers from
the sport. Each driver has a personality that determines its driving
style. Cut off an aggressive driver, and you'll likely get side-swiped
in revenge. The intention is to give the game more of a feel for
true racing strategy, which often comes from having to deal with
the many different personalities behind the wheel of each car.
<P>
For more information about Grand Prix II, stop by Microprose's
Web site at
<BLOCKQUOTE>
<TT><A HREF="http://www.holobyte.com/mpshp.html">http://www.holobyte.com/mpshp.html</A></TT>
</BLOCKQUOTE>
<H2><A NAME="AIResourcesontheWeb"><B><FONT SIZE=5 COLOR=#FF0000>AI
Resources on the Web</FONT></B></A></H2>
<P>
To keep up with the latest trends in AI, along with finding out
information about traditional areas of AI research, check out
some of the Web sites listed in the following sections.
<H3><A NAME="WorldWideWebVirtualLibrary"><B>World Wide Web Virtual
Library</B></A></H3>
<P>
Figure 15.3 shows the AI Web page in the World Wide Web Virtual
Library, which is located at
<P>
<A HREF="f15-3.gif" ><B>Figure 15.3 : </B><I>The Artificial Intelligence page in the World Wide Web Virtual Library.</I></A>
<BLOCKQUOTE>
<TT><A HREF="http://www.cs.reading.ac.uk/people/dwc/ai.html">http://www.cs.reading.ac.uk/people/dwc/ai.html</A></TT>
</BLOCKQUOTE>
<P>
This Web page contains many useful links to other AI sites on
the Web, including research projects at universities and archived
messages from news groups.
<H3><A NAME="TheUniversityofChicagoAILab"><B>The University of
Chicago AI Lab</B></A></H3>
<P>
Figure 15.4 shows the University of Chicago Artificial Intelligence
Lab Web site, which is located at
<P>
<A HREF="f15-4.gif" ><B>Figure 15.4 : </B><I>The Artificial Intelligence Lab Web site at the University of Chicage.</I></A>
<BLOCKQUOTE>
<TT><A HREF="http://cs-www.uchicago.edu/html/groups/ai">http://cs-www.uchicago.edu/html/groups/ai</A></TT>
</BLOCKQUOTE>
<P>
This Web site contains some interesting AI projects in the works
at the University of Chicago. Although little of the information
is directly related to AI in games, this is nevertheless a very
neat site to gather more general information about AI and how
it is being used.
<H3><A NAME="MachineLearninginGames"><B>Machine Learning in Games</B></A>
</H3>
<P>
Figure 15.5 shows the Machine Learning in Games Web site, which
is located at
<P>
<A HREF="f15-5.gif" ><B>Figure 15.5 : </B><I>The Machine Learning in Games Web site.</I></A>
<BLOCKQUOTE>
<TT><A HREF="http://forum.swarthmore.edu/~jay/learn-game">http://forum.swarthmore.edu/~jay/learn-game</A></TT>
</BLOCKQUOTE>
<P>
This Web site contains a wealth of information about how to make
games learn. There are many links to current projects, including
algorithms and source code. You might also be able to hook up
with some people at this site for more advanced questions and
ideas.
<H3><A NAME="BibliographyonMachineLearninginStra"><B>Bibliography
on Machine Learning in Strategic Game Playing</B></A></H3>
<P>
Figure 15.6 shows the Bibliography on Machine Learning in Strategic
Game Playing Web site, which is located at
<P>
<A HREF="f15-6.gif" ><B>Figure 15.6 : </B><I>The Bibliography on Machine Learning in Strategic Game Playing Web time.</I></A>
<BLOCKQUOTE>
<TT><A HREF="http://www.ai.univie.ac.at/~juffi/lig/lig.html">http://www.ai.univie.ac.at/~juffi/lig/lig.html</A></TT>
</BLOCKQUOTE>
<P>
This is another site with a lot of useful information regarding
learning in games. If you're interested in this topic at all,
be sure to check it out; it has lots of interesting stuff.
<H2><A NAME="Summary"><B><FONT SIZE=5 COLOR=#FF0000>Summary</FONT></B></A>
</H2>
<P>
Today you took a step back from the business of hacking Java code
and learned some of the basic theory behind artificial intelligence
and how it applies to games. You learned about the three fundamental
types of game AI (roaming, behavioral, and strategic), along with
how they are used in typical gaming scenarios. You even learned
about some of the more advanced AI techniques being used in the
latest commercial games. Finally, you finished up today's lesson
with a few useful Web sites for furthering your knowledge of AI.
<P>
As a game programmer with at least a passing interest in AI, your
AI knowledge will likely grow a great deal as you encounter situations
where you can apply AI techniques. After you get comfortable with
implementing the basics, you can move on to more advanced AI solutions
based on prior experience and research on the Web. I hope today's
lesson at least provided you with a roadmap to begin your journey
into the world of the computer mind.
<P>
Now, if you think I'm going to discuss all this AI theory and
then leave you hanging in regard to a real game that uses it,
you are sorely mistaken. In tomorrow's lesson, you learn how to
build a Connect4 game, complete with a computer player that uses
a strategic AI strategy similar to what you learned about today.
<H2><A NAME="QA"><B><FONT SIZE=5 COLOR=#FF0000>Q&amp;A</FONT></B></A>
<BR>
</H2>

<TABLE>
<TR VALIGN=TOP><TD WIDTH=50><B>Q</B></TD><TD><B>Everyone acts like computers are so smart, but now you make it sound like they're dumb. What gives?</B>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=50><B>A</B></TD><TD>Computers, in fact, are very &quot;dumb&quot; when it comes to what we humans refer to as free thought. However, computers are very &quot;smart&quot; when it comes to mathematical calculations and algorithms. 
The trick with AI is to model the subtleties of human thought in such a way that the computer can do what it's good at, executing mathematical calculations and algorithms.
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=50><B>Q</B></TD><TD><B>Are the three fundamental types of game AI the only choices I have when adding AI to games?</B>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=50><B>A</B></TD><TD>Absolutely not; the AI types you learned about today are simply three of the most popular types I've encountered in games. By all means, explore and build on these strategies to come up with AI solutions that 
more closely fit your own particular needs.
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=50><B>Q</B></TD><TD><B>If my game is designed to have only human players, do I even need to worry with AI?</B>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=50><B>A</B></TD><TD>Even though games with all human players might appear to not require any AI at first, it is often useful to control many of the background aspects of the game using simple AI. For example, consider a two player 
head-to-head space battle game. Even though you might not have any plans for computer ships, consider adding some AI to determine how the environment responds to the players' actions. For example, add a black hole near the more aggressive player from time 
to time, providing that player with more hassles than the other player. Although the intelligence required of a black hole is pretty weak by most AI standards, it could still use a simple chase algorithm to follow the player around.
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=50><B>Q</B></TD><TD><B>Is it difficult to implement strategic AI?</B>
</TD></TR>
<TR VALIGN=TOP><TD WIDTH=50><B>A</B></TD><TD>Yes and no, depending on the particular game. If you're talking about adding AI to simple board games, then it isn't usually very difficult. As a matter of fact, you'll see this firsthand in tomorrow's lesson. 
However, once you broaden the context of strategy games to include complex strategic simulations, implementing strategic AI can get very messy.
</TD></TR>
</TABLE>
<P>
<TEXT>
<H2><A NAME="Workshop"><B><FONT SIZE=5 COLOR=#FF0000>Workshop</FONT></B></A>
</H2>
<P>
The Workshop section provides questions and exercises to help
you get a better feel for the material you learned today. Try
to answer the questions and at least think about the exercises
before moving on to tomorrow's lesson. You'll find the answers
to the questions in appendix A, &quot;Quiz Answers.&quot;
<H3><A NAME="Quiz"><B>Quiz</B></A></H3>
<OL>
<LI>What are the three types of roaming AI?
<LI>How does behavioral AI work?
<LI>What is one of the most difficult aspects of implementing
strategic AI?
<LI>Why are we only now beginning to see commercial games exploit
advanced AI strategies?
</OL>
<H3><A NAME="Exercises"><B>Exercises</B></A></H3>
<OL>
<LI>Stop by some of the AI Web sites mentioned today and explore
what else is out there in the world of AI.
<LI>Play some games with computer opponents and see whether you
can tell which type of AI approach is being used.
<LI>Do some research on primal responses in animals, particularly
insects, and develop a behavioral model based on this information.
<LI>Stop by some of the game Web sites mentioned today to find
out more about the specifics of the AI used.
</OL>
<P>
<HR WIDTH="100%"></P>

<CENTER><P><A HREF="ch3gla.htm"><IMG SRC="pc.gif" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="index.htm"><IMG SRC="hb.gif" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="#CONTENTS"><IMG SRC="cc.gif" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="ch16.htm"><IMG 
SRC="nc.gif" BORDER=0 HEIGHT=88 WIDTH=140></A></P></CENTER>

<P>
<HR WIDTH="100%"></P>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -