This paper formalizes the concept of Collective Intelligence (C-I). Application of the Random PROLOG Processor (RPP) has allowed us to model the phenomenon of C-I in social structures, and to define a C-I measure (IQS). This approach works for various beings: bacterial