Fixed thresholding

Changed the thresholding system in ai_error: displays a fixed number of unique occurrences instead of using the number of occurrences (less system-dependent).

Signed-off-by: Chamon <luizchamon@gmail.com>