A rules-based machine capable of learning how to add based on given examples