Game Your Math Game

Your Math Game Proven Yourmathgame Your Math Game Proven Your Math Game ÓÎÏ·¿ª·¢ÖеÄÈ˹¤ÖÇÄÜ£¨Ó¢ÎÄÓ°Ó¡°æ£© - china-pubÍøÉÏÊéµê

Your Math Game Proven Yourmathgame Your Math Game Proven Your Math Game

Ŀ¼ Proven Øsearch½ Proven ¥ Your Math rsearchv Math n% Proven 3search8%E3%83%9E%E3%82%AF%E3%83%AD%E3%82%B9%E3%83%88%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%AB%E3%83%95%E3%83%AD%E3%83%B3%E3%83%86%E3%82%A3%E3%82%A2+isosearchseac Math E%E3%83%9E%E3%82%AF%E3%83%AD%E3%82%B9%E3%83%88%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%AB%E3%83%95%E3%83%AD%E3%83%B3%E3%83%86%E3%82%A3%E3%82%A2+isoPsearchov%E3%83%9E%E3%82%AF%E3%83%AD%E3%82%B9%E3%83%88%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%AB%E3%83%95%E3%83%AD%E3%83%B3%E3%83%86%E3%82%A3%E3%82%A2+ison Math E Yourmathgame Y Game u Your msearcht Game g Proven m %s Your a Game c Math 2 Your earc Proven As Your ar%E3%83%9E%E3%82%AF%E3%83%AD%E3%82%B9%E3%83%88%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%AB%E3%83%95%E3%83%AD%E3%83%B3%E3%83%86%E3%82%A3%E3%82%A2+isoh3 Your 8 Proven % Math D Game E Your % Game 2searchB9 Proven E Game %3%E3%83%9E%E3%82%AF%E3%83%AD%E3%82%B9%E3%83%88%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%AB%E3%83%95%E3%83%AD%E3%83%B3%E3%83%86%E3%82%A3%E3%82%A2+iso88 Game E Your % Math 3Asearch%search3search8 Your %search4 Your E Game %search2%E3%83%9E%E3%82%AF%E3%83%AD%E3%82%B9%E3%83%88%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%AB%E3%83%95%E3%83%AD%E3%83%B3%E3%83%86%E3%82%A3%E3%82%A2+isoAsearch%E%E3%83%9E%E3%82%AF%E3%83%AD%E3%82%B9%E3%83%88%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%AB%E3%83%95%E3%83%AD%E3%83%B3%E3%83%86%E3%82%A3%E3%82%A2+iso%8% Your B Game E%3%9%E Math % Game 3 Game A Math % Yourmathgame 3%search3 Your B Yourmathgame %search3%search3search86%search3 Your 8 Game %3 Yourmathgame E Your %2 Your A Math + Yourmathgame s%E3%83%9E%E3%82%AF%E3%83%AD%E3%82%B9%E3%83%88%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%AB%E3%83%95%E3%83%AD%E3%83%B3%E3%83%86%E3%82%A3%E3%82%A2+isoü

preface
1. introduction to game ai
deterministic versus nondeterministic ai
established game ai
the future of game ai
2. chasing and evading
basic chasing and evading
line-of-sight chasing
line-of-sight chasing in tiled environments
intercepting
3. pattern movement
standard algorithm
pattern movement in tiled environments
pattern movement in physically simulated environments
4. flocking
classic flocking
flocking example
obstacle avoidance
follow the leader
5. potential function-based movement
.how can you use potential functions for game ai?
chasing/evading
obstacte avoidance
swarming
optimization suggestions
6. basic pathfinding and waypoints
basic pathfinding
breadcrumb pathfinding
path following
wall tracing
waypoint navigation
7. a* pathfinding
defining the search area
starting the search
scoring
finding a dead end
terrain cost
influence mapping
further information
8. scripted al and scripting engines
scripting techniques
scripting opponent attributes
basic script parsing
scripting opponent behavior
scripting verbal interaction
scripting events
further information
9. finite state machines
basic state machine model
finite state machine design
ant example
further information
10. fuzzy logic
how can you use fuzzy logic in games?
fuzzy logic basics
control example
threat assessment example
11. rule-based ai
rule-based system basics
fighting game strike prediction
further information
12. basic probability
how do you use probability in games?
what is probability?
probability rules
conditional probability
13. decisions under uncertainty--bayesian techniques
what is a bayesian network?
trapped?
treasure?
by air or land
kung fu fighting
further information
14. neural networks
dissecting neural networks
training
neural network source code
chasing and evading with brains
further information
15. genetic algorithms
evolutionary process
evolving plant life
genetics in game development
further information
appendix: vector operations
index

¡ýÕ¹¿ªÈ«²¿ÄÚÈÝ

