## 4 The Working Memory  
The first consequence of including a planning system in BICA was the need of increasing the number of layers to accommodate the planning layer and the action layer, so the distance between skills and mission control increases. Furthermore, the ability to address more complex applications requires clarifying and standardizing information flows within a layer and between layers. It is easy to get lost among the explicit connections established in each application.  
At this point, we address the creation of working memory. Traditionally, robot software architects have used whiteboard-based working memories since the earliest implementations of cognitive architectures. Based on our experience in applications for social robots, the requirements of our architecture were:  
* Be able to represent objects, places, people, and the robot itself.
* To be able to relate these elements to each other, both with symbolic (\"is in\" \"near\", \"under\", \"detected person\", \"I see\", \"I want to see\"), and geometric relationships.
* Allow concurrent updates and queries from different components and layers.
* Allow queries about object types and relationships (get all the people who are related to the robot with a link \"I want to talk\").  
We decided to incorporate a working memory in the form of a graph. This representation allows not only to store information but also to relate it. A graph is a set of nodes and arcs between nodes. Both arcs and nodes have a type associated with them. Nodes have a unique identifier and arcs have content that can be symbolic or geometric, Figure 6.  
The planning system has been equipped with a mechanism to synchronize part of the information it contains with the graph. It is configured with the relevant types and predicates to be synchronized. For each relevant instance, add a node in the graph, with the type indicated by the knowledge base. Relevant predicates are added as \"planning\" arcs (green arc in Figure 6), with the predicate as content.  
Perceptual components add the perceived objects, and an arc with symbolic information from the robot, and if possible, an arc with geometric information (pink arc in Figure 6).  
The graph is not only used to share information. We have thought that skills can make their graph to carry out their function:  
* Our visual attention system directs the camera towards the relevant elements at all times. The way to indicate what to look for is by setting arcs with the content \"want_see\" from the robot node to other nodes. The visual attention system, when active, is alert to the creation or destruction of arcs with this content from the robot node.
* Our dialogue system uses the graph to receive what to say or ask, and in the latter case, to show the answer. When the robot must ask about a topic, an arc of type \"dialogue\" and content \"ask: topic\" is created. When you receive the answer, delete this arc and create another one in the opposite direction \"reply: the answer\".
* Our planning system synchronizes a configurable list of predicates and instances with the graph. Each instance added to the knowledge base is added to the graph. Binary predicates can be added to the graph as arcs joining two nodes, and unary predicates are autoarcs.