Part of any control system for a robot is a (hopefully straightforward) method of defining which actions happen at different points in a task. The IMA 2.5 StateMachine component is the way we have solved the problem for ISAC.
There were three goals in the creation of the StateMachine component. The first was to make it as easy as possible for the people porting the IMA 1.0 agents to create new state machines in IMA 2.5--which means that all of the abilities of the earlier state machine needed to be easily accessible in the new state machine. The second goal was to make the IMA 2.5 state machine capable of doing more than the previous state machine. The third goal was to make the underlying state machine definition file easy to create automatically, so that those performing Artificial Intelligence research could create programs that could create state machines that could then be used to control the robot.
The first goal was met with some difficulty, but it is now possible to convert an IMA 1.0 state machine into and IMA 2.5 state machine merely by having the IMA 1.0 state machine and a list of function names available.
The second goal was met by having larger flexibility in branching options, and (mainly) by the inclusion of internal variables. Using these variables, it is possible to make ISAC do a particular state a defined number of times or to take different actions based on the success or failure of the last action.
The third goal was met by using the MATLAB add-on Stateflow to create the state machine definition files. Stateflow offers an easy-to-use interface for creating a state machine, and the resulting file can be read as a text file. The state machine component reads and interprets this file. Therefore, any other program (or a human without access to Stateflow) can create a state machine for use by ISAC just by following the same file format.