• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Zukias

Is fuzzy logic much use in programming game AI?

7 posts in this topic

I've read a bit about fuzzy logic in the past few days and it's pretty darn hard to get your head around but i'm getting the hang of it now. And I'm already from a heavy math background at that. But I read an article earlier (here) which uses methods that has similar functionality to fuzzy logic, but seems a lot easier. Is there anything that fuzzy logic can handle which other methods cannot? I am wondering if it's worth studying it in depth (because there's an option to study it for my final year at university) or whether it's redundant in the game programming world, or is it simply criticized because it's hard for people to get their head around it compared to other similar methods out there?

Edited by Zukias
0

Share this post


Link to post
Share on other sites

Thanks for replies, I'm not sure about studying it in depth now. Even if fuzzy logic is slightly better, it'll take much longer to implement.

0

Share this post


Link to post
Share on other sites

Tell the truth, I'd be hard pressed to say what is and what is not fuzzy logic according to a true definition.

Fuzzy logic has quite a clear definition, just like many other areas of AI. Picking weighted random numbers is nothing to do with fuzzy logic and isn't an approximation of it in any sense. In fact there is no randomness involved at all in fuzzy logic. It's not about imprecise or varying outputs, but about being able to specify inputs as continuous ranges or function curves which all contribute some amount towards the output.

Zukias, to answer your question - it's not a technique commonly used in game development, at least in part because it's not always clear to see what effect the inputs will have on the outputs. It's not really hard to understand compared to other AI tools - in fact, I think it's one of the simpler ones, at least if you read about rather than assuming there's randomness involved.
1

Share this post


Link to post
Share on other sites
Looking at the example on wikipedia, this type of logic is actually extremely common in computer graphics.

For example, say we want to assign textures to different parts of a terrain, with grass on flat areas, rock on slopes, and snow on flat areas that are at a high altitude.
Using boolean logic, you'd write something like:
sloped = true/false
highAltitude = true/false
if( !sloped )
  set texture to grass
if( sloped )
  set texture to rock
if( highAltitude && !sloped )
  set texture to snow
However, this produces hard edges between the textures. To get some soft blending in the areas where these values transition from true to false, we can translate that logic over to it's 'fuzzy' version:
sloped = 0..1
highAltitude = 0..1
texture = RGB[0,0,0]
texture = linerInterpolate( texture, grass, 1-sloped )
texture = linerInterpolate( texture, rock,    sloped )
texture = linerInterpolate( texture, snow, min(1-sloped, highAltitude) )
0

Share this post


Link to post
Share on other sites
Yeah, that has similar numerical outcomes to fuzzy logic. But it hard-codes a lot of important aspects of fuzzy logic that are normally open to variation, such as the choice of rules, the shape of each of the functions for each fuzzy rule or 'set', and the way that membership of each fuzzy set is 'defuzzified' into a final value. Normally you'd want to have much more detailed control over what parts of the 0..1 range each of the 3 rules would apply to, and you wouldn't combine the results sequentially like that.

Usually you use fuzzy logic for behaviour rather than just selecting deterministic output values, because the main strength of the method is to allow a designer to supply fairly imprecise rules that apply to the input and get outputs that vary continuously but which are not too divorced from the input rules. The idea then is that the designers can easily tweak those inputs to get the sort of outputs they want, which is great for control systems where the desired values at certain points are known but points in between are not necessarily specified. The interesting part of fuzzy logic is really the form of the input rather than of the output.
0

Share this post


Link to post
Share on other sites

Tell the truth, I'd be hard pressed to say what is and what is not fuzzy logic according to a true definition.

Logic which is 100% defined by mathematical constraints is not fuzzy.
Logic which is 75% to 99% defined by mathematical constraints is not very fuzzy.
Logic which is 'a little bit' to 75% defined by mathematical constraints is moderately fuzzy.
Logic which is defined entirely by conceptual constraints is very fuzzy indeed. Edited by Khatharr
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0