n00b AI questions
Hi all,
I am currently working my way through the ''AI techniques for game programming'', after just putting together my 3d engine. It seems like a great book and is very well written, but I see a lot of messages on the board about finite state machines, that don''t seem to be covered in the book.
Can someone explain quickly what they are and how they fit into the genetic algorithm/neural network side of AI? Do they work hand in hand, or are FSM''s a completely seperate solution? Are they the same thing as non-determanistic finite automata?
Also, on the subject of neural nets it seems so far in the book that all neurons in a level connect to each neuron in the next level right up to the output node. Is this normal for a neural network? Once the network has been trained, can connections with a weight of zero be broken to allow for quicker processing?
Thanks all, this is a very fascinating subject.
Regards
Rael
*he he he*
Finite State Machines (fsm) are the lowest form of "ai."
*grin* No neural nets, no genetic algos, no inteligence
FSMs are the good ol'' standby ai that is if - then - else blocks
ie
-----
if(me.pain > 5)
if(me.health > 50)
me.setState(ATTACK_NEAREST_ENEMY)
else
me.setState(RUN_LIKE_HECK)
else
if(me.health < 50)
me.setState(LOOK_FOR_ITEMS)
else
me.setState(LOOK_FOR_TROUBLE)
-----
*grin*
get it - it''s what many of the old school games used
basically, in your main game loop, when you''d process enemy movement and such, you''d have them do something based upon what state they were in.
That''s about it!
(link)
http://ai-depot.com/FiniteStateMachines/
I''ve never read the article I just plugged, but it looks like a good starting (and maybe ending?) point.
Found it searching for "finite state machine ai" on www.google.com
-Michael
Finite State Machines (fsm) are the lowest form of "ai."
*grin* No neural nets, no genetic algos, no inteligence

FSMs are the good ol'' standby ai that is if - then - else blocks
ie
-----
if(me.pain > 5)
if(me.health > 50)
me.setState(ATTACK_NEAREST_ENEMY)
else
me.setState(RUN_LIKE_HECK)
else
if(me.health < 50)
me.setState(LOOK_FOR_ITEMS)
else
me.setState(LOOK_FOR_TROUBLE)
-----
*grin*
get it - it''s what many of the old school games used
basically, in your main game loop, when you''d process enemy movement and such, you''d have them do something based upon what state they were in.
That''s about it!
(link)
http://ai-depot.com/FiniteStateMachines/
I''ve never read the article I just plugged, but it looks like a good starting (and maybe ending?) point.
Found it searching for "finite state machine ai" on www.google.com
-Michael
Ah, cool, ty. I have read about this, but it was just called ''Rule Based AI''. I guess there are a few interchangable terms.
Thanks
Thanks
(oops, I think that by adding that threshold value of >5 and <50 stuff I turned the thing into a FuSM (fuzzy state machine))
Anyway, I''m sure you can make more complicated links than what I''ve shown but basically they''re supposed to be a very definite state ai, unless you make a non-deterministic fsm...
I haven''t read about them though, perhaps you though in some psuedo random numbers into a "fuzzy" value for switching to different states?
Anyway, there''s the info I have on ''em
-Michael
(btw, other than the previously given states, you might also include some "DEAD" state or something, and just don''t update the guy, but keep him around to render him or something)
Anyway, I''m sure you can make more complicated links than what I''ve shown but basically they''re supposed to be a very definite state ai, unless you make a non-deterministic fsm...
I haven''t read about them though, perhaps you though in some psuedo random numbers into a "fuzzy" value for switching to different states?
Anyway, there''s the info I have on ''em
-Michael
(btw, other than the previously given states, you might also include some "DEAD" state or something, and just don''t update the guy, but keep him around to render him or something)
And with proper application of fuzziness or Bayesian Updating (hopefully not considered the lowest forms of "ai") - for example - you can get good results from FSMs in your games - you can quite easily make them less deterministic. Just because a finite state machine is deemed a "low" implementation of AI in game programming, it doesn''t make it any less valid a technique to use.
No, of course not.
I know I sounded like I was down on FSM, but I just thought it was funny that he wasn't familiar with the term even though he's done a fair bit with other ai applications.
I think Quake 1 and 2's AI was fsm (could be wrong though)
(EDIT: they seem to be, see http://ai-depot.com/GameAI/Wolfenstein.html
for some good information)
and just thinking as I talked in my last post I was seeing all sorts of cool applications you could make in fsm that would be great for any medium basic game AI.
If you want your characters in your game (or program or whatever) to "learn" the solution though, fsm won't do that. Other ai techniques are good for that.
fsm won't mold easily to a player's differences in playing the game either - you'll usually (as a player) be able to learn how to beat them, and beat them every time that way.
Anyway, Raeldor, just wanted to mention, it looks like you have similar interests as me - tell me, have you ever had an interest in lighting calculations?
-Michael
[edited by - Thr33d on September 4, 2003 6:25:42 PM]
I know I sounded like I was down on FSM, but I just thought it was funny that he wasn't familiar with the term even though he's done a fair bit with other ai applications.
I think Quake 1 and 2's AI was fsm (could be wrong though)
(EDIT: they seem to be, see http://ai-depot.com/GameAI/Wolfenstein.html
for some good information)
and just thinking as I talked in my last post I was seeing all sorts of cool applications you could make in fsm that would be great for any medium basic game AI.
If you want your characters in your game (or program or whatever) to "learn" the solution though, fsm won't do that. Other ai techniques are good for that.
fsm won't mold easily to a player's differences in playing the game either - you'll usually (as a player) be able to learn how to beat them, and beat them every time that way.
Anyway, Raeldor, just wanted to mention, it looks like you have similar interests as me - tell me, have you ever had an interest in lighting calculations?

-Michael
[edited by - Thr33d on September 4, 2003 6:25:42 PM]
I have an interest is pretty much all things gamedev related, but limited time will probably ensure that lighting calculations will be pretty low on the priority list. I am trying to write a small MMORPG (http://www.valcian.com, http://terraformer.valcian.com), so functionality will rule over asthetics for the near future ;-)
Rael
Rael
Your example was, for the most part, a FSM. The difference is, each state has it''s own code to process and the branches you specified are simply the transitions from state to state. Therefore, you could have states such as wait, attack, run, search, die, etc. If you are in the wait state and you detect an enemy, you could possibly switch to attack or run. While in attack, you could switch to run, die, or wait (if there were no more enemies). The if-thens or some other method (random die rolls) can be used to trigger the transitions.
Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"
Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"
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!"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement