Decoding and rationalising people’s behaviours