Weighted state machine
Would someone mind explaining to me what a weighted state machine is and how it works? I keep trying to visualize it in my head, but I can''t understand how a state machine could function with weights added to the states. Thanks for your help.
I''m working on AI for a tactical sim, and I want to know if the WSM approach would be best (or at least efficient) for this. If you have any examples of how a WSM was (or can be) used in such a game, I''d like to hear about it.
I ran this post by the AI forum, but this forum sees a lot more visitors, so I posted another one here.
GDNet+. It's only $5 a month. You know you want it.
Well I;m kinda guessing, but I can''t see any other way this could be:
Any FSM have a set numbr of states (behavors in this instance) and there are conditions that cuase it to changed states. It is those conditions are that are weighted (not the states themselves which makes no sense). So If we are in the Bezerk sub-state of the attack state, it would be really difficult to switch to the snore sub-state of the Sleeping state, but possible to switch back to Normal Attack, or perhaps to flee. Each possible has a probability attached to it that changes given the conditions, (such as rate of my health decline vs opponents rate of decline).
This way you can through some fuzzy logic in there so that mobs don''t always act the exact same way.
Any FSM have a set numbr of states (behavors in this instance) and there are conditions that cuase it to changed states. It is those conditions are that are weighted (not the states themselves which makes no sense). So If we are in the Bezerk sub-state of the attack state, it would be really difficult to switch to the snore sub-state of the Sleeping state, but possible to switch back to Normal Attack, or perhaps to flee. Each possible has a probability attached to it that changes given the conditions, (such as rate of my health decline vs opponents rate of decline).
This way you can through some fuzzy logic in there so that mobs don''t always act the exact same way.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
November 25, 2000 02:49 AM
The FSM (Finite State Machine) you are describing is usually called a Fuzzy State Machine (or FuSM for short)
Okay, that finally makes sense!
So, would a range of states be the best approach to this method? If a unit were inclined to change states, it would only be able to move one or two states at a time under normal circumstances. Obviously, "give money to target" would be on opposite sides of the spectrum as "sever target''s head."
Of course, changing states should not be handled by probabilities, but rather by conditions. For example, the "flee" state should only be activated if a unit is near death, or has been given an order to flee (direct control of states by a higher ranking agent).
In this sense, would it be best to hard-code conditions, rather than leave state changes in the hands of chance? More input on this is greatly appreciated. I''d like to know what other people have done.
So, would a range of states be the best approach to this method? If a unit were inclined to change states, it would only be able to move one or two states at a time under normal circumstances. Obviously, "give money to target" would be on opposite sides of the spectrum as "sever target''s head."
Of course, changing states should not be handled by probabilities, but rather by conditions. For example, the "flee" state should only be activated if a unit is near death, or has been given an order to flee (direct control of states by a higher ranking agent).
In this sense, would it be best to hard-code conditions, rather than leave state changes in the hands of chance? More input on this is greatly appreciated. I''d like to know what other people have done.
GDNet+. It's only $5 a month. You know you want it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement