• Advertisement
Sign in to follow this  

Looking for a FSM tutorial

This topic is 4847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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).

Share this post


Link to post
Share on other sites
Magnus242,
I found it very good for the stucture to follow with an FSM. The book, IMO, is excellent as well.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
I'd be interested in a FSM tool/article. I've just done a simple FSM for controlling my program, but will want more complex FSM for the AI of the space ships in my game.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement