Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
fsmbot [2010/04/04 01:53] honza Added info about flow of state |
fsmbot [2010/04/04 02:03] honza Fomating fixes |
||
---|---|---|---|
Line 71: | Line 71: | ||
===== Pros ===== | ===== Pros ===== | ||
- | * Reusability, | + | |
- | * Isolated testing, it is quite easy to test each state or transition separately | + | * Isolated testing, it is quite easy to test each state or transition separately |
- | * No more spaghetti code, where you wonder what cause bot to bang its head against the wall | + | * No more spaghetti code, where you wonder what causes your bot to bang its head against the wall |
===== Cons ===== | ===== Cons ===== | ||
- | * FSMs are great for small and simple bots (up to 10-15 states)__[at least that is what I have been told]__, but as number of states increases, so does number of transitions that have to be maintained. Upper bound is (num of states)^2. Use of hiearchy can mitigate this up to certain degree, e.g. CTF bot can have three roles FlagTaker, Hunter and Defender with defined transitions between them. Simple FSM. Of course every role has its FSM that has much more limited scope. | + | |
===== Where can I get it? ===== | ===== Where can I get it? ===== |