Husayn bin Abdullah bin Dumayrah narrates from his father, who narrates from his grandfather, that Sayyiduna Ali (may Allah be pleased with him) said: The deliberate act of a child and the deliberate act of an insane person are also (counted as) a mistake.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنايات / 16082