Looking for a FSM tutorial
Hi
I have been reading a lot about finite state machines and decided to implement a simple one in C++. I stared at my drawings of state diagrams and transitions and tough there must bee an efficient way to write this code, but I can’t figure it out. So please help, is there some helpful tutorials out there?
Either a State pattern (for preprogrammed state machines) or an adjacency list where each element is annotated with the element of the alphabet the FSM accepts that follows the annotated edge (for arbitrary state machines).
---New infokeeps brain running;must gas up!
Found one!
http://www.ai-junkie.com/architecture/state_driven/tut_state1.html
Don't if it’s any good, but I will take a look at it.
http://www.ai-junkie.com/architecture/state_driven/tut_state1.html
Don't if it’s any good, but I will take a look at it.
Magnus242,
I found it very good for the stucture to follow with an FSM. The book, IMO, is excellent as well.
I found it very good for the stucture to follow with an FSM. The book, IMO, is excellent as well.
Quote: Original post by tonyg
Magnus242,
I found it very good for the stucture to follow with an FSM. The book, IMO, is excellent as well.
I'll second that, the book is great!
________________________________pro.gram.mer - an organism that turns caffeine into code
Thanks for your replies!
I will try to use the structure from that tutorial.
Seems like a good start for my AI.
I will try to use the structure from that tutorial.
Seems like a good start for my AI.
Funny this came up...
I was currently thinking about writing a little FSM tutorial myself. I have a gui that lets you create fsms very quickly, not too much set up. They use extensive use of function pointers and whatnot, but you never have to set them up if you use the tool. If there is an intrest I could post the tool with some example files, and if there is a stronger intrest I could go ahead and do the tutorial. I think it's a good state machine overall.
I was currently thinking about writing a little FSM tutorial myself. I have a gui that lets you create fsms very quickly, not too much set up. They use extensive use of function pointers and whatnot, but you never have to set them up if you use the tool. If there is an intrest I could post the tool with some example files, and if there is a stronger intrest I could go ahead and do the tutorial. I think it's a good state machine overall.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement