Active inference and artificial reasoning