ILASP (Inductive Learning of Answer Set Programs) is a logic-based machine learning system. It makes use of existing knowledge base, containing anything known before the learning starts or even previously learned rules, to infer new rules. We propose a survey on how ILASP works and how it can be used to learn constraints. In order to do so we modelled different puzzles in Answer Set Programming: the main focus concerns how different datasets can influence the learning algorithm and, consequently, what can or cannot be learnt.