Author Topic: Base the rules on fuzzy logic?  (Read 1665 times)

Seytra

  • Forum Addict
  • *
  • Posts: 2052
  • No system can compensate lack of common sense.
    • View Profile
Base the rules on fuzzy logic?
« on: July 12, 2004, 05:21:22 pm »
Hi all!

It might be a good idea to fiddle with the rules while it\'s still pre-alpha. A decent amount of work based on the rules will probably have been done already, but not as much as in an alpha or even beta.

While posting in another thread it just occured to me that the problem that seems to bo most troublesome, at least for magic, is the failure/success relation. It must be predictable and also unpredictable at the same time. It must also be different for each individual, but not too different so it\'s still fair.

Therefore, it _might_ be useful to consider the use of fuzzy logic for this kind of rules. This most likely hasn\'t been thought of because fuzzy logic isn\'t feasible in traditional RPGs, from which MMORPGs originate, and also because it\'s a rather new field. Still, it has already proven it\'s value in industrial applications so it might be a solution for the gaming world as well. Maybe it has been used in AI engines already, and in this way might help the NPCs, but it could maybe also be used in the rules themselves. Of course, there first would need to be someone who actually knows how to implement that stuff.

I\'m saying \"might\", because I\'m nowhere near to being an expert on fuzzy logic so I can\'t really assess it\'s potential here, but only can talk from what I\'ve seen it do.

Just an idea.
« Last Edit: July 12, 2004, 05:23:20 pm by Seytra »

druke

  • Hydlaa Notable
  • *
  • Posts: 965
    • View Profile
(No subject)
« Reply #1 on: July 12, 2004, 05:56:35 pm »
could you elaborate on what fuzzy logic is


my how times have changed.....

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #2 on: July 12, 2004, 06:08:53 pm »
The basic idea behind fuzzy logic is that instead of having statements like this:

IF blah > 0.5 THEN doOneThing
IF blah <= 0.5 THEN doATotallyDifferentThing

it\'s a little more like this:

IF blah is high THEN doOneThing
IF blah is low THEN doATotallyDifferentThing

but in the fuzzy logic case, the two outputs are combined, for instance if blah was considered \"60% high\" and \"10%\" low (and something in the middle) then the output would be a mix of doOneThing and doATotallyDifferentThing.


Fuzzy logic is better suited for discovery of existing system rules and expression of \"intuitive\" rules in control systems or expert systems.  It might be suitable for the AI, but the failure/success of a magic system is probably best left to random number generators & complex formulas.
Quidquid latine dictum sit, altum sonatur.

Seytra

  • Forum Addict
  • *
  • Posts: 2052
  • No system can compensate lack of common sense.
    • View Profile
(No subject)
« Reply #3 on: July 12, 2004, 06:21:44 pm »
Edit: drfyer, you beat me. :)

\"Fuzzy logic\" is usually referring to a way of creating results not based on an equation or even a set of equations, but to base it on a set of \"rules\". These rules are defined like real-world rules.
A simple example is the classification of tomatoes based on color:

green - red - dark red

corresponds to ripeness
not ripe - ripe - overly ripe

seems simple. However, the rules are not either-or, nor are they mutually exclusive. Therefore,
- every rule may or may not be met _simultaneously_, to a varying degree, as defined in the rule truth and
-  the result may take into account the different rules to varying degrees, maybe also depending on the actual fulfillment of the rules.

The tomato might be \"somewhat green\", i.e. 20% green, and also \"mostly red\" (75% red), and maybe even \"slightly dark\" (5% dark red). The system would maybe evaluate the ripeness of this tomato to \"ripe\", with a sureness of maybe 95%.

This still looks like simple number comparison, but due to the rule bases it\'s much more easy to define \"shades\", both in terms of output and input; it\'s more easy to define what\'s going to happen \"inbetween\" the usual states.

You can compare it to a large set of input vs. output tables that get combined by another set of tables and so on.

This is most likely the worst explanation of this subject that has ever been given, though.

Therefore, here is a better explanation to be downoaded (pdf format):

http://www.minco.com/site/wordpdf/pdf00201-fuzzy.pdf
« Last Edit: July 12, 2004, 06:23:47 pm by Seytra »

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #4 on: July 12, 2004, 06:40:20 pm »
I suppose that fuzzy-style rules could determine the outcome, but I don\'t think traditional fuzzy output combining would work so well (i.e. do we want spells that are \"very successful\" with \"a little backlash\"?)  I think we\'d probably want to have some hard thresholds, below which we\'d ignore any backlash value generated by the system.

The beauty of fuzzy logic, though, is that it is very robust as you tack on or remove rules, it doesn\'t suddenly behave in an unstable fashion. This lends itself to tweaking (especially for AI) very well, so you can suddenly realise what\'s wrong and then drop in a rule or two to compensate without changing the behaviour of the system in other areas too drastically.
Quidquid latine dictum sit, altum sonatur.

Seytra

  • Forum Addict
  • *
  • Posts: 2052
  • No system can compensate lack of common sense.
    • View Profile
(No subject)
« Reply #5 on: July 12, 2004, 06:48:12 pm »
Well, you don\'t _have_ to overlap the rules (also, they don\'t need to be triangular AFAIR). Also, if you define the rulesets \"properly\" (i.e. to do what you want :) ), you can create \"pure\" regions like an \"absolutely perfect\" spell. But I think it would be really nice to also be able to have the outcome you described, because this thing can actually happen. I mean, a knight can do a really good blow but still stretch a muscle while doing it...
This system would automatically implement the variations that we struggle to mount on top of the conventional system.
« Last Edit: July 12, 2004, 06:50:58 pm by Seytra »