Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
fsmbot [2010/04/04 01:38] honza grammar fix |
fsmbot [2010/04/04 01:43] honza Remove promise. |
||
---|---|---|---|
Line 9: | Line 9: | ||
===== Finite state machine bot ===== | ===== Finite state machine bot ===== | ||
- | This extension is a helper for developers of bot logic, | + | This extension is a helper for developers of bot logic, |
- | If you don't know what FSM is, read an article on [[http:// | + | |
The idea is that bot moves from state to state and in every state it has certain job it has to do (e.g. rearm itself, find enemy, heal itself). Once the job is done (bot is healed), it will move to another job(state). Under certain conditions however, it has to stop its job, because more pressing matter has appeared (it is being shot at). So we can see that behavior is basically graph with vertices (jobs/ | The idea is that bot moves from state to state and in every state it has certain job it has to do (e.g. rearm itself, find enemy, heal itself). Once the job is done (bot is healed), it will move to another job(state). Under certain conditions however, it has to stop its job, because more pressing matter has appeared (it is being shot at). So we can see that behavior is basically graph with vertices (jobs/ | ||
Line 73: | Line 72: | ||
===== 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. I am planning to try this and I may share results. | + | * 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? ===== |