An algebra for the manipulation of conceptual spaces in cognitive agents