In his ruling, Anderson said Robinzine "lacked the substantial capacity to appreciate the criminality of his conduct" at the time of his arrest.
Robinzine was charged with attempted aggravated kidnapping, attempted kidnapping, unlawful restraint, aggravated battery and resisting arrest.
He is accused of grabbing the boy from a Head Start program in Elgin on Dec. 6. The children had gone to the mall in West Dundee to play on indoor playground equipment.