AI: traits relations

Start to implement algorithm.... TBC!