Architecture for Intelligent Agents in Softimage
Introduction:
In artificial intelligence, an intelligent agent (IA) is an autonomous entity which observes and acts upon an environment (i.e. it is an agent) and directs its activity towards achieving goals (i.e. it is rational).
(Russel et al., 2003) Intelligent agents may also learn or use knowledge to achieve their goals and may be composed of several components (e.g. physical representation, sensors, logic, … etc).
Figure 1 demonstrates the concept of intelligent agent.

Figure 1: Simple Agent
As the concept of intelligent agents is coming more popular, it is extended to DCC packages (e.g. Softimage).
As a result, several middleware frameworks are developed for implementing agents for 3D applications.
Some of them already have the native agent architecture where its logic is packaged as one entity with other properties (e.g. 3D shape).
However, these frameworks are usually specialized for specific tasks (e.g. crowd simulation) and they are not capable of representing general agents with complex behaviours.
To overcome this limitation, the logic has to be implemented externally where the logic is coded as part of the framework and not an asset related to the agent itself.
This type of architecture is flexible for defining the logic but unfortunately it does not permit the natural representation of the 3D agents because its components are not packed together as a single entity,
instead each component is defined as a separate input.
In this article, an alternative architecture for agents will be presented that is flexible enough to implement any custom logic and push towards having complete entity.
This packaged entity encapsulates all agents’ properties including physical properties (e.g. 3D shape, material, etc.) and psychological properties (e.g. logic, ability to learn, …etc) as a single asset to the system.
As a result, the proposed architecture provides the native agent representation as in middleware frameworks and at the same time overcomes their limitations of solving specific tasks.
The following section explains the proposed architecture.
Next section introduces an existing framework that is developed based on this architecture (The ICE-Planner) as a case study for the proposed architecture,
and the last section summarizes the article.
3D Agent Architecture:
In this section an alternative architecture for representing intelligent agents in DCC packages is explained.
The proposed architecture is shown in comparison to classical architecture in Figure 2:
 |  |
| (a) | (b) |
Figure 2: Comparison between the (a) classical architecture and (b) the proposed architecture.
The classical architecture presented in Figure 2 (a) shows the system that can be composed of several core classes
(e.g. multi-agent coordinator, planner, IK-Solver, etc.).
For agents, additional classes are added to the system for defining their logic. For completing the agent definition, external data sets (e.g. Visual Geometry, Collision Geometry, etc.) are accessed as inputs for the system.
On the other hand, Figure 2 (b) shows the proposed architecture where the system only contains the core classes,
while any other components related to the agent itself including its logic are packed together as one asset to the system.
This asset contains everything necessary to define the agent. Additionally this asset is able to communicate with the system through events/actions.
As shown, the proposed architecture in Figure 2 (b) represents the nature of agents more than the classical architecture in Figure 2 (a).
However this new architecture comes with implementation challenges that need to be addressed before having this architecture applied in a practical framework.
As an example, a flexible file format is needed that is capable of containing different data sets (e.g. 3D data and logic code).
Additionally, the logic code needs to be interpreted by the system. This means an online compiler is needed.
ICE-Planner:
To present the previous architecture in a real application, a framework for 3D agents is discussed in this section.
This framework is part of the Intelligent Construction Equipment Planner (ICE-Planner).
ICE-Planner is a complete system for simulating autonomous robots in general and construction equipment specifically (Bahnassi, H., 2010).
The system is implemented for Softimage and it is used for motion planning different types of construction cranes (tower and hydraulic cranes).
3D agents in this system are used to represent construction equipment as autonomous robots with different structures and logics.
To implement 3D agents in the ICE-Planner, the proposed architecture is used.
As mentioned previously, implementing this architecture implies two main challenges.
The first one is being able to store all data sets as one unit.
To achieve this in Sofimage, 3D models with custom properties are used to represent all data sets for the agent.
Figure 3 shows snap shot from the explorer in Softimage with all the agent components.

Figure 3: 3D agent components in Softimage
The second challenge for this architecture was interoperating the logic that is included in the agent model.
To achieve this in Softimage, the internal scripting engines for Jscript/Vbscript/Python were used to run the logic code attached to the 3D model.
This concept was first introduced in (Bahnassi H., 2006).
Unfortunately, this implementation was not sufficient for the ICE-Planner because of performance issues.
Logic code was computationally heavy and called frequently, thus relaying on scripting languages was not acceptable for the performance.
To solve this issue, a C++ and C# compiler were implemented inside Softimage to compile the attached logic code.
Figure 4 shows a snapshot of the attached C# code on one of the agents.

Figure 4: Snapshot for the C# code defined for the robot in Softimage
Case Study:
In this section the concept of one of the agents that were implemented in the ICE-Planner will be explained as a case study.
The selected agent is the engineering agent. This agent is responsible of validating the decisions of motion planning solver.
This validation is required to ensure static and stability of the equipment along the entire length of the path.
The validation process is based on solving equilibrium equations for each configurations proposed from the planning solver.
Taking cranes as an example, the static equilibrium equations as shown in the Figure 5:

Figure 5: Static equilibrium for a crane
For commercial cranes, this process can be simplified by replacing the equilibrium equations with working ranges and load charts.
Working ranges show the minimum and maximum boom angle according to the length of the boom and the counterweight.
Load charts give the lifting capacity based on the boom length, boom angle to the ground and the counterweight.
These data of engineering constraints are all stored in databases that can be accessed later by the agent to validate the planner decision.
Conclusion:
In this article, a new architecture is presented for implementing 3D intelligent agents.
The new architecture is compared to the classical one and highlighted implementation challenges.
A case study for the proposed architecture is presented from an existing system the ICE-Planner and described who the implementation challenges are handled.
Acknowledgements:
Thanks for Wessam Bahnassi who implemented the internal C++ compiler for Softimage and proof read the article.
References: