Mind meets machine: Unravelling GPT-4's cognitive psychology