Home | Rules and Guide | Sign In/Create Account | Write a Post | Reddit | #LD48 | #ludumdare on irc.afternet.org (Info)

Ludum Dare 29 — April 25th-28th Weekend [9 PM EST] — Theme: ??? (Theme Voting!)
  • Ludum Dare 29 Compo (48 Hour+Solo+Scratch+Src) Begins: in 16 hours, 50 minutes, 56 seconds
  • Ludum Dare 29 Jam (72 Hour+Teams OK+Relaxed) Begins: in 16 hours, 50 minutes, 57 seconds
  • [ MiniLD 50 | Warmup Weekend | Real World Gatherings | Ludum Deals | Wallpaper ]


    Fuzzy logic “Fuzzy Associative Memory” Ruby gem released

    Posted by
    June 27th, 2013 9:59 am

    A Fuzzy Associative Memory (FAM for short) is a Fuzzy Logic tool for decision making. Fuzzy logic FAMs are highly applicable in Game AI.

    A Fuzzy Associative Memory uses Fuzzy Sets to establish a set of linguistic rules , e.g.:

    • “If the orc’s hit points are a little low, retreat from the enemy”
    • “If the enemy is distant and my rocket ammo is low, the rocket launcher is a poor choice”
    • “If the enemy is near and my shotgun ammo is okay, the shotgun is a very desirable choice”
    • “If the ship is off course by a little bit, correct just a little to the right”
    • “If the bird is much slower than the flock, speed it up a lot”

    The linguistic rules, and the fuzzy sets they contain, are defined by a human “expert” (presumably, you). That is to say, the rules¬†codify intelligence¬†and map this knowledge from the human domain to the digital.

    After the rules are defined, a FAM is consulted to help your AI make a descision:

    • The orc retreats, attacks, strafes.
    • The ship launches long range missiles or fires short range guns.
    • The control rods are lowered into the reactor or raised out of it.

    As you can see, the fuzzy rules are deliberately vague and use qualifiers like “a little” and “a lot”. Furthermore, the lines between fuzzy sets are intentionally blurry. This is the nature of fuzzy sets; they capture such human fuzziness in a way that extracts highly natural behavior from the fuzzy rules. When defining these rules, it helps to imagine interviewing a bona fide expert in the domain and writing down the skills necessary to be successful in the domain.

    Learn more, and get the Ruby Gem for your own game:

    https://github.com/cpowell/fuzzy-associative-memory

    Tags: , , ,

    Leave a Reply

    You must be logged in to post a comment.


    All posts, images, and comments are owned by their creators.

    [cache: storing page]