Discrete neural nets and polymorphic learning