Fuzzy Logic problem
I suggest reviewing any of the following:"
first of all, who said anything about defuzzification? i don't want to defuzzify my vars. i dont want a singleton. i want a fuzzy truth var.
i have 4 fuzzy truth vars: mNotStrategic, mStrategic, mVeryStrategic and mUnbeatable
i want to turn it into: mStrategic. where 0.0 is not strategic and 1.0 is un-beatable. so one fuzzy truth var.
so i can later on ask:
fuzzyIF( AND(mStrategic, mReachable))
{
goThere();
}
to alexjc:
"Keep it simple, get it working.
Write two separate functions, one for high shields and the other for low shields first. Get a feel for the problem. If you're stuck then you've started thinking too complex.
You can also use a lookup table to create a function and interpolate between values, that's one way to implement a response curve."
What do you mean keep it simple get it working? if one function doesn't work to get my job done, then how can to do what i want to achieve?
What do you mean write two seperate functions one for low shields, one for high shields? That would make this a Boolean situation. that would mean that when there are for example 6 shields and then a new one is added, suddenly the strategic value is completely different. i am using fuzzy logic because i need gradual change.
"Get a feel for the problem." Thanks for the info.
"If you're stuck then you've started thinking too complex." So i should give up? No. I'm not thinking too complex. i need a certain behaviour for my AI, and i need a system that get's that done. The only system i can think of is fuzzy logic.
I'm asking you, how can i do it without fuzzy logic, and the only answer i keep getting is "do it without fuzzy logic."
Please, i dont want to waste your time, so if you don't know it, please don't answer.
Quote: Original post by omniscientI gave you an answer, didn't you see my post? If you just want two options (do an action, or don't do it) then do something like:
I'm asking you, how can i do it without fuzzy logic, and the only answer i keep getting is "do it without fuzzy logic."
if (very(or(mUnbeatable, mVeryStrategic))) { // do action} else { // don't do action}
Otherwise, I can't contribute any more to this thread. Not without pasting about 60 pages from my book.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
Quote: Original post by omniscient
What do you mean keep it simple get it working? if one function doesn't work to get my job done, then how can to do what i want to achieve?
[...]
So i should give up? No. I'm not thinking too complex. i need a certain behaviour for my AI, and i need a system that get's that done. The only system i can think of is fuzzy logic.
Listen, dumber people than you have solved this problem in a quarter of the time it took you to write all this in this thread -- and shipped their solutions in AAA games. :)
I'm telling you to keep it simple because you missed about 4 different solutions that people presented in *this* thread alone. Also included in this thread are continuous / fuzzy solutions to the problem (at least 2). So obviously the problem here is your approach to finding the solution. Keeping it simple will allow you to build up your problem solving skills and practical experience with fuzzy logic.
I'll repeat one solution just in case you didn't read: response curves, build them as a hand-crafted function using a lookup table, and create the custom non-linear function you need.
Alex
Join us in Vienna for the nucl.ai Conference 2015, on July 20-22... Don't miss it!
Quote: Original post by alexjc
I'll repeat one solution just in case you didn't read: response curves, build them as a hand-crafted function using a lookup table, and create the custom non-linear function you need.
Alex
Yep. That would nail it right there. I live and breathe on response curves with far more complicated decisions than this - and the simple ones as well.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
I don't understand how I have to use response curves to do this, but i just read about it in game ai wisdom 1. I'm not gonna use it for this particular game, because i'm basically done with the ai. I guess I'll not use fuzzy logic for this kind of thing in the future though.
I think you guys are right that i completely misunderstand the point of fuzzy logic, for what it should be used.
What i was really looking for when i first read about fuzzy logic is a way to globally categorize vars, so that i can compare distance to health etc, in a readable way. i.e. the vars all range from 0 to 1, instead of distance ranging from 0 to 5000, and having an exponentially valued curve, ( meaning the value of sqrt(5000) is 0.5 and the value of 5000 is 1 for example), whereas health has a linnear value. I wanted to be able to readably compare those. I guess fuzy logic isn't the answer?
Anyway. I'll keep reading about response curves, and other techniques.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"