ǰÑԻص½¶¥²¿¡ü

¡¡¡¡Recent advances in 3D visualization and physics-based simulation technology, at both the software and hardware levels, have enabled game developers to create compelling, visually immersive gaming environments. The next step in creating even more immersive games is improved artificial intelligence (AI). Advances in computing power, and in hardware-accelerated graphics in particular, are helping to free up more CPU cycles that can be devoted to more sophisticated AI engines for games. Further, the large number of resources--academic papers, books, game industry articles, and web sites--devoted to AI are helping to put advanced AI techniques within the grasp of every game developer, not just those professionals who devote their careers to AI.
¡¡¡¡With that said, wading through volumes of technical papers, text books, and web sites can be a daunting task for upcoming game AI developers. This book pulls together the information novices need so that they can get a jump-start in the field of game AI development. We present relevant theory on a wide range of topics, which we support with code samples throughout the book.
¡¡¡¡Many general game development books cover AI to some extent, however their treatment of the technology tends to be limited. This is probably because such books have to cover a lot of different topics and cannot go into great depth on any particular one. Although several very good books do focus on game AI (we list many of them in the "Additional Resources" section of this Preface), most of them are geared toward experienced AI developers and they focus on relatively specific and advanced topics. Therefore, novices likely would require companion resources that cover some of the more fundamental aspects of game AI in more detail. Still other books cover some specific game AI techniques in great detail, but are restricted to covering just those techniques.
¡¡¡¡Our book covers a wide range of game AI topics at a level appropriate for novice developers. So, if you are new to game programming or if you are an experienced game programmer who needs to get up to speed quickly on AI techniques such as finite state machines, fuzzy logic, and neural networks, among others, this book is for you.
¡¡¡¡Assumptions This Book Makes
¡¡¡¡Because this book is targeted for beginner game AI developers, we don't assume you have any AI background. We do, however, assume you know how to program using C/C++. We also assume you have a working knowledge of the basic vector math used in games, but we have included a brief vector math refresher in the Appendix in case your skills are a little rusty
¡¡¡¡About This Book
¡¡¡¡We didn't hope to (nor did we attempt to) cover every aspect of game AI in this book; far too many techniques and variations of techniques are used for an even larger variety of game types, specific game architectures, and in-game scenarios. Instead, we present a mix of both deterministic (traditional) and nondeterministic (newer) AI techniques aimed squarely at beginner AI developers. Here's a summary of what we cover:
¡¡¡¡Chapter 1, Introduction to Game AI
¡¡¡¡Here, we define game AI and discuss the current state of the art as well as the future of this technology
¡¡¡¡Chapter 2, Chasing and Evading
¡¡¡¡We cover basic techniques for chasing and evading as well as more advanced techniques for intercepting. We also cover techniques applicable to both tile-based and continuous game environments.
¡¡¡¡Chapter 3, Pattern Movement
¡¡¡¡Pattern movement techniques are common to many video games and developers have been using them since the early days of gaming. You can use these techniques to preprogram certain behaviors such as the patrolling of a guard or the swooping in of a spacecraft.
¡¡¡¡Chapter 4, Flocking
¡¡¡¡The flocking method we examine in this chapter is an example of an A-life algorithm. In addition to creating cool-looking flocking behavior, A-life algorithms form the basis of more advanced group movement.
¡¡¡¡Chapter 5, Potential Function Based Movement
¡¡¡¡Potential-based movement is relatively new in game AI applications. The cool thing about this method is that it can handle chasing, evading, swarming, and collision avoidance simultaneously.
¡¡¡¡Chapter 6, Basic Pathfinding and Waypoints
¡¡¡¡Game developers use many techniques to find paths in and around game environments. In this chapter, we cover several of these methods, including waypoints.
.¡¡¡¡Chapter 7, A* Pathfinding
¡¡¡¡No treatment of pathfinding is complete without addressing the workhorse algorithm of pathfinding; therefore, we devote this whole chapter to the A* algorithm.
¡¡¡¡Chapter 8, Scripted AI and Scripting Engines
¡¡¡¡Programmers today often write scripting engines and hand off the tools to level designers who are responsible for creating the content and defining the AI. In this chapter, we explore some of the techniques developers use to apply a scripting system in their games, and the benefits they receive.
¡¡¡¡Chapter 9, Finite State Machines
¡¡¡¡Finite state machines are the nuts and bolts of game AI. This chapter discusses the fundamentals of finite state machines and how to implement them.
¡¡¡¡Chapter 10, Fuzzy Logic
¡¡¡¡Developers use fuzzy logic in conjunction with or as a replacement for tinite state machines. In this chapter, you'll learn the advantages fuzzy techniques offer over traditional logic techniques.
¡¡¡¡Chapter 11, Rule-Based AI
¡¡¡¡Technically, fuzzy logic and finite state machines tall under the general heading of rules-based methods. In this chapter, we cover these methods as well as other variants.
¡¡¡¡Chapter 12, Basic Probability
¡¡¡¡Game developers commonly use basic probability to make their games less predictable. Such cheap unpredictability enables developers to maintain substantial control over their games. Here, we cover basic probability for this purpose as well as lay the groundwork for more advanced methods.
¡¡¡¡Chapter 13, Decisions Under Uncertainty--Bayesian Techniques
¡¡¡¡Bayesian techniques are probabilistic techniques, and in this chapter we show how you can use them for decision making and for adaptation in games.
¡¡¡¡Chapter 14, Neural Networks
¡¡¡¡Game developers use neural networks for learning and adaptation in games--in fact, for anything from making decisions to predicting the behavior of players. We cover the most widely used neural network architecture, in detail.
¡¡¡¡Chapter 15, Genetic Algorithms
¡¡¡¡Genetic algorithms offer opportunities for evolving game AI. Although developers don't often use genetic algorithms in games, their potential for specific applications is promising, particularly if they are combined with other methods.
¡¡¡¡Appendix, Vector Operations
¡¡¡¡This appendix shows you how to implement a C++ class that captures all of the vector operations that you'll need when writing 2D or 3D simulations.
¡¡¡¡All the chapters in this book are fairly independent of each other. Therefore, you generally can read the chapters in any order you want, without worrying about missing material in earlier chapters. The only exception to this rule is Chapter 12, on basic probability If you don't have a background in probability, you should read this chapter before reading Chapter 13, on Bayesian methods.
¡¡¡¡Also, we encourage you to try these algorithms for yourself in your own programs. If you're just getting started in game AI, which we assume you are if you're reading this book, you might want to begin by applying some of the techniques we present in simple arcade-style or board games. You also might consider programming a bot using extensible AI tools that are increasingly becoming standard for first-person shooter games. This approach will give you the opportunity to try out your AI ideas without having to program all the other non-AI aspects of your game.
¡¡¡¡Conventions Used in This Book
¡¡¡¡The following typographical conventions are used in this book:
¡¡¡¡Plain text
¡¡¡¡Indicates menu titles, menu options, menu buttons, and keyboard accelerators (such as Alt and Ctrl).
¡¡¡¡Italic
¡¡¡¡Indicates new terms, URLs, email addresses, filenames, file extensions, pathnames, directories, and Unix utilities.
¡¡¡¡Constant width
¡¡¡¡Indicates commands, options, switches, variables, attributes, keys, functions, types, classes, namespaces, methods, modules, properties, parameters, values, objects, events, event handlers, XML tags, HTML tags, macros, the contents of files, or the output from commands.
¡¡¡¡Constant width bold
¡¡¡¡Shows commands or other text that should be typed literally by the user.
¡¡¡¡Constant width italic
¡¡¡¡Shows text that should be replaced with user-supplied values.
¡¡¡¡Bold
¡¡¡¡Variables shown in bold are vectors as opposed to scalar variables, which are shown in regular print.
¡¡¡¡Additional Resources
¡¡¡¡Although we attempt to cover a wide range of AI techniques in this book, we realize we can't compress within these pages everything there is to know about AI in game development. Therefore, we've compiled a short list of useful AI web and print resources for you to explore should you decide to pursue game AI further.
¡¡¡¡Here are some popular web sites related to game development and AI that we find helpful:
¡¡¡¡The Game AI Page at > ¡¡¡¡AI Guru at > ¡¡¡¡Gamasutra at > ¡¡¡¡GameDev. net at > ¡¡¡¡AI Depot at > ¡¡¡¡Generation5 at > ¡¡¡¡The American Association for Artificial Intelligence at http'//www, aaai.org
¡¡¡¡Each web site contains information relevant to game AI as well as additional links to other sources of information on AI.
¡¡¡¡Here are several print resources that we find helpful (note that these resources include both game and nongame AI books): pYour Math Game Proven Yourmathgame Your Math Game Proven Your Math Game ÓÎÏ·¿ª·¢ÖеÄÈ˹¤ÖÇÄÜ£¨Ó¢ÎÄÓ°Ó¡°æ£© - china-pubÍøÉÏÊéµê e g Your Math Game Your Math Game Your Math Game wYour Math Game Proven Yourmathgame Your Math Game Proven Your Math Game ÓÎÏ·¿ª·¢ÖеÄÈ˹¤ÖÇÄÜ£¨Ó¢ÎÄÓ°Ó¡°æ£© - china-pubÍøÉÏÊéµê i a Your Math Game Sin Your Math Game