Follow our Telegram channel to get notified instantly whenever new books are published.
AI Game Engine Programming 2E – Brian Schwab

This chapter will cover a variant, but fairly far removed version of state machines called fuzzy-state machines (FuSMs). FuSMs are built on the notion of fuzzy logic, commonly defined as a superset of conventional (Boolean) logic that has been extended to handle the concept of partial truths. It should be noted that FuSMs build on this notion, but do not represent actual fuzzy logic systems. While the concept of partial truths is a very powerful notion, FuSMs are much less general in scope than regular FSMs. Like FSMs, FuSMs keep track of a list of possible game states.
But, unlike FSMs, which have a singular current state and then respond to input events by transitioning into a different state, FuSMs instead have the possibility of being in any number of their states at the same time, so there are In This Chapter FuSM Overview FuSM Skeletal Code Implementing an FuSM-Controlled Ship into Our Test Bed Example Implementation Coding the Control Class Performance of the AI with This System Extensions to the Paradigm Optimizations Design Considerations Summary AI Game Engine Programming no “transitions.”
Each state in a fuzzy system calculates an activation level, which determines the extent to which the system is engaged in any given state. The over- all behavior of the system is thus determined by the combination of the currently activated state’s contributions. FuSMs are really only useful for systems that can be in more than one state at a time and have more than simple digital values, such as on or off, closed or open, and alive or dead.
Fuzzy values are more like halfway on, almost closed, and not quite dead. A way of quantifying these kinds of value types is to use a unitary coefficient (a number between 0.0 and 1.0) that represents the condition’s membership to each end state (0.0 == fully off, 1.0 == fully on), although being unitary is not neces- sary to the workings of the FuSM.
It is simply an easy way to not have to remember specific limits on each state’s membership, as well as ensuring ease of comparison between state membership values (both in direct comparison, as well as the multi- plicitive value of a unitary value; you can multiply unitary numbers together and get an average value overall). There is some confusion about what exactly FuSMs are (in the game AI com- munity), because there are several FSM variants that are in the same family as FuSMs.
Content Project Manager: Jessica McNavich Marketing Manager: Jordan Casey Acquisitions Editor: Heather Hurley Copy Editor: Erica Orloff Technical Reviewer: Steven Woodcock CRM Editorial Services Coordinator: Jennifer Blaney Cover Designer: Sherry Stinson CD-ROM Producer: Brandon Penticuff Indexer: Jean Skipp Proofreader: Andrew Jones Compositor: S4Carlisle Publishing Services Printed in Canada 1 2 3 4 5 6 7 12 11 10 09 08 © 2009, Course Technology, a part of Cengage Learning ALL RIGHTS RESERVED.
No part of this work covered by the copyright herein may be reproduced, transmitted, stored, or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopy- ing, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher.
Library of Congress Control Number: 2008938147 ISBN-13: 978-1-5845-0572-3 ISBN-10: 1-58450-572-9 Course Technology 25 Thomson Place Boston, MA 02210 USA Cengage Learning is a leading provider of customized learning solutions with office locations around the globe, including Singapore, the United Kingdom, Australia, Mexico, Brazil, and Japan. Locate your local office at: international. cengage.com/region Cengage Learning products are represented in Canada by Nelson Education, Ltd. For your lifelong learning solutions, visit courseptr.com Visit our corporate website at cengage.com For product information and technology assistance, contact us at Cengage Learning Customer & Sales Support, 1-800-354-9706 For permission to use material from this text or product, submit all requests online at cengage.com/permissions.
Further permissions questions can be e-mailed to [email protected] eISBN-10: 1-58450-628-8 To Harley: Give Lori the strength. To Beluga: I’ll always be sorry, Blue. To Lori: You are the reason, Little Bird. This page intentionally left blank Brian Schwab has officially been in the game industry since 1993.
He got his first “Out of Memory” error two days after he bought his first computer, a Mattel Aquarius (which cost him 6 months of his allowance), when he was 10 years old. This allows him to truthfully state that he has been optimizing game code for over 25 years. He spent almost a year living in Austin, Texas as a homeless man trying to get his first game job. Since then, he has worked at everything from a three-man studio to his current job at Sony Computer Entertainment of America, where he works as an AI/Gameplay Lead Programmer.
He has also worked as a game designer for several products, including Lead Designer on two titles.
This is a short excerpt from the opening of “” by Unknown, quoted for review and introduction purposes. All rights belong to the copyright holders.
Book Information
- Unique ID: 2c6c7a57115eee3e
- File Extension: .pdf
- File Size: 5,018,151 bytes (4.786 MB)
- Title: –
- Author: Unknown
- ISBN: 9781584505723, 2345671211, 1584505729, 1584506288
- Pages: 742
- Language: English (en)
Reading & Word Statistics
- Estimated Reading Time: 1118.24 minutes
- Total Words: 223,648
- Total Characters: 1,476,515
- Average Words per Page: 301.41
- Average Characters per Page: 1989.91
Most Frequent Words
game (2427), games (1424), system (1031), systems (814), player (789), state (764), use (673), ship (564), also (542), behavior (540), engine (493), time (483), like (469), chapter (467), used (447), int (440), within (431), data (423), class (419), one (409), using (406), behaviors (393), programming (390), level (383), many (367), well (363), code (361), function (360), simple (343), way (340), much (338), void (332), new (324), enemy (320), even (318), float (313), human (310), states (308), see (303), set (303), make (294), parent (286), get (278), world (277), usually (274), need (273), different (268), number (266), enemies (263), types (258), scripting (258), type (256), steering (250), elements (248), update (246), fsm (241), message (238), listing (236), character (231), position (230), control (228), object (226), information (225), design (221), another (221), lua (218), point (218), players (216), techniques (214), characters (206), method (205), two (200), back (195), return (193), machines (191), things (190), don’t (190), gameplay (189), given (189), large (189), test (187), implementation (186), run (186), find (185), specific (183), better (182), example (180), want (180), complex (179), require (179), speed (178), problem (177), between (177), list (177), map (174), good (173), machine (172), include (169), instead (168), perception (166).
