Logging will no longer create entries in 'ais' table if they have been deleted by the user.
AI choosing from DB now works with squared probabilities.