• 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
  • entries
  • comments
  • views

My Study on Fuzzy Logic

Sign in to follow this  
Followers 0
Tutorial Doctor


So, someone recently (perhaps accidentally) introduced me to the term "fuzzy logic," and this is what I have been looking for! I am having a sort of hard time wrapping my head around how it works exactly, because I have only been using Boolean logic. However, since I am new to programming, I am not set in my ways, so I can retrain myself easier.

And I am very glad that I was introduced to this sooner than later. Right now I have been trying to implement fuzzy logic, but I quickly found myself reverting back to Boolean logic, or using some sort of probability. I just found the perfect documentation of fuzzy logic, and I am going to read this first. I will update my findings here, for anyone who might be interested.


Sign in to follow this  
Followers 0


I finally have some progress on getting to implementing this fuzzy logic. I had to find a formula for getting the degree of membership of a single value (non-fuzzy) easily.


on a scale of 10 to 100 where 10 is cold and 100 is hot:

55 degrees is given as degree .5 in the set.

That means it is halfway between the minimum temperature and the maximum temperature.

If the word "warm was given the range of 60 to 100 degrees, then the membeship of warm is given as:


This means that all values greater than .55 and less than 1 are considered warm.

In reality, I would use temperatures 75-85.

Share this comment

Link to comment

I finally have an implementation that can fuzzify a range of values from a minimum number to a maximum number as a string. For this example I used the Codea app on the iPad.

-- Fuzzy logic


--draw a horizontal line from minimum to maximum, and make the "value" a point on the line, lifted "degree" units up from te line.
--This will look like a triangle

function setup()
   x1 = x
   y1 = y
   x2 = x + value
   y2 = x2 

  function fuzzify(min,max,condition) 
       if value > min and value < max then
           return condition

function draw()
   membership = (value-min)/(max-min) 
   stroke(210, 255, 0, 255)


It also prints the value of the membership of the chosen value (not quite as a fuzzy member... yet.)


Share this comment

Link to comment

Okay, I am coming up with so many examples of how fuzzy logic can be used:

These prices are ridiculous!:

Today I was looking at the prices on a menu and I said to myself "These prices are getting ridiculous!"

What I was really saying is that "The prices are getting closer to my idea of a high price."

For a rich person, they might not be so ridiculous, but to me (a poor person), they are indeed ridiculous.

If I considred my idea of a ridiculous price for a burger to be 7 dollars, then is a burger that is 6.99 not ridiculous?

Instead, I would consider my idea of ridiculous to be in the range (5,8), with the epitamy of ridiculous being at 7. All else above 8 is still ridiculous, and not even worth mentioning. Or it might fall into another set "insanely ridiculous."

All numbers lower than the min might be classified a something else, same for all numbers above.

The couch is too close to the wall!

What this means is that the distance from the couch to the wall is less than a distance you presume to be "a good distance from the couch to the wall."

You are driving too fast!:

A range of values greater than 7 above the speed limit might be considered fast on a normal road, but on the highway, it depends on the flow of traffic, where even 10 above the speed limit would be considered a little slow.

That gun is dangerous!:

This means that the gun has the potential to decrease your health severely. If perfect health is 100% healthy, then perhaps a gun could do -85% to -100% damage to your health, whereas something that is not as dangerous would do perhaps -10%--20% to your health.

You cut the apple crookedly:

This means that the angle at which you cut the apple is not perpendicular to the surface you are cutting the apple on. But such a cut is impossible anyhow, so it really means that the angle at which you cut the apple is not "close to perpendicular" to the surface you are cutting the apple on. This angle could range from an offset of 90 plus or minus 5 degrees. (85,95).


Share this comment

Link to comment

I have found my first good use for fuzzy logic after looking at a few videos on Problem solving. A really good use for fuzzy logic is in Value Analysis. The following link is a very good video on value analysis, however, it's demonstration on how value is found is not a solid method. He uses words like "good" and "bad" and gives each word a value range, but he doesn't account for the degrees of "goodness" or "badness" which would present more accurate information. Anyhow, this is the video:




Share this comment

Link to comment

